` elements converts to PowerPoint shadows
+ - Supports outer shadows only (inset shadows are ignored to prevent corruption)
+ - Example: `
`
+ - Note: Inset/inner shadows are not supported by PowerPoint and will be skipped
+
+### Icons & Gradients
+
+- **CRITICAL: Never use CSS gradients (`linear-gradient`, `radial-gradient`)** - They don't convert to PowerPoint
+- **ALWAYS create gradient/icon PNGs FIRST using Sharp, then reference in HTML**
+- For gradients: Rasterize SVG to PNG background images
+- For icons: Rasterize react-icons SVG to PNG images
+- All visual effects must be pre-rendered as raster images before HTML rendering
+
+**Rasterizing Icons with Sharp:**
+
+```javascript
+const React = require('react');
+const ReactDOMServer = require('react-dom/server');
+const sharp = require('sharp');
+const { FaHome } = require('react-icons/fa');
+
+async function rasterizeIconPng(IconComponent, color, size = "256", filename) {
+ const svgString = ReactDOMServer.renderToStaticMarkup(
+ React.createElement(IconComponent, { color: `#${color}`, size: size })
+ );
+
+ // Convert SVG to PNG using Sharp
+ await sharp(Buffer.from(svgString))
+ .png()
+ .toFile(filename);
+
+ return filename;
+}
+
+// Usage: Rasterize icon before using in HTML
+const iconPath = await rasterizeIconPng(FaHome, "4472c4", "256", "home-icon.png");
+// Then reference in HTML:

+```
+
+**Rasterizing Gradients with Sharp:**
+
+```javascript
+const sharp = require('sharp');
+
+async function createGradientBackground(filename) {
+ const svg = `
`;
+
+ await sharp(Buffer.from(svg))
+ .png()
+ .toFile(filename);
+
+ return filename;
+}
+
+// Usage: Create gradient background before HTML
+const bgPath = await createGradientBackground("gradient-bg.png");
+// Then in HTML:
+```
+
+### Example
+
+```html
+
+
+
+
+
+
+
+
Recipe Title
+
+
Text with bold, italic, underline.
+
+
+
+
+
+
+
+```
+
+## Using the html2pptx Library
+
+### Dependencies
+
+These libraries have been globally installed and are available to use:
+- `pptxgenjs`
+- `playwright`
+- `sharp`
+
+### Basic Usage
+
+```javascript
+const pptxgen = require('pptxgenjs');
+const html2pptx = require('./html2pptx');
+
+const pptx = new pptxgen();
+pptx.layout = 'LAYOUT_16x9'; // Must match HTML body dimensions
+
+const { slide, placeholders } = await html2pptx('slide1.html', pptx);
+
+// Add chart to placeholder area
+if (placeholders.length > 0) {
+ slide.addChart(pptx.charts.LINE, chartData, placeholders[0]);
+}
+
+await pptx.writeFile('output.pptx');
+```
+
+### API Reference
+
+#### Function Signature
+```javascript
+await html2pptx(htmlFile, pres, options)
+```
+
+#### Parameters
+- `htmlFile` (string): Path to HTML file (absolute or relative)
+- `pres` (pptxgen): PptxGenJS presentation instance with layout already set
+- `options` (object, optional):
+ - `tmpDir` (string): Temporary directory for generated files (default: `process.env.TMPDIR || '/tmp'`)
+ - `slide` (object): Existing slide to reuse (default: creates new slide)
+
+#### Returns
+```javascript
+{
+ slide: pptxgenSlide, // The created/updated slide
+ placeholders: [ // Array of placeholder positions
+ { id: string, x: number, y: number, w: number, h: number },
+ ...
+ ]
+}
+```
+
+### Validation
+
+The library automatically validates and collects all errors before throwing:
+
+1. **HTML dimensions must match presentation layout** - Reports dimension mismatches
+2. **Content must not overflow body** - Reports overflow with exact measurements
+3. **CSS gradients** - Reports unsupported gradient usage
+4. **Text element styling** - Reports backgrounds/borders/shadows on text elements (only allowed on divs)
+
+**All validation errors are collected and reported together** in a single error message, allowing you to fix all issues at once instead of one at a time.
+
+### Working with Placeholders
+
+```javascript
+const { slide, placeholders } = await html2pptx('slide.html', pptx);
+
+// Use first placeholder
+slide.addChart(pptx.charts.BAR, data, placeholders[0]);
+
+// Find by ID
+const chartArea = placeholders.find(p => p.id === 'chart-area');
+slide.addChart(pptx.charts.LINE, data, chartArea);
+```
+
+### Complete Example
+
+```javascript
+const pptxgen = require('pptxgenjs');
+const html2pptx = require('./html2pptx');
+
+async function createPresentation() {
+ const pptx = new pptxgen();
+ pptx.layout = 'LAYOUT_16x9';
+ pptx.author = 'Your Name';
+ pptx.title = 'My Presentation';
+
+ // Slide 1: Title
+ const { slide: slide1 } = await html2pptx('slides/title.html', pptx);
+
+ // Slide 2: Content with chart
+ const { slide: slide2, placeholders } = await html2pptx('slides/data.html', pptx);
+
+ const chartData = [{
+ name: 'Sales',
+ labels: ['Q1', 'Q2', 'Q3', 'Q4'],
+ values: [4500, 5500, 6200, 7100]
+ }];
+
+ slide2.addChart(pptx.charts.BAR, chartData, {
+ ...placeholders[0],
+ showTitle: true,
+ title: 'Quarterly Sales',
+ showCatAxisTitle: true,
+ catAxisTitle: 'Quarter',
+ showValAxisTitle: true,
+ valAxisTitle: 'Sales ($000s)'
+ });
+
+ // Save
+ await pptx.writeFile({ fileName: 'presentation.pptx' });
+ console.log('Presentation created successfully!');
+}
+
+createPresentation().catch(console.error);
+```
+
+## Using PptxGenJS
+
+After converting HTML to slides with `html2pptx`, you'll use PptxGenJS to add dynamic content like charts, images, and additional elements.
+
+### ⚠️ Critical Rules
+
+#### Colors
+- **NEVER use `#` prefix** with hex colors in PptxGenJS - causes file corruption
+- ✅ Correct: `color: "FF0000"`, `fill: { color: "0066CC" }`
+- ❌ Wrong: `color: "#FF0000"` (breaks document)
+
+### Adding Images
+
+Always calculate aspect ratios from actual image dimensions:
+
+```javascript
+// Get image dimensions: identify image.png | grep -o '[0-9]* x [0-9]*'
+const imgWidth = 1860, imgHeight = 1519; // From actual file
+const aspectRatio = imgWidth / imgHeight;
+
+const h = 3; // Max height
+const w = h * aspectRatio;
+const x = (10 - w) / 2; // Center on 16:9 slide
+
+slide.addImage({ path: "chart.png", x, y: 1.5, w, h });
+```
+
+### Adding Text
+
+```javascript
+// Rich text with formatting
+slide.addText([
+ { text: "Bold ", options: { bold: true } },
+ { text: "Italic ", options: { italic: true } },
+ { text: "Normal" }
+], {
+ x: 1, y: 2, w: 8, h: 1
+});
+```
+
+### Adding Shapes
+
+```javascript
+// Rectangle
+slide.addShape(pptx.shapes.RECTANGLE, {
+ x: 1, y: 1, w: 3, h: 2,
+ fill: { color: "4472C4" },
+ line: { color: "000000", width: 2 }
+});
+
+// Circle
+slide.addShape(pptx.shapes.OVAL, {
+ x: 5, y: 1, w: 2, h: 2,
+ fill: { color: "ED7D31" }
+});
+
+// Rounded rectangle
+slide.addShape(pptx.shapes.ROUNDED_RECTANGLE, {
+ x: 1, y: 4, w: 3, h: 1.5,
+ fill: { color: "70AD47" },
+ rectRadius: 0.2
+});
+```
+
+### Adding Charts
+
+**Required for most charts:** Axis labels using `catAxisTitle` (category) and `valAxisTitle` (value).
+
+**Chart Data Format:**
+- Use **single series with all labels** for simple bar/line charts
+- Each series creates a separate legend entry
+- Labels array defines X-axis values
+
+**Time Series Data - Choose Correct Granularity:**
+- **< 30 days**: Use daily grouping (e.g., "10-01", "10-02") - avoid monthly aggregation that creates single-point charts
+- **30-365 days**: Use monthly grouping (e.g., "2024-01", "2024-02")
+- **> 365 days**: Use yearly grouping (e.g., "2023", "2024")
+- **Validate**: Charts with only 1 data point likely indicate incorrect aggregation for the time period
+
+```javascript
+const { slide, placeholders } = await html2pptx('slide.html', pptx);
+
+// CORRECT: Single series with all labels
+slide.addChart(pptx.charts.BAR, [{
+ name: "Sales 2024",
+ labels: ["Q1", "Q2", "Q3", "Q4"],
+ values: [4500, 5500, 6200, 7100]
+}], {
+ ...placeholders[0], // Use placeholder position
+ barDir: 'col', // 'col' = vertical bars, 'bar' = horizontal
+ showTitle: true,
+ title: 'Quarterly Sales',
+ showLegend: false, // No legend needed for single series
+ // Required axis labels
+ showCatAxisTitle: true,
+ catAxisTitle: 'Quarter',
+ showValAxisTitle: true,
+ valAxisTitle: 'Sales ($000s)',
+ // Optional: Control scaling (adjust min based on data range for better visualization)
+ valAxisMaxVal: 8000,
+ valAxisMinVal: 0, // Use 0 for counts/amounts; for clustered data (e.g., 4500-7100), consider starting closer to min value
+ valAxisMajorUnit: 2000, // Control y-axis label spacing to prevent crowding
+ catAxisLabelRotate: 45, // Rotate labels if crowded
+ dataLabelPosition: 'outEnd',
+ dataLabelColor: '000000',
+ // Use single color for single-series charts
+ chartColors: ["4472C4"] // All bars same color
+});
+```
+
+#### Scatter Chart
+
+**IMPORTANT**: Scatter chart data format is unusual - first series contains X-axis values, subsequent series contain Y-values:
+
+```javascript
+// Prepare data
+const data1 = [{ x: 10, y: 20 }, { x: 15, y: 25 }, { x: 20, y: 30 }];
+const data2 = [{ x: 12, y: 18 }, { x: 18, y: 22 }];
+
+const allXValues = [...data1.map(d => d.x), ...data2.map(d => d.x)];
+
+slide.addChart(pptx.charts.SCATTER, [
+ { name: 'X-Axis', values: allXValues }, // First series = X values
+ { name: 'Series 1', values: data1.map(d => d.y) }, // Y values only
+ { name: 'Series 2', values: data2.map(d => d.y) } // Y values only
+], {
+ x: 1, y: 1, w: 8, h: 4,
+ lineSize: 0, // 0 = no connecting lines
+ lineDataSymbol: 'circle',
+ lineDataSymbolSize: 6,
+ showCatAxisTitle: true,
+ catAxisTitle: 'X Axis',
+ showValAxisTitle: true,
+ valAxisTitle: 'Y Axis',
+ chartColors: ["4472C4", "ED7D31"]
+});
+```
+
+#### Line Chart
+
+```javascript
+slide.addChart(pptx.charts.LINE, [{
+ name: "Temperature",
+ labels: ["Jan", "Feb", "Mar", "Apr"],
+ values: [32, 35, 42, 55]
+}], {
+ x: 1, y: 1, w: 8, h: 4,
+ lineSize: 4,
+ lineSmooth: true,
+ // Required axis labels
+ showCatAxisTitle: true,
+ catAxisTitle: 'Month',
+ showValAxisTitle: true,
+ valAxisTitle: 'Temperature (°F)',
+ // Optional: Y-axis range (set min based on data range for better visualization)
+ valAxisMinVal: 0, // For ranges starting at 0 (counts, percentages, etc.)
+ valAxisMaxVal: 60,
+ valAxisMajorUnit: 20, // Control y-axis label spacing to prevent crowding (e.g., 10, 20, 25)
+ // valAxisMinVal: 30, // PREFERRED: For data clustered in a range (e.g., 32-55 or ratings 3-5), start axis closer to min value to show variation
+ // Optional: Chart colors
+ chartColors: ["4472C4", "ED7D31", "A5A5A5"]
+});
+```
+
+#### Pie Chart (No Axis Labels Required)
+
+**CRITICAL**: Pie charts require a **single data series** with all categories in the `labels` array and corresponding values in the `values` array.
+
+```javascript
+slide.addChart(pptx.charts.PIE, [{
+ name: "Market Share",
+ labels: ["Product A", "Product B", "Other"], // All categories in one array
+ values: [35, 45, 20] // All values in one array
+}], {
+ x: 2, y: 1, w: 6, h: 4,
+ showPercent: true,
+ showLegend: true,
+ legendPos: 'r', // right
+ chartColors: ["4472C4", "ED7D31", "A5A5A5"]
+});
+```
+
+#### Multiple Data Series
+
+```javascript
+slide.addChart(pptx.charts.LINE, [
+ {
+ name: "Product A",
+ labels: ["Q1", "Q2", "Q3", "Q4"],
+ values: [10, 20, 30, 40]
+ },
+ {
+ name: "Product B",
+ labels: ["Q1", "Q2", "Q3", "Q4"],
+ values: [15, 25, 20, 35]
+ }
+], {
+ x: 1, y: 1, w: 8, h: 4,
+ showCatAxisTitle: true,
+ catAxisTitle: 'Quarter',
+ showValAxisTitle: true,
+ valAxisTitle: 'Revenue ($M)'
+});
+```
+
+### Chart Colors
+
+**CRITICAL**: Use hex colors **without** the `#` prefix - including `#` causes file corruption.
+
+**Align chart colors with your chosen design palette**, ensuring sufficient contrast and distinctiveness for data visualization. Adjust colors for:
+- Strong contrast between adjacent series
+- Readability against slide backgrounds
+- Accessibility (avoid red-green only combinations)
+
+```javascript
+// Example: Ocean palette-inspired chart colors (adjusted for contrast)
+const chartColors = ["16A085", "FF6B9D", "2C3E50", "F39C12", "9B59B6"];
+
+// Single-series chart: Use one color for all bars/points
+slide.addChart(pptx.charts.BAR, [{
+ name: "Sales",
+ labels: ["Q1", "Q2", "Q3", "Q4"],
+ values: [4500, 5500, 6200, 7100]
+}], {
+ ...placeholders[0],
+ chartColors: ["16A085"], // All bars same color
+ showLegend: false
+});
+
+// Multi-series chart: Each series gets a different color
+slide.addChart(pptx.charts.LINE, [
+ { name: "Product A", labels: ["Q1", "Q2", "Q3"], values: [10, 20, 30] },
+ { name: "Product B", labels: ["Q1", "Q2", "Q3"], values: [15, 25, 20] }
+], {
+ ...placeholders[0],
+ chartColors: ["16A085", "FF6B9D"] // One color per series
+});
+```
+
+### Adding Tables
+
+Tables can be added with basic or advanced formatting:
+
+#### Basic Table
+
+```javascript
+slide.addTable([
+ ["Header 1", "Header 2", "Header 3"],
+ ["Row 1, Col 1", "Row 1, Col 2", "Row 1, Col 3"],
+ ["Row 2, Col 1", "Row 2, Col 2", "Row 2, Col 3"]
+], {
+ x: 0.5,
+ y: 1,
+ w: 9,
+ h: 3,
+ border: { pt: 1, color: "999999" },
+ fill: { color: "F1F1F1" }
+});
+```
+
+#### Table with Custom Formatting
+
+```javascript
+const tableData = [
+ // Header row with custom styling
+ [
+ { text: "Product", options: { fill: { color: "4472C4" }, color: "FFFFFF", bold: true } },
+ { text: "Revenue", options: { fill: { color: "4472C4" }, color: "FFFFFF", bold: true } },
+ { text: "Growth", options: { fill: { color: "4472C4" }, color: "FFFFFF", bold: true } }
+ ],
+ // Data rows
+ ["Product A", "$50M", "+15%"],
+ ["Product B", "$35M", "+22%"],
+ ["Product C", "$28M", "+8%"]
+];
+
+slide.addTable(tableData, {
+ x: 1,
+ y: 1.5,
+ w: 8,
+ h: 3,
+ colW: [3, 2.5, 2.5], // Column widths
+ rowH: [0.5, 0.6, 0.6, 0.6], // Row heights
+ border: { pt: 1, color: "CCCCCC" },
+ align: "center",
+ valign: "middle",
+ fontSize: 14
+});
+```
+
+#### Table with Merged Cells
+
+```javascript
+const mergedTableData = [
+ [
+ { text: "Q1 Results", options: { colspan: 3, fill: { color: "4472C4" }, color: "FFFFFF", bold: true } }
+ ],
+ ["Product", "Sales", "Market Share"],
+ ["Product A", "$25M", "35%"],
+ ["Product B", "$18M", "25%"]
+];
+
+slide.addTable(mergedTableData, {
+ x: 1,
+ y: 1,
+ w: 8,
+ h: 2.5,
+ colW: [3, 2.5, 2.5],
+ border: { pt: 1, color: "DDDDDD" }
+});
+```
+
+### Table Options
+
+Common table options:
+- `x, y, w, h` - Position and size
+- `colW` - Array of column widths (in inches)
+- `rowH` - Array of row heights (in inches)
+- `border` - Border style: `{ pt: 1, color: "999999" }`
+- `fill` - Background color (no # prefix)
+- `align` - Text alignment: "left", "center", "right"
+- `valign` - Vertical alignment: "top", "middle", "bottom"
+- `fontSize` - Text size
+- `autoPage` - Auto-create new slides if content overflows
\ No newline at end of file
diff --git a/scientific-skills/document-skills/pptx/ooxml.md b/scientific-skills/document-skills/pptx/ooxml.md
new file mode 100644
index 0000000..951b3cf
--- /dev/null
+++ b/scientific-skills/document-skills/pptx/ooxml.md
@@ -0,0 +1,427 @@
+# Office Open XML Technical Reference for PowerPoint
+
+**Important: Read this entire document before starting.** Critical XML schema rules and formatting requirements are covered throughout. Incorrect implementation can create invalid PPTX files that PowerPoint cannot open.
+
+## Technical Guidelines
+
+### Schema Compliance
+- **Element ordering in `
`**: ``, ``, ``
+- **Whitespace**: Add `xml:space='preserve'` to `` elements with leading/trailing spaces
+- **Unicode**: Escape characters in ASCII content: `"` becomes `“`
+- **Images**: Add to `ppt/media/`, reference in slide XML, set dimensions to fit slide bounds
+- **Relationships**: Update `ppt/slides/_rels/slideN.xml.rels` for each slide's resources
+- **Dirty attribute**: Add `dirty="0"` to `` and `` elements to indicate clean state
+
+## Presentation Structure
+
+### Basic Slide Structure
+```xml
+
+
+
+
+ ...
+ ...
+
+
+
+
+```
+
+### Text Box / Shape with Text
+```xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Slide Title
+
+
+
+
+```
+
+### Text Formatting
+```xml
+
+
+
+ Bold Text
+
+
+
+
+
+ Italic Text
+
+
+
+
+
+ Underlined
+
+
+
+
+
+
+
+
+
+ Highlighted Text
+
+
+
+
+
+
+
+
+
+ Colored Arial 24pt
+
+
+
+
+
+
+
+
+
+ Formatted text
+
+```
+
+### Lists
+```xml
+
+
+
+
+
+
+ First bullet point
+
+
+
+
+
+
+
+
+
+ First numbered item
+
+
+
+
+
+
+
+
+
+ Indented bullet
+
+
+```
+
+### Shapes
+```xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+```
+
+### Images
+```xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+```
+
+### Tables
+```xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Cell 1
+
+
+
+
+
+
+
+
+
+
+ Cell 2
+
+
+
+
+
+
+
+
+
+```
+
+### Slide Layouts
+
+```xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+```
+
+## File Updates
+
+When adding content, update these files:
+
+**`ppt/_rels/presentation.xml.rels`:**
+```xml
+
+
+```
+
+**`ppt/slides/_rels/slide1.xml.rels`:**
+```xml
+
+
+```
+
+**`[Content_Types].xml`:**
+```xml
+
+
+
+```
+
+**`ppt/presentation.xml`:**
+```xml
+
+
+
+
+```
+
+**`docProps/app.xml`:** Update slide count and statistics
+```xml
+2
+10
+50
+```
+
+## Slide Operations
+
+### Adding a New Slide
+When adding a slide to the end of the presentation:
+
+1. **Create the slide file** (`ppt/slides/slideN.xml`)
+2. **Update `[Content_Types].xml`**: Add Override for the new slide
+3. **Update `ppt/_rels/presentation.xml.rels`**: Add relationship for the new slide
+4. **Update `ppt/presentation.xml`**: Add slide ID to ``
+5. **Create slide relationships** (`ppt/slides/_rels/slideN.xml.rels`) if needed
+6. **Update `docProps/app.xml`**: Increment slide count and update statistics (if present)
+
+### Duplicating a Slide
+1. Copy the source slide XML file with a new name
+2. Update all IDs in the new slide to be unique
+3. Follow the "Adding a New Slide" steps above
+4. **CRITICAL**: Remove or update any notes slide references in `_rels` files
+5. Remove references to unused media files
+
+### Reordering Slides
+1. **Update `ppt/presentation.xml`**: Reorder `` elements in ``
+2. The order of `` elements determines slide order
+3. Keep slide IDs and relationship IDs unchanged
+
+Example:
+```xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+```
+
+### Deleting a Slide
+1. **Remove from `ppt/presentation.xml`**: Delete the `` entry
+2. **Remove from `ppt/_rels/presentation.xml.rels`**: Delete the relationship
+3. **Remove from `[Content_Types].xml`**: Delete the Override entry
+4. **Delete files**: Remove `ppt/slides/slideN.xml` and `ppt/slides/_rels/slideN.xml.rels`
+5. **Update `docProps/app.xml`**: Decrement slide count and update statistics
+6. **Clean up unused media**: Remove orphaned images from `ppt/media/`
+
+Note: Don't renumber remaining slides - keep their original IDs and filenames.
+
+
+## Common Errors to Avoid
+
+- **Encodings**: Escape unicode characters in ASCII content: `"` becomes `“`
+- **Images**: Add to `ppt/media/` and update relationship files
+- **Lists**: Omit bullets from list headers
+- **IDs**: Use valid hexadecimal values for UUIDs
+- **Themes**: Check all themes in `theme` directory for colors
+
+## Validation Checklist for Template-Based Presentations
+
+### Before Packing, Always:
+- **Clean unused resources**: Remove unreferenced media, fonts, and notes directories
+- **Fix Content_Types.xml**: Declare ALL slides, layouts, and themes present in the package
+- **Fix relationship IDs**:
+ - Remove font embed references if not using embedded fonts
+- **Remove broken references**: Check all `_rels` files for references to deleted resources
+
+### Common Template Duplication Pitfalls:
+- Multiple slides referencing the same notes slide after duplication
+- Image/media references from template slides that no longer exist
+- Font embedding references when fonts aren't included
+- Missing slideLayout declarations for layouts 12-25
+- docProps directory may not unpack - this is optional
\ No newline at end of file
diff --git a/scientific-skills/document-skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-chart.xsd b/scientific-skills/document-skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-chart.xsd
new file mode 100644
index 0000000..6454ef9
--- /dev/null
+++ b/scientific-skills/document-skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-chart.xsd
@@ -0,0 +1,1499 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/scientific-skills/document-skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-chartDrawing.xsd b/scientific-skills/document-skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-chartDrawing.xsd
new file mode 100644
index 0000000..afa4f46
--- /dev/null
+++ b/scientific-skills/document-skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-chartDrawing.xsd
@@ -0,0 +1,146 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/scientific-skills/document-skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-diagram.xsd b/scientific-skills/document-skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-diagram.xsd
new file mode 100644
index 0000000..64e66b8
--- /dev/null
+++ b/scientific-skills/document-skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-diagram.xsd
@@ -0,0 +1,1085 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/scientific-skills/document-skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-lockedCanvas.xsd b/scientific-skills/document-skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-lockedCanvas.xsd
new file mode 100644
index 0000000..687eea8
--- /dev/null
+++ b/scientific-skills/document-skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-lockedCanvas.xsd
@@ -0,0 +1,11 @@
+
+
+
+
+
diff --git a/scientific-skills/document-skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-main.xsd b/scientific-skills/document-skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-main.xsd
new file mode 100644
index 0000000..6ac81b0
--- /dev/null
+++ b/scientific-skills/document-skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-main.xsd
@@ -0,0 +1,3081 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/scientific-skills/document-skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-picture.xsd b/scientific-skills/document-skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-picture.xsd
new file mode 100644
index 0000000..1dbf051
--- /dev/null
+++ b/scientific-skills/document-skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-picture.xsd
@@ -0,0 +1,23 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/scientific-skills/document-skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-spreadsheetDrawing.xsd b/scientific-skills/document-skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-spreadsheetDrawing.xsd
new file mode 100644
index 0000000..f1af17d
--- /dev/null
+++ b/scientific-skills/document-skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-spreadsheetDrawing.xsd
@@ -0,0 +1,185 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/scientific-skills/document-skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-wordprocessingDrawing.xsd b/scientific-skills/document-skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-wordprocessingDrawing.xsd
new file mode 100644
index 0000000..0a185ab
--- /dev/null
+++ b/scientific-skills/document-skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-wordprocessingDrawing.xsd
@@ -0,0 +1,287 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/scientific-skills/document-skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/pml.xsd b/scientific-skills/document-skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/pml.xsd
new file mode 100644
index 0000000..14ef488
--- /dev/null
+++ b/scientific-skills/document-skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/pml.xsd
@@ -0,0 +1,1676 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/scientific-skills/document-skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-additionalCharacteristics.xsd b/scientific-skills/document-skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-additionalCharacteristics.xsd
new file mode 100644
index 0000000..c20f3bf
--- /dev/null
+++ b/scientific-skills/document-skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-additionalCharacteristics.xsd
@@ -0,0 +1,28 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/scientific-skills/document-skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-bibliography.xsd b/scientific-skills/document-skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-bibliography.xsd
new file mode 100644
index 0000000..ac60252
--- /dev/null
+++ b/scientific-skills/document-skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-bibliography.xsd
@@ -0,0 +1,144 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/scientific-skills/document-skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-commonSimpleTypes.xsd b/scientific-skills/document-skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-commonSimpleTypes.xsd
new file mode 100644
index 0000000..424b8ba
--- /dev/null
+++ b/scientific-skills/document-skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-commonSimpleTypes.xsd
@@ -0,0 +1,174 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/scientific-skills/document-skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-customXmlDataProperties.xsd b/scientific-skills/document-skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-customXmlDataProperties.xsd
new file mode 100644
index 0000000..2bddce2
--- /dev/null
+++ b/scientific-skills/document-skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-customXmlDataProperties.xsd
@@ -0,0 +1,25 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/scientific-skills/document-skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-customXmlSchemaProperties.xsd b/scientific-skills/document-skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-customXmlSchemaProperties.xsd
new file mode 100644
index 0000000..8a8c18b
--- /dev/null
+++ b/scientific-skills/document-skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-customXmlSchemaProperties.xsd
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/scientific-skills/document-skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesCustom.xsd b/scientific-skills/document-skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesCustom.xsd
new file mode 100644
index 0000000..5c42706
--- /dev/null
+++ b/scientific-skills/document-skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesCustom.xsd
@@ -0,0 +1,59 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/scientific-skills/document-skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesExtended.xsd b/scientific-skills/document-skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesExtended.xsd
new file mode 100644
index 0000000..853c341
--- /dev/null
+++ b/scientific-skills/document-skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesExtended.xsd
@@ -0,0 +1,56 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/scientific-skills/document-skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesVariantTypes.xsd b/scientific-skills/document-skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesVariantTypes.xsd
new file mode 100644
index 0000000..da835ee
--- /dev/null
+++ b/scientific-skills/document-skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesVariantTypes.xsd
@@ -0,0 +1,195 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/scientific-skills/document-skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-math.xsd b/scientific-skills/document-skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-math.xsd
new file mode 100644
index 0000000..87ad265
--- /dev/null
+++ b/scientific-skills/document-skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-math.xsd
@@ -0,0 +1,582 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/scientific-skills/document-skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-relationshipReference.xsd b/scientific-skills/document-skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-relationshipReference.xsd
new file mode 100644
index 0000000..9e86f1b
--- /dev/null
+++ b/scientific-skills/document-skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-relationshipReference.xsd
@@ -0,0 +1,25 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/scientific-skills/document-skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/sml.xsd b/scientific-skills/document-skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/sml.xsd
new file mode 100644
index 0000000..d0be42e
--- /dev/null
+++ b/scientific-skills/document-skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/sml.xsd
@@ -0,0 +1,4439 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/scientific-skills/document-skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/vml-main.xsd b/scientific-skills/document-skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/vml-main.xsd
new file mode 100644
index 0000000..8821dd1
--- /dev/null
+++ b/scientific-skills/document-skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/vml-main.xsd
@@ -0,0 +1,570 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/scientific-skills/document-skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/vml-officeDrawing.xsd b/scientific-skills/document-skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/vml-officeDrawing.xsd
new file mode 100644
index 0000000..ca2575c
--- /dev/null
+++ b/scientific-skills/document-skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/vml-officeDrawing.xsd
@@ -0,0 +1,509 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/scientific-skills/document-skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/vml-presentationDrawing.xsd b/scientific-skills/document-skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/vml-presentationDrawing.xsd
new file mode 100644
index 0000000..dd079e6
--- /dev/null
+++ b/scientific-skills/document-skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/vml-presentationDrawing.xsd
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
diff --git a/scientific-skills/document-skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/vml-spreadsheetDrawing.xsd b/scientific-skills/document-skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/vml-spreadsheetDrawing.xsd
new file mode 100644
index 0000000..3dd6cf6
--- /dev/null
+++ b/scientific-skills/document-skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/vml-spreadsheetDrawing.xsd
@@ -0,0 +1,108 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/scientific-skills/document-skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/vml-wordprocessingDrawing.xsd b/scientific-skills/document-skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/vml-wordprocessingDrawing.xsd
new file mode 100644
index 0000000..f1041e3
--- /dev/null
+++ b/scientific-skills/document-skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/vml-wordprocessingDrawing.xsd
@@ -0,0 +1,96 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/scientific-skills/document-skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/wml.xsd b/scientific-skills/document-skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/wml.xsd
new file mode 100644
index 0000000..9c5b7a6
--- /dev/null
+++ b/scientific-skills/document-skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/wml.xsd
@@ -0,0 +1,3646 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/scientific-skills/document-skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/xml.xsd b/scientific-skills/document-skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/xml.xsd
new file mode 100644
index 0000000..0f13678
--- /dev/null
+++ b/scientific-skills/document-skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/xml.xsd
@@ -0,0 +1,116 @@
+
+
+
+
+
+ See http://www.w3.org/XML/1998/namespace.html and
+ http://www.w3.org/TR/REC-xml for information about this namespace.
+
+ This schema document describes the XML namespace, in a form
+ suitable for import by other schema documents.
+
+ Note that local names in this namespace are intended to be defined
+ only by the World Wide Web Consortium or its subgroups. The
+ following names are currently defined in this namespace and should
+ not be used with conflicting semantics by any Working Group,
+ specification, or document instance:
+
+ base (as an attribute name): denotes an attribute whose value
+ provides a URI to be used as the base for interpreting any
+ relative URIs in the scope of the element on which it
+ appears; its value is inherited. This name is reserved
+ by virtue of its definition in the XML Base specification.
+
+ lang (as an attribute name): denotes an attribute whose value
+ is a language code for the natural language of the content of
+ any element; its value is inherited. This name is reserved
+ by virtue of its definition in the XML specification.
+
+ space (as an attribute name): denotes an attribute whose
+ value is a keyword indicating what whitespace processing
+ discipline is intended for the content of the element; its
+ value is inherited. This name is reserved by virtue of its
+ definition in the XML specification.
+
+ Father (in any context at all): denotes Jon Bosak, the chair of
+ the original XML Working Group. This name is reserved by
+ the following decision of the W3C XML Plenary and
+ XML Coordination groups:
+
+ In appreciation for his vision, leadership and dedication
+ the W3C XML Plenary on this 10th day of February, 2000
+ reserves for Jon Bosak in perpetuity the XML name
+ xml:Father
+
+
+
+
+ This schema defines attributes and an attribute group
+ suitable for use by
+ schemas wishing to allow xml:base, xml:lang or xml:space attributes
+ on elements they define.
+
+ To enable this, such a schema must import this schema
+ for the XML namespace, e.g. as follows:
+ <schema . . .>
+ . . .
+ <import namespace="http://www.w3.org/XML/1998/namespace"
+ schemaLocation="http://www.w3.org/2001/03/xml.xsd"/>
+
+ Subsequently, qualified reference to any of the attributes
+ or the group defined below will have the desired effect, e.g.
+
+ <type . . .>
+ . . .
+ <attributeGroup ref="xml:specialAttrs"/>
+
+ will define a type which will schema-validate an instance
+ element with any of those attributes
+
+
+
+ In keeping with the XML Schema WG's standard versioning
+ policy, this schema document will persist at
+ http://www.w3.org/2001/03/xml.xsd.
+ At the date of issue it can also be found at
+ http://www.w3.org/2001/xml.xsd.
+ The schema document at that URI may however change in the future,
+ in order to remain compatible with the latest version of XML Schema
+ itself. In other words, if the XML Schema namespace changes, the version
+ of this document at
+ http://www.w3.org/2001/xml.xsd will change
+ accordingly; the version at
+ http://www.w3.org/2001/03/xml.xsd will not change.
+
+
+
+
+
+ In due course, we should install the relevant ISO 2- and 3-letter
+ codes as the enumerated possible values . . .
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ See http://www.w3.org/TR/xmlbase/ for
+ information about this attribute.
+
+
+
+
+
+
+
+
+
+
diff --git a/scientific-skills/document-skills/pptx/ooxml/schemas/ecma/fouth-edition/opc-contentTypes.xsd b/scientific-skills/document-skills/pptx/ooxml/schemas/ecma/fouth-edition/opc-contentTypes.xsd
new file mode 100644
index 0000000..a6de9d2
--- /dev/null
+++ b/scientific-skills/document-skills/pptx/ooxml/schemas/ecma/fouth-edition/opc-contentTypes.xsd
@@ -0,0 +1,42 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/scientific-skills/document-skills/pptx/ooxml/schemas/ecma/fouth-edition/opc-coreProperties.xsd b/scientific-skills/document-skills/pptx/ooxml/schemas/ecma/fouth-edition/opc-coreProperties.xsd
new file mode 100644
index 0000000..10e978b
--- /dev/null
+++ b/scientific-skills/document-skills/pptx/ooxml/schemas/ecma/fouth-edition/opc-coreProperties.xsd
@@ -0,0 +1,50 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/scientific-skills/document-skills/pptx/ooxml/schemas/ecma/fouth-edition/opc-digSig.xsd b/scientific-skills/document-skills/pptx/ooxml/schemas/ecma/fouth-edition/opc-digSig.xsd
new file mode 100644
index 0000000..4248bf7
--- /dev/null
+++ b/scientific-skills/document-skills/pptx/ooxml/schemas/ecma/fouth-edition/opc-digSig.xsd
@@ -0,0 +1,49 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/scientific-skills/document-skills/pptx/ooxml/schemas/ecma/fouth-edition/opc-relationships.xsd b/scientific-skills/document-skills/pptx/ooxml/schemas/ecma/fouth-edition/opc-relationships.xsd
new file mode 100644
index 0000000..5649746
--- /dev/null
+++ b/scientific-skills/document-skills/pptx/ooxml/schemas/ecma/fouth-edition/opc-relationships.xsd
@@ -0,0 +1,33 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/scientific-skills/document-skills/pptx/ooxml/schemas/mce/mc.xsd b/scientific-skills/document-skills/pptx/ooxml/schemas/mce/mc.xsd
new file mode 100644
index 0000000..ef72545
--- /dev/null
+++ b/scientific-skills/document-skills/pptx/ooxml/schemas/mce/mc.xsd
@@ -0,0 +1,75 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/scientific-skills/document-skills/pptx/ooxml/schemas/microsoft/wml-2010.xsd b/scientific-skills/document-skills/pptx/ooxml/schemas/microsoft/wml-2010.xsd
new file mode 100644
index 0000000..f65f777
--- /dev/null
+++ b/scientific-skills/document-skills/pptx/ooxml/schemas/microsoft/wml-2010.xsd
@@ -0,0 +1,560 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/scientific-skills/document-skills/pptx/ooxml/schemas/microsoft/wml-2012.xsd b/scientific-skills/document-skills/pptx/ooxml/schemas/microsoft/wml-2012.xsd
new file mode 100644
index 0000000..6b00755
--- /dev/null
+++ b/scientific-skills/document-skills/pptx/ooxml/schemas/microsoft/wml-2012.xsd
@@ -0,0 +1,67 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/scientific-skills/document-skills/pptx/ooxml/schemas/microsoft/wml-2018.xsd b/scientific-skills/document-skills/pptx/ooxml/schemas/microsoft/wml-2018.xsd
new file mode 100644
index 0000000..f321d33
--- /dev/null
+++ b/scientific-skills/document-skills/pptx/ooxml/schemas/microsoft/wml-2018.xsd
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/scientific-skills/document-skills/pptx/ooxml/schemas/microsoft/wml-cex-2018.xsd b/scientific-skills/document-skills/pptx/ooxml/schemas/microsoft/wml-cex-2018.xsd
new file mode 100644
index 0000000..364c6a9
--- /dev/null
+++ b/scientific-skills/document-skills/pptx/ooxml/schemas/microsoft/wml-cex-2018.xsd
@@ -0,0 +1,20 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/scientific-skills/document-skills/pptx/ooxml/schemas/microsoft/wml-cid-2016.xsd b/scientific-skills/document-skills/pptx/ooxml/schemas/microsoft/wml-cid-2016.xsd
new file mode 100644
index 0000000..fed9d15
--- /dev/null
+++ b/scientific-skills/document-skills/pptx/ooxml/schemas/microsoft/wml-cid-2016.xsd
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/scientific-skills/document-skills/pptx/ooxml/schemas/microsoft/wml-sdtdatahash-2020.xsd b/scientific-skills/document-skills/pptx/ooxml/schemas/microsoft/wml-sdtdatahash-2020.xsd
new file mode 100644
index 0000000..680cf15
--- /dev/null
+++ b/scientific-skills/document-skills/pptx/ooxml/schemas/microsoft/wml-sdtdatahash-2020.xsd
@@ -0,0 +1,4 @@
+
+
+
+
diff --git a/scientific-skills/document-skills/pptx/ooxml/schemas/microsoft/wml-symex-2015.xsd b/scientific-skills/document-skills/pptx/ooxml/schemas/microsoft/wml-symex-2015.xsd
new file mode 100644
index 0000000..89ada90
--- /dev/null
+++ b/scientific-skills/document-skills/pptx/ooxml/schemas/microsoft/wml-symex-2015.xsd
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
diff --git a/scientific-skills/document-skills/pptx/ooxml/scripts/pack.py b/scientific-skills/document-skills/pptx/ooxml/scripts/pack.py
new file mode 100755
index 0000000..68bc088
--- /dev/null
+++ b/scientific-skills/document-skills/pptx/ooxml/scripts/pack.py
@@ -0,0 +1,159 @@
+#!/usr/bin/env python3
+"""
+Tool to pack a directory into a .docx, .pptx, or .xlsx file with XML formatting undone.
+
+Example usage:
+ python pack.py [--force]
+"""
+
+import argparse
+import shutil
+import subprocess
+import sys
+import tempfile
+import defusedxml.minidom
+import zipfile
+from pathlib import Path
+
+
+def main():
+ parser = argparse.ArgumentParser(description="Pack a directory into an Office file")
+ parser.add_argument("input_directory", help="Unpacked Office document directory")
+ parser.add_argument("output_file", help="Output Office file (.docx/.pptx/.xlsx)")
+ parser.add_argument("--force", action="store_true", help="Skip validation")
+ args = parser.parse_args()
+
+ try:
+ success = pack_document(
+ args.input_directory, args.output_file, validate=not args.force
+ )
+
+ # Show warning if validation was skipped
+ if args.force:
+ print("Warning: Skipped validation, file may be corrupt", file=sys.stderr)
+ # Exit with error if validation failed
+ elif not success:
+ print("Contents would produce a corrupt file.", file=sys.stderr)
+ print("Please validate XML before repacking.", file=sys.stderr)
+ print("Use --force to skip validation and pack anyway.", file=sys.stderr)
+ sys.exit(1)
+
+ except ValueError as e:
+ sys.exit(f"Error: {e}")
+
+
+def pack_document(input_dir, output_file, validate=False):
+ """Pack a directory into an Office file (.docx/.pptx/.xlsx).
+
+ Args:
+ input_dir: Path to unpacked Office document directory
+ output_file: Path to output Office file
+ validate: If True, validates with soffice (default: False)
+
+ Returns:
+ bool: True if successful, False if validation failed
+ """
+ input_dir = Path(input_dir)
+ output_file = Path(output_file)
+
+ if not input_dir.is_dir():
+ raise ValueError(f"{input_dir} is not a directory")
+ if output_file.suffix.lower() not in {".docx", ".pptx", ".xlsx"}:
+ raise ValueError(f"{output_file} must be a .docx, .pptx, or .xlsx file")
+
+ # Work in temporary directory to avoid modifying original
+ with tempfile.TemporaryDirectory() as temp_dir:
+ temp_content_dir = Path(temp_dir) / "content"
+ shutil.copytree(input_dir, temp_content_dir)
+
+ # Process XML files to remove pretty-printing whitespace
+ for pattern in ["*.xml", "*.rels"]:
+ for xml_file in temp_content_dir.rglob(pattern):
+ condense_xml(xml_file)
+
+ # Create final Office file as zip archive
+ output_file.parent.mkdir(parents=True, exist_ok=True)
+ with zipfile.ZipFile(output_file, "w", zipfile.ZIP_DEFLATED) as zf:
+ for f in temp_content_dir.rglob("*"):
+ if f.is_file():
+ zf.write(f, f.relative_to(temp_content_dir))
+
+ # Validate if requested
+ if validate:
+ if not validate_document(output_file):
+ output_file.unlink() # Delete the corrupt file
+ return False
+
+ return True
+
+
+def validate_document(doc_path):
+ """Validate document by converting to HTML with soffice."""
+ # Determine the correct filter based on file extension
+ match doc_path.suffix.lower():
+ case ".docx":
+ filter_name = "html:HTML"
+ case ".pptx":
+ filter_name = "html:impress_html_Export"
+ case ".xlsx":
+ filter_name = "html:HTML (StarCalc)"
+
+ with tempfile.TemporaryDirectory() as temp_dir:
+ try:
+ result = subprocess.run(
+ [
+ "soffice",
+ "--headless",
+ "--convert-to",
+ filter_name,
+ "--outdir",
+ temp_dir,
+ str(doc_path),
+ ],
+ capture_output=True,
+ timeout=10,
+ text=True,
+ )
+ if not (Path(temp_dir) / f"{doc_path.stem}.html").exists():
+ error_msg = result.stderr.strip() or "Document validation failed"
+ print(f"Validation error: {error_msg}", file=sys.stderr)
+ return False
+ return True
+ except FileNotFoundError:
+ print("Warning: soffice not found. Skipping validation.", file=sys.stderr)
+ return True
+ except subprocess.TimeoutExpired:
+ print("Validation error: Timeout during conversion", file=sys.stderr)
+ return False
+ except Exception as e:
+ print(f"Validation error: {e}", file=sys.stderr)
+ return False
+
+
+def condense_xml(xml_file):
+ """Strip unnecessary whitespace and remove comments."""
+ with open(xml_file, "r", encoding="utf-8") as f:
+ dom = defusedxml.minidom.parse(f)
+
+ # Process each element to remove whitespace and comments
+ for element in dom.getElementsByTagName("*"):
+ # Skip w:t elements and their processing
+ if element.tagName.endswith(":t"):
+ continue
+
+ # Remove whitespace-only text nodes and comment nodes
+ for child in list(element.childNodes):
+ if (
+ child.nodeType == child.TEXT_NODE
+ and child.nodeValue
+ and child.nodeValue.strip() == ""
+ ) or child.nodeType == child.COMMENT_NODE:
+ element.removeChild(child)
+
+ # Write back the condensed XML
+ with open(xml_file, "wb") as f:
+ f.write(dom.toxml(encoding="UTF-8"))
+
+
+if __name__ == "__main__":
+ main()
diff --git a/scientific-skills/document-skills/pptx/ooxml/scripts/unpack.py b/scientific-skills/document-skills/pptx/ooxml/scripts/unpack.py
new file mode 100755
index 0000000..4938798
--- /dev/null
+++ b/scientific-skills/document-skills/pptx/ooxml/scripts/unpack.py
@@ -0,0 +1,29 @@
+#!/usr/bin/env python3
+"""Unpack and format XML contents of Office files (.docx, .pptx, .xlsx)"""
+
+import random
+import sys
+import defusedxml.minidom
+import zipfile
+from pathlib import Path
+
+# Get command line arguments
+assert len(sys.argv) == 3, "Usage: python unpack.py "
+input_file, output_dir = sys.argv[1], sys.argv[2]
+
+# Extract and format
+output_path = Path(output_dir)
+output_path.mkdir(parents=True, exist_ok=True)
+zipfile.ZipFile(input_file).extractall(output_path)
+
+# Pretty print all XML files
+xml_files = list(output_path.rglob("*.xml")) + list(output_path.rglob("*.rels"))
+for xml_file in xml_files:
+ content = xml_file.read_text(encoding="utf-8")
+ dom = defusedxml.minidom.parseString(content)
+ xml_file.write_bytes(dom.toprettyxml(indent=" ", encoding="ascii"))
+
+# For .docx files, suggest an RSID for tracked changes
+if input_file.endswith(".docx"):
+ suggested_rsid = "".join(random.choices("0123456789ABCDEF", k=8))
+ print(f"Suggested RSID for edit session: {suggested_rsid}")
diff --git a/scientific-skills/document-skills/pptx/ooxml/scripts/validate.py b/scientific-skills/document-skills/pptx/ooxml/scripts/validate.py
new file mode 100755
index 0000000..508c589
--- /dev/null
+++ b/scientific-skills/document-skills/pptx/ooxml/scripts/validate.py
@@ -0,0 +1,69 @@
+#!/usr/bin/env python3
+"""
+Command line tool to validate Office document XML files against XSD schemas and tracked changes.
+
+Usage:
+ python validate.py --original
+"""
+
+import argparse
+import sys
+from pathlib import Path
+
+from validation import DOCXSchemaValidator, PPTXSchemaValidator, RedliningValidator
+
+
+def main():
+ parser = argparse.ArgumentParser(description="Validate Office document XML files")
+ parser.add_argument(
+ "unpacked_dir",
+ help="Path to unpacked Office document directory",
+ )
+ parser.add_argument(
+ "--original",
+ required=True,
+ help="Path to original file (.docx/.pptx/.xlsx)",
+ )
+ parser.add_argument(
+ "-v",
+ "--verbose",
+ action="store_true",
+ help="Enable verbose output",
+ )
+ args = parser.parse_args()
+
+ # Validate paths
+ unpacked_dir = Path(args.unpacked_dir)
+ original_file = Path(args.original)
+ file_extension = original_file.suffix.lower()
+ assert unpacked_dir.is_dir(), f"Error: {unpacked_dir} is not a directory"
+ assert original_file.is_file(), f"Error: {original_file} is not a file"
+ assert file_extension in [".docx", ".pptx", ".xlsx"], (
+ f"Error: {original_file} must be a .docx, .pptx, or .xlsx file"
+ )
+
+ # Run validations
+ match file_extension:
+ case ".docx":
+ validators = [DOCXSchemaValidator, RedliningValidator]
+ case ".pptx":
+ validators = [PPTXSchemaValidator]
+ case _:
+ print(f"Error: Validation not supported for file type {file_extension}")
+ sys.exit(1)
+
+ # Run validators
+ success = True
+ for V in validators:
+ validator = V(unpacked_dir, original_file, verbose=args.verbose)
+ if not validator.validate():
+ success = False
+
+ if success:
+ print("All validations PASSED!")
+
+ sys.exit(0 if success else 1)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/scientific-skills/document-skills/pptx/ooxml/scripts/validation/__init__.py b/scientific-skills/document-skills/pptx/ooxml/scripts/validation/__init__.py
new file mode 100644
index 0000000..db092ec
--- /dev/null
+++ b/scientific-skills/document-skills/pptx/ooxml/scripts/validation/__init__.py
@@ -0,0 +1,15 @@
+"""
+Validation modules for Word document processing.
+"""
+
+from .base import BaseSchemaValidator
+from .docx import DOCXSchemaValidator
+from .pptx import PPTXSchemaValidator
+from .redlining import RedliningValidator
+
+__all__ = [
+ "BaseSchemaValidator",
+ "DOCXSchemaValidator",
+ "PPTXSchemaValidator",
+ "RedliningValidator",
+]
diff --git a/scientific-skills/document-skills/pptx/ooxml/scripts/validation/base.py b/scientific-skills/document-skills/pptx/ooxml/scripts/validation/base.py
new file mode 100644
index 0000000..0681b19
--- /dev/null
+++ b/scientific-skills/document-skills/pptx/ooxml/scripts/validation/base.py
@@ -0,0 +1,951 @@
+"""
+Base validator with common validation logic for document files.
+"""
+
+import re
+from pathlib import Path
+
+import lxml.etree
+
+
+class BaseSchemaValidator:
+ """Base validator with common validation logic for document files."""
+
+ # Elements whose 'id' attributes must be unique within their file
+ # Format: element_name -> (attribute_name, scope)
+ # scope can be 'file' (unique within file) or 'global' (unique across all files)
+ UNIQUE_ID_REQUIREMENTS = {
+ # Word elements
+ "comment": ("id", "file"), # Comment IDs in comments.xml
+ "commentrangestart": ("id", "file"), # Must match comment IDs
+ "commentrangeend": ("id", "file"), # Must match comment IDs
+ "bookmarkstart": ("id", "file"), # Bookmark start IDs
+ "bookmarkend": ("id", "file"), # Bookmark end IDs
+ # Note: ins and del (track changes) can share IDs when part of same revision
+ # PowerPoint elements
+ "sldid": ("id", "file"), # Slide IDs in presentation.xml
+ "sldmasterid": ("id", "global"), # Slide master IDs must be globally unique
+ "sldlayoutid": ("id", "global"), # Slide layout IDs must be globally unique
+ "cm": ("authorid", "file"), # Comment author IDs
+ # Excel elements
+ "sheet": ("sheetid", "file"), # Sheet IDs in workbook.xml
+ "definedname": ("id", "file"), # Named range IDs
+ # Drawing/Shape elements (all formats)
+ "cxnsp": ("id", "file"), # Connection shape IDs
+ "sp": ("id", "file"), # Shape IDs
+ "pic": ("id", "file"), # Picture IDs
+ "grpsp": ("id", "file"), # Group shape IDs
+ }
+
+ # Mapping of element names to expected relationship types
+ # Subclasses should override this with format-specific mappings
+ ELEMENT_RELATIONSHIP_TYPES = {}
+
+ # Unified schema mappings for all Office document types
+ SCHEMA_MAPPINGS = {
+ # Document type specific schemas
+ "word": "ISO-IEC29500-4_2016/wml.xsd", # Word documents
+ "ppt": "ISO-IEC29500-4_2016/pml.xsd", # PowerPoint presentations
+ "xl": "ISO-IEC29500-4_2016/sml.xsd", # Excel spreadsheets
+ # Common file types
+ "[Content_Types].xml": "ecma/fouth-edition/opc-contentTypes.xsd",
+ "app.xml": "ISO-IEC29500-4_2016/shared-documentPropertiesExtended.xsd",
+ "core.xml": "ecma/fouth-edition/opc-coreProperties.xsd",
+ "custom.xml": "ISO-IEC29500-4_2016/shared-documentPropertiesCustom.xsd",
+ ".rels": "ecma/fouth-edition/opc-relationships.xsd",
+ # Word-specific files
+ "people.xml": "microsoft/wml-2012.xsd",
+ "commentsIds.xml": "microsoft/wml-cid-2016.xsd",
+ "commentsExtensible.xml": "microsoft/wml-cex-2018.xsd",
+ "commentsExtended.xml": "microsoft/wml-2012.xsd",
+ # Chart files (common across document types)
+ "chart": "ISO-IEC29500-4_2016/dml-chart.xsd",
+ # Theme files (common across document types)
+ "theme": "ISO-IEC29500-4_2016/dml-main.xsd",
+ # Drawing and media files
+ "drawing": "ISO-IEC29500-4_2016/dml-main.xsd",
+ }
+
+ # Unified namespace constants
+ MC_NAMESPACE = "http://schemas.openxmlformats.org/markup-compatibility/2006"
+ XML_NAMESPACE = "http://www.w3.org/XML/1998/namespace"
+
+ # Common OOXML namespaces used across validators
+ PACKAGE_RELATIONSHIPS_NAMESPACE = (
+ "http://schemas.openxmlformats.org/package/2006/relationships"
+ )
+ OFFICE_RELATIONSHIPS_NAMESPACE = (
+ "http://schemas.openxmlformats.org/officeDocument/2006/relationships"
+ )
+ CONTENT_TYPES_NAMESPACE = (
+ "http://schemas.openxmlformats.org/package/2006/content-types"
+ )
+
+ # Folders where we should clean ignorable namespaces
+ MAIN_CONTENT_FOLDERS = {"word", "ppt", "xl"}
+
+ # All allowed OOXML namespaces (superset of all document types)
+ OOXML_NAMESPACES = {
+ "http://schemas.openxmlformats.org/officeDocument/2006/math",
+ "http://schemas.openxmlformats.org/officeDocument/2006/relationships",
+ "http://schemas.openxmlformats.org/schemaLibrary/2006/main",
+ "http://schemas.openxmlformats.org/drawingml/2006/main",
+ "http://schemas.openxmlformats.org/drawingml/2006/chart",
+ "http://schemas.openxmlformats.org/drawingml/2006/chartDrawing",
+ "http://schemas.openxmlformats.org/drawingml/2006/diagram",
+ "http://schemas.openxmlformats.org/drawingml/2006/picture",
+ "http://schemas.openxmlformats.org/drawingml/2006/spreadsheetDrawing",
+ "http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing",
+ "http://schemas.openxmlformats.org/wordprocessingml/2006/main",
+ "http://schemas.openxmlformats.org/presentationml/2006/main",
+ "http://schemas.openxmlformats.org/spreadsheetml/2006/main",
+ "http://schemas.openxmlformats.org/officeDocument/2006/sharedTypes",
+ "http://www.w3.org/XML/1998/namespace",
+ }
+
+ def __init__(self, unpacked_dir, original_file, verbose=False):
+ self.unpacked_dir = Path(unpacked_dir).resolve()
+ self.original_file = Path(original_file)
+ self.verbose = verbose
+
+ # Set schemas directory
+ self.schemas_dir = Path(__file__).parent.parent.parent / "schemas"
+
+ # Get all XML and .rels files
+ patterns = ["*.xml", "*.rels"]
+ self.xml_files = [
+ f for pattern in patterns for f in self.unpacked_dir.rglob(pattern)
+ ]
+
+ if not self.xml_files:
+ print(f"Warning: No XML files found in {self.unpacked_dir}")
+
+ def validate(self):
+ """Run all validation checks and return True if all pass."""
+ raise NotImplementedError("Subclasses must implement the validate method")
+
+ def validate_xml(self):
+ """Validate that all XML files are well-formed."""
+ errors = []
+
+ for xml_file in self.xml_files:
+ try:
+ # Try to parse the XML file
+ lxml.etree.parse(str(xml_file))
+ except lxml.etree.XMLSyntaxError as e:
+ errors.append(
+ f" {xml_file.relative_to(self.unpacked_dir)}: "
+ f"Line {e.lineno}: {e.msg}"
+ )
+ except Exception as e:
+ errors.append(
+ f" {xml_file.relative_to(self.unpacked_dir)}: "
+ f"Unexpected error: {str(e)}"
+ )
+
+ if errors:
+ print(f"FAILED - Found {len(errors)} XML violations:")
+ for error in errors:
+ print(error)
+ return False
+ else:
+ if self.verbose:
+ print("PASSED - All XML files are well-formed")
+ return True
+
+ def validate_namespaces(self):
+ """Validate that namespace prefixes in Ignorable attributes are declared."""
+ errors = []
+
+ for xml_file in self.xml_files:
+ try:
+ root = lxml.etree.parse(str(xml_file)).getroot()
+ declared = set(root.nsmap.keys()) - {None} # Exclude default namespace
+
+ for attr_val in [
+ v for k, v in root.attrib.items() if k.endswith("Ignorable")
+ ]:
+ undeclared = set(attr_val.split()) - declared
+ errors.extend(
+ f" {xml_file.relative_to(self.unpacked_dir)}: "
+ f"Namespace '{ns}' in Ignorable but not declared"
+ for ns in undeclared
+ )
+ except lxml.etree.XMLSyntaxError:
+ continue
+
+ if errors:
+ print(f"FAILED - {len(errors)} namespace issues:")
+ for error in errors:
+ print(error)
+ return False
+ if self.verbose:
+ print("PASSED - All namespace prefixes properly declared")
+ return True
+
+ def validate_unique_ids(self):
+ """Validate that specific IDs are unique according to OOXML requirements."""
+ errors = []
+ global_ids = {} # Track globally unique IDs across all files
+
+ for xml_file in self.xml_files:
+ try:
+ root = lxml.etree.parse(str(xml_file)).getroot()
+ file_ids = {} # Track IDs that must be unique within this file
+
+ # Remove all mc:AlternateContent elements from the tree
+ mc_elements = root.xpath(
+ ".//mc:AlternateContent", namespaces={"mc": self.MC_NAMESPACE}
+ )
+ for elem in mc_elements:
+ elem.getparent().remove(elem)
+
+ # Now check IDs in the cleaned tree
+ for elem in root.iter():
+ # Get the element name without namespace
+ tag = (
+ elem.tag.split("}")[-1].lower()
+ if "}" in elem.tag
+ else elem.tag.lower()
+ )
+
+ # Check if this element type has ID uniqueness requirements
+ if tag in self.UNIQUE_ID_REQUIREMENTS:
+ attr_name, scope = self.UNIQUE_ID_REQUIREMENTS[tag]
+
+ # Look for the specified attribute
+ id_value = None
+ for attr, value in elem.attrib.items():
+ attr_local = (
+ attr.split("}")[-1].lower()
+ if "}" in attr
+ else attr.lower()
+ )
+ if attr_local == attr_name:
+ id_value = value
+ break
+
+ if id_value is not None:
+ if scope == "global":
+ # Check global uniqueness
+ if id_value in global_ids:
+ prev_file, prev_line, prev_tag = global_ids[
+ id_value
+ ]
+ errors.append(
+ f" {xml_file.relative_to(self.unpacked_dir)}: "
+ f"Line {elem.sourceline}: Global ID '{id_value}' in <{tag}> "
+ f"already used in {prev_file} at line {prev_line} in <{prev_tag}>"
+ )
+ else:
+ global_ids[id_value] = (
+ xml_file.relative_to(self.unpacked_dir),
+ elem.sourceline,
+ tag,
+ )
+ elif scope == "file":
+ # Check file-level uniqueness
+ key = (tag, attr_name)
+ if key not in file_ids:
+ file_ids[key] = {}
+
+ if id_value in file_ids[key]:
+ prev_line = file_ids[key][id_value]
+ errors.append(
+ f" {xml_file.relative_to(self.unpacked_dir)}: "
+ f"Line {elem.sourceline}: Duplicate {attr_name}='{id_value}' in <{tag}> "
+ f"(first occurrence at line {prev_line})"
+ )
+ else:
+ file_ids[key][id_value] = elem.sourceline
+
+ except (lxml.etree.XMLSyntaxError, Exception) as e:
+ errors.append(
+ f" {xml_file.relative_to(self.unpacked_dir)}: Error: {e}"
+ )
+
+ if errors:
+ print(f"FAILED - Found {len(errors)} ID uniqueness violations:")
+ for error in errors:
+ print(error)
+ return False
+ else:
+ if self.verbose:
+ print("PASSED - All required IDs are unique")
+ return True
+
+ def validate_file_references(self):
+ """
+ Validate that all .rels files properly reference files and that all files are referenced.
+ """
+ errors = []
+
+ # Find all .rels files
+ rels_files = list(self.unpacked_dir.rglob("*.rels"))
+
+ if not rels_files:
+ if self.verbose:
+ print("PASSED - No .rels files found")
+ return True
+
+ # Get all files in the unpacked directory (excluding reference files)
+ all_files = []
+ for file_path in self.unpacked_dir.rglob("*"):
+ if (
+ file_path.is_file()
+ and file_path.name != "[Content_Types].xml"
+ and not file_path.name.endswith(".rels")
+ ): # This file is not referenced by .rels
+ all_files.append(file_path.resolve())
+
+ # Track all files that are referenced by any .rels file
+ all_referenced_files = set()
+
+ if self.verbose:
+ print(
+ f"Found {len(rels_files)} .rels files and {len(all_files)} target files"
+ )
+
+ # Check each .rels file
+ for rels_file in rels_files:
+ try:
+ # Parse relationships file
+ rels_root = lxml.etree.parse(str(rels_file)).getroot()
+
+ # Get the directory where this .rels file is located
+ rels_dir = rels_file.parent
+
+ # Find all relationships and their targets
+ referenced_files = set()
+ broken_refs = []
+
+ for rel in rels_root.findall(
+ ".//ns:Relationship",
+ namespaces={"ns": self.PACKAGE_RELATIONSHIPS_NAMESPACE},
+ ):
+ target = rel.get("Target")
+ if target and not target.startswith(
+ ("http", "mailto:")
+ ): # Skip external URLs
+ # Resolve the target path relative to the .rels file location
+ if rels_file.name == ".rels":
+ # Root .rels file - targets are relative to unpacked_dir
+ target_path = self.unpacked_dir / target
+ else:
+ # Other .rels files - targets are relative to their parent's parent
+ # e.g., word/_rels/document.xml.rels -> targets relative to word/
+ base_dir = rels_dir.parent
+ target_path = base_dir / target
+
+ # Normalize the path and check if it exists
+ try:
+ target_path = target_path.resolve()
+ if target_path.exists() and target_path.is_file():
+ referenced_files.add(target_path)
+ all_referenced_files.add(target_path)
+ else:
+ broken_refs.append((target, rel.sourceline))
+ except (OSError, ValueError):
+ broken_refs.append((target, rel.sourceline))
+
+ # Report broken references
+ if broken_refs:
+ rel_path = rels_file.relative_to(self.unpacked_dir)
+ for broken_ref, line_num in broken_refs:
+ errors.append(
+ f" {rel_path}: Line {line_num}: Broken reference to {broken_ref}"
+ )
+
+ except Exception as e:
+ rel_path = rels_file.relative_to(self.unpacked_dir)
+ errors.append(f" Error parsing {rel_path}: {e}")
+
+ # Check for unreferenced files (files that exist but are not referenced anywhere)
+ unreferenced_files = set(all_files) - all_referenced_files
+
+ if unreferenced_files:
+ for unref_file in sorted(unreferenced_files):
+ unref_rel_path = unref_file.relative_to(self.unpacked_dir)
+ errors.append(f" Unreferenced file: {unref_rel_path}")
+
+ if errors:
+ print(f"FAILED - Found {len(errors)} relationship validation errors:")
+ for error in errors:
+ print(error)
+ print(
+ "CRITICAL: These errors will cause the document to appear corrupt. "
+ + "Broken references MUST be fixed, "
+ + "and unreferenced files MUST be referenced or removed."
+ )
+ return False
+ else:
+ if self.verbose:
+ print(
+ "PASSED - All references are valid and all files are properly referenced"
+ )
+ return True
+
+ def validate_all_relationship_ids(self):
+ """
+ Validate that all r:id attributes in XML files reference existing IDs
+ in their corresponding .rels files, and optionally validate relationship types.
+ """
+ import lxml.etree
+
+ errors = []
+
+ # Process each XML file that might contain r:id references
+ for xml_file in self.xml_files:
+ # Skip .rels files themselves
+ if xml_file.suffix == ".rels":
+ continue
+
+ # Determine the corresponding .rels file
+ # For dir/file.xml, it's dir/_rels/file.xml.rels
+ rels_dir = xml_file.parent / "_rels"
+ rels_file = rels_dir / f"{xml_file.name}.rels"
+
+ # Skip if there's no corresponding .rels file (that's okay)
+ if not rels_file.exists():
+ continue
+
+ try:
+ # Parse the .rels file to get valid relationship IDs and their types
+ rels_root = lxml.etree.parse(str(rels_file)).getroot()
+ rid_to_type = {}
+
+ for rel in rels_root.findall(
+ f".//{{{self.PACKAGE_RELATIONSHIPS_NAMESPACE}}}Relationship"
+ ):
+ rid = rel.get("Id")
+ rel_type = rel.get("Type", "")
+ if rid:
+ # Check for duplicate rIds
+ if rid in rid_to_type:
+ rels_rel_path = rels_file.relative_to(self.unpacked_dir)
+ errors.append(
+ f" {rels_rel_path}: Line {rel.sourceline}: "
+ f"Duplicate relationship ID '{rid}' (IDs must be unique)"
+ )
+ # Extract just the type name from the full URL
+ type_name = (
+ rel_type.split("/")[-1] if "/" in rel_type else rel_type
+ )
+ rid_to_type[rid] = type_name
+
+ # Parse the XML file to find all r:id references
+ xml_root = lxml.etree.parse(str(xml_file)).getroot()
+
+ # Find all elements with r:id attributes
+ for elem in xml_root.iter():
+ # Check for r:id attribute (relationship ID)
+ rid_attr = elem.get(f"{{{self.OFFICE_RELATIONSHIPS_NAMESPACE}}}id")
+ if rid_attr:
+ xml_rel_path = xml_file.relative_to(self.unpacked_dir)
+ elem_name = (
+ elem.tag.split("}")[-1] if "}" in elem.tag else elem.tag
+ )
+
+ # Check if the ID exists
+ if rid_attr not in rid_to_type:
+ errors.append(
+ f" {xml_rel_path}: Line {elem.sourceline}: "
+ f"<{elem_name}> references non-existent relationship '{rid_attr}' "
+ f"(valid IDs: {', '.join(sorted(rid_to_type.keys())[:5])}{'...' if len(rid_to_type) > 5 else ''})"
+ )
+ # Check if we have type expectations for this element
+ elif self.ELEMENT_RELATIONSHIP_TYPES:
+ expected_type = self._get_expected_relationship_type(
+ elem_name
+ )
+ if expected_type:
+ actual_type = rid_to_type[rid_attr]
+ # Check if the actual type matches or contains the expected type
+ if expected_type not in actual_type.lower():
+ errors.append(
+ f" {xml_rel_path}: Line {elem.sourceline}: "
+ f"<{elem_name}> references '{rid_attr}' which points to '{actual_type}' "
+ f"but should point to a '{expected_type}' relationship"
+ )
+
+ except Exception as e:
+ xml_rel_path = xml_file.relative_to(self.unpacked_dir)
+ errors.append(f" Error processing {xml_rel_path}: {e}")
+
+ if errors:
+ print(f"FAILED - Found {len(errors)} relationship ID reference errors:")
+ for error in errors:
+ print(error)
+ print("\nThese ID mismatches will cause the document to appear corrupt!")
+ return False
+ else:
+ if self.verbose:
+ print("PASSED - All relationship ID references are valid")
+ return True
+
+ def _get_expected_relationship_type(self, element_name):
+ """
+ Get the expected relationship type for an element.
+ First checks the explicit mapping, then tries pattern detection.
+ """
+ # Normalize element name to lowercase
+ elem_lower = element_name.lower()
+
+ # Check explicit mapping first
+ if elem_lower in self.ELEMENT_RELATIONSHIP_TYPES:
+ return self.ELEMENT_RELATIONSHIP_TYPES[elem_lower]
+
+ # Try pattern detection for common patterns
+ # Pattern 1: Elements ending in "Id" often expect a relationship of the prefix type
+ if elem_lower.endswith("id") and len(elem_lower) > 2:
+ # e.g., "sldId" -> "sld", "sldMasterId" -> "sldMaster"
+ prefix = elem_lower[:-2] # Remove "id"
+ # Check if this might be a compound like "sldMasterId"
+ if prefix.endswith("master"):
+ return prefix.lower()
+ elif prefix.endswith("layout"):
+ return prefix.lower()
+ else:
+ # Simple case like "sldId" -> "slide"
+ # Common transformations
+ if prefix == "sld":
+ return "slide"
+ return prefix.lower()
+
+ # Pattern 2: Elements ending in "Reference" expect a relationship of the prefix type
+ if elem_lower.endswith("reference") and len(elem_lower) > 9:
+ prefix = elem_lower[:-9] # Remove "reference"
+ return prefix.lower()
+
+ return None
+
+ def validate_content_types(self):
+ """Validate that all content files are properly declared in [Content_Types].xml."""
+ errors = []
+
+ # Find [Content_Types].xml file
+ content_types_file = self.unpacked_dir / "[Content_Types].xml"
+ if not content_types_file.exists():
+ print("FAILED - [Content_Types].xml file not found")
+ return False
+
+ try:
+ # Parse and get all declared parts and extensions
+ root = lxml.etree.parse(str(content_types_file)).getroot()
+ declared_parts = set()
+ declared_extensions = set()
+
+ # Get Override declarations (specific files)
+ for override in root.findall(
+ f".//{{{self.CONTENT_TYPES_NAMESPACE}}}Override"
+ ):
+ part_name = override.get("PartName")
+ if part_name is not None:
+ declared_parts.add(part_name.lstrip("/"))
+
+ # Get Default declarations (by extension)
+ for default in root.findall(
+ f".//{{{self.CONTENT_TYPES_NAMESPACE}}}Default"
+ ):
+ extension = default.get("Extension")
+ if extension is not None:
+ declared_extensions.add(extension.lower())
+
+ # Root elements that require content type declaration
+ declarable_roots = {
+ "sld",
+ "sldLayout",
+ "sldMaster",
+ "presentation", # PowerPoint
+ "document", # Word
+ "workbook",
+ "worksheet", # Excel
+ "theme", # Common
+ }
+
+ # Common media file extensions that should be declared
+ media_extensions = {
+ "png": "image/png",
+ "jpg": "image/jpeg",
+ "jpeg": "image/jpeg",
+ "gif": "image/gif",
+ "bmp": "image/bmp",
+ "tiff": "image/tiff",
+ "wmf": "image/x-wmf",
+ "emf": "image/x-emf",
+ }
+
+ # Get all files in the unpacked directory
+ all_files = list(self.unpacked_dir.rglob("*"))
+ all_files = [f for f in all_files if f.is_file()]
+
+ # Check all XML files for Override declarations
+ for xml_file in self.xml_files:
+ path_str = str(xml_file.relative_to(self.unpacked_dir)).replace(
+ "\\", "/"
+ )
+
+ # Skip non-content files
+ if any(
+ skip in path_str
+ for skip in [".rels", "[Content_Types]", "docProps/", "_rels/"]
+ ):
+ continue
+
+ try:
+ root_tag = lxml.etree.parse(str(xml_file)).getroot().tag
+ root_name = root_tag.split("}")[-1] if "}" in root_tag else root_tag
+
+ if root_name in declarable_roots and path_str not in declared_parts:
+ errors.append(
+ f" {path_str}: File with <{root_name}> root not declared in [Content_Types].xml"
+ )
+
+ except Exception:
+ continue # Skip unparseable files
+
+ # Check all non-XML files for Default extension declarations
+ for file_path in all_files:
+ # Skip XML files and metadata files (already checked above)
+ if file_path.suffix.lower() in {".xml", ".rels"}:
+ continue
+ if file_path.name == "[Content_Types].xml":
+ continue
+ if "_rels" in file_path.parts or "docProps" in file_path.parts:
+ continue
+
+ extension = file_path.suffix.lstrip(".").lower()
+ if extension and extension not in declared_extensions:
+ # Check if it's a known media extension that should be declared
+ if extension in media_extensions:
+ relative_path = file_path.relative_to(self.unpacked_dir)
+ errors.append(
+ f' {relative_path}: File with extension \'{extension}\' not declared in [Content_Types].xml - should add: '
+ )
+
+ except Exception as e:
+ errors.append(f" Error parsing [Content_Types].xml: {e}")
+
+ if errors:
+ print(f"FAILED - Found {len(errors)} content type declaration errors:")
+ for error in errors:
+ print(error)
+ return False
+ else:
+ if self.verbose:
+ print(
+ "PASSED - All content files are properly declared in [Content_Types].xml"
+ )
+ return True
+
+ def validate_file_against_xsd(self, xml_file, verbose=False):
+ """Validate a single XML file against XSD schema, comparing with original.
+
+ Args:
+ xml_file: Path to XML file to validate
+ verbose: Enable verbose output
+
+ Returns:
+ tuple: (is_valid, new_errors_set) where is_valid is True/False/None (skipped)
+ """
+ # Resolve both paths to handle symlinks
+ xml_file = Path(xml_file).resolve()
+ unpacked_dir = self.unpacked_dir.resolve()
+
+ # Validate current file
+ is_valid, current_errors = self._validate_single_file_xsd(
+ xml_file, unpacked_dir
+ )
+
+ if is_valid is None:
+ return None, set() # Skipped
+ elif is_valid:
+ return True, set() # Valid, no errors
+
+ # Get errors from original file for this specific file
+ original_errors = self._get_original_file_errors(xml_file)
+
+ # Compare with original (both are guaranteed to be sets here)
+ assert current_errors is not None
+ new_errors = current_errors - original_errors
+
+ if new_errors:
+ if verbose:
+ relative_path = xml_file.relative_to(unpacked_dir)
+ print(f"FAILED - {relative_path}: {len(new_errors)} new error(s)")
+ for error in list(new_errors)[:3]:
+ truncated = error[:250] + "..." if len(error) > 250 else error
+ print(f" - {truncated}")
+ return False, new_errors
+ else:
+ # All errors existed in original
+ if verbose:
+ print(
+ f"PASSED - No new errors (original had {len(current_errors)} errors)"
+ )
+ return True, set()
+
+ def validate_against_xsd(self):
+ """Validate XML files against XSD schemas, showing only new errors compared to original."""
+ new_errors = []
+ original_error_count = 0
+ valid_count = 0
+ skipped_count = 0
+
+ for xml_file in self.xml_files:
+ relative_path = str(xml_file.relative_to(self.unpacked_dir))
+ is_valid, new_file_errors = self.validate_file_against_xsd(
+ xml_file, verbose=False
+ )
+
+ if is_valid is None:
+ skipped_count += 1
+ continue
+ elif is_valid and not new_file_errors:
+ valid_count += 1
+ continue
+ elif is_valid:
+ # Had errors but all existed in original
+ original_error_count += 1
+ valid_count += 1
+ continue
+
+ # Has new errors
+ new_errors.append(f" {relative_path}: {len(new_file_errors)} new error(s)")
+ for error in list(new_file_errors)[:3]: # Show first 3 errors
+ new_errors.append(
+ f" - {error[:250]}..." if len(error) > 250 else f" - {error}"
+ )
+
+ # Print summary
+ if self.verbose:
+ print(f"Validated {len(self.xml_files)} files:")
+ print(f" - Valid: {valid_count}")
+ print(f" - Skipped (no schema): {skipped_count}")
+ if original_error_count:
+ print(f" - With original errors (ignored): {original_error_count}")
+ print(
+ f" - With NEW errors: {len(new_errors) > 0 and len([e for e in new_errors if not e.startswith(' ')]) or 0}"
+ )
+
+ if new_errors:
+ print("\nFAILED - Found NEW validation errors:")
+ for error in new_errors:
+ print(error)
+ return False
+ else:
+ if self.verbose:
+ print("\nPASSED - No new XSD validation errors introduced")
+ return True
+
+ def _get_schema_path(self, xml_file):
+ """Determine the appropriate schema path for an XML file."""
+ # Check exact filename match
+ if xml_file.name in self.SCHEMA_MAPPINGS:
+ return self.schemas_dir / self.SCHEMA_MAPPINGS[xml_file.name]
+
+ # Check .rels files
+ if xml_file.suffix == ".rels":
+ return self.schemas_dir / self.SCHEMA_MAPPINGS[".rels"]
+
+ # Check chart files
+ if "charts/" in str(xml_file) and xml_file.name.startswith("chart"):
+ return self.schemas_dir / self.SCHEMA_MAPPINGS["chart"]
+
+ # Check theme files
+ if "theme/" in str(xml_file) and xml_file.name.startswith("theme"):
+ return self.schemas_dir / self.SCHEMA_MAPPINGS["theme"]
+
+ # Check if file is in a main content folder and use appropriate schema
+ if xml_file.parent.name in self.MAIN_CONTENT_FOLDERS:
+ return self.schemas_dir / self.SCHEMA_MAPPINGS[xml_file.parent.name]
+
+ return None
+
+ def _clean_ignorable_namespaces(self, xml_doc):
+ """Remove attributes and elements not in allowed namespaces."""
+ # Create a clean copy
+ xml_string = lxml.etree.tostring(xml_doc, encoding="unicode")
+ xml_copy = lxml.etree.fromstring(xml_string)
+
+ # Remove attributes not in allowed namespaces
+ for elem in xml_copy.iter():
+ attrs_to_remove = []
+
+ for attr in elem.attrib:
+ # Check if attribute is from a namespace other than allowed ones
+ if "{" in attr:
+ ns = attr.split("}")[0][1:]
+ if ns not in self.OOXML_NAMESPACES:
+ attrs_to_remove.append(attr)
+
+ # Remove collected attributes
+ for attr in attrs_to_remove:
+ del elem.attrib[attr]
+
+ # Remove elements not in allowed namespaces
+ self._remove_ignorable_elements(xml_copy)
+
+ return lxml.etree.ElementTree(xml_copy)
+
+ def _remove_ignorable_elements(self, root):
+ """Recursively remove all elements not in allowed namespaces."""
+ elements_to_remove = []
+
+ # Find elements to remove
+ for elem in list(root):
+ # Skip non-element nodes (comments, processing instructions, etc.)
+ if not hasattr(elem, "tag") or callable(elem.tag):
+ continue
+
+ tag_str = str(elem.tag)
+ if tag_str.startswith("{"):
+ ns = tag_str.split("}")[0][1:]
+ if ns not in self.OOXML_NAMESPACES:
+ elements_to_remove.append(elem)
+ continue
+
+ # Recursively clean child elements
+ self._remove_ignorable_elements(elem)
+
+ # Remove collected elements
+ for elem in elements_to_remove:
+ root.remove(elem)
+
+ def _preprocess_for_mc_ignorable(self, xml_doc):
+ """Preprocess XML to handle mc:Ignorable attribute properly."""
+ # Remove mc:Ignorable attributes before validation
+ root = xml_doc.getroot()
+
+ # Remove mc:Ignorable attribute from root
+ if f"{{{self.MC_NAMESPACE}}}Ignorable" in root.attrib:
+ del root.attrib[f"{{{self.MC_NAMESPACE}}}Ignorable"]
+
+ return xml_doc
+
+ def _validate_single_file_xsd(self, xml_file, base_path):
+ """Validate a single XML file against XSD schema. Returns (is_valid, errors_set)."""
+ schema_path = self._get_schema_path(xml_file)
+ if not schema_path:
+ return None, None # Skip file
+
+ try:
+ # Load schema
+ with open(schema_path, "rb") as xsd_file:
+ parser = lxml.etree.XMLParser()
+ xsd_doc = lxml.etree.parse(
+ xsd_file, parser=parser, base_url=str(schema_path)
+ )
+ schema = lxml.etree.XMLSchema(xsd_doc)
+
+ # Load and preprocess XML
+ with open(xml_file, "r") as f:
+ xml_doc = lxml.etree.parse(f)
+
+ xml_doc, _ = self._remove_template_tags_from_text_nodes(xml_doc)
+ xml_doc = self._preprocess_for_mc_ignorable(xml_doc)
+
+ # Clean ignorable namespaces if needed
+ relative_path = xml_file.relative_to(base_path)
+ if (
+ relative_path.parts
+ and relative_path.parts[0] in self.MAIN_CONTENT_FOLDERS
+ ):
+ xml_doc = self._clean_ignorable_namespaces(xml_doc)
+
+ # Validate
+ if schema.validate(xml_doc):
+ return True, set()
+ else:
+ errors = set()
+ for error in schema.error_log:
+ # Store normalized error message (without line numbers for comparison)
+ errors.add(error.message)
+ return False, errors
+
+ except Exception as e:
+ return False, {str(e)}
+
+ def _get_original_file_errors(self, xml_file):
+ """Get XSD validation errors from a single file in the original document.
+
+ Args:
+ xml_file: Path to the XML file in unpacked_dir to check
+
+ Returns:
+ set: Set of error messages from the original file
+ """
+ import tempfile
+ import zipfile
+
+ # Resolve both paths to handle symlinks (e.g., /var vs /private/var on macOS)
+ xml_file = Path(xml_file).resolve()
+ unpacked_dir = self.unpacked_dir.resolve()
+ relative_path = xml_file.relative_to(unpacked_dir)
+
+ with tempfile.TemporaryDirectory() as temp_dir:
+ temp_path = Path(temp_dir)
+
+ # Extract original file
+ with zipfile.ZipFile(self.original_file, "r") as zip_ref:
+ zip_ref.extractall(temp_path)
+
+ # Find corresponding file in original
+ original_xml_file = temp_path / relative_path
+
+ if not original_xml_file.exists():
+ # File didn't exist in original, so no original errors
+ return set()
+
+ # Validate the specific file in original
+ is_valid, errors = self._validate_single_file_xsd(
+ original_xml_file, temp_path
+ )
+ return errors if errors else set()
+
+ def _remove_template_tags_from_text_nodes(self, xml_doc):
+ """Remove template tags from XML text nodes and collect warnings.
+
+ Template tags follow the pattern {{ ... }} and are used as placeholders
+ for content replacement. They should be removed from text content before
+ XSD validation while preserving XML structure.
+
+ Returns:
+ tuple: (cleaned_xml_doc, warnings_list)
+ """
+ warnings = []
+ template_pattern = re.compile(r"\{\{[^}]*\}\}")
+
+ # Create a copy of the document to avoid modifying the original
+ xml_string = lxml.etree.tostring(xml_doc, encoding="unicode")
+ xml_copy = lxml.etree.fromstring(xml_string)
+
+ def process_text_content(text, content_type):
+ if not text:
+ return text
+ matches = list(template_pattern.finditer(text))
+ if matches:
+ for match in matches:
+ warnings.append(
+ f"Found template tag in {content_type}: {match.group()}"
+ )
+ return template_pattern.sub("", text)
+ return text
+
+ # Process all text nodes in the document
+ for elem in xml_copy.iter():
+ # Skip processing if this is a w:t element
+ if not hasattr(elem, "tag") or callable(elem.tag):
+ continue
+ tag_str = str(elem.tag)
+ if tag_str.endswith("}t") or tag_str == "t":
+ continue
+
+ elem.text = process_text_content(elem.text, "text content")
+ elem.tail = process_text_content(elem.tail, "tail content")
+
+ return lxml.etree.ElementTree(xml_copy), warnings
+
+
+if __name__ == "__main__":
+ raise RuntimeError("This module should not be run directly.")
diff --git a/scientific-skills/document-skills/pptx/ooxml/scripts/validation/docx.py b/scientific-skills/document-skills/pptx/ooxml/scripts/validation/docx.py
new file mode 100644
index 0000000..602c470
--- /dev/null
+++ b/scientific-skills/document-skills/pptx/ooxml/scripts/validation/docx.py
@@ -0,0 +1,274 @@
+"""
+Validator for Word document XML files against XSD schemas.
+"""
+
+import re
+import tempfile
+import zipfile
+
+import lxml.etree
+
+from .base import BaseSchemaValidator
+
+
+class DOCXSchemaValidator(BaseSchemaValidator):
+ """Validator for Word document XML files against XSD schemas."""
+
+ # Word-specific namespace
+ WORD_2006_NAMESPACE = "http://schemas.openxmlformats.org/wordprocessingml/2006/main"
+
+ # Word-specific element to relationship type mappings
+ # Start with empty mapping - add specific cases as we discover them
+ ELEMENT_RELATIONSHIP_TYPES = {}
+
+ def validate(self):
+ """Run all validation checks and return True if all pass."""
+ # Test 0: XML well-formedness
+ if not self.validate_xml():
+ return False
+
+ # Test 1: Namespace declarations
+ all_valid = True
+ if not self.validate_namespaces():
+ all_valid = False
+
+ # Test 2: Unique IDs
+ if not self.validate_unique_ids():
+ all_valid = False
+
+ # Test 3: Relationship and file reference validation
+ if not self.validate_file_references():
+ all_valid = False
+
+ # Test 4: Content type declarations
+ if not self.validate_content_types():
+ all_valid = False
+
+ # Test 5: XSD schema validation
+ if not self.validate_against_xsd():
+ all_valid = False
+
+ # Test 6: Whitespace preservation
+ if not self.validate_whitespace_preservation():
+ all_valid = False
+
+ # Test 7: Deletion validation
+ if not self.validate_deletions():
+ all_valid = False
+
+ # Test 8: Insertion validation
+ if not self.validate_insertions():
+ all_valid = False
+
+ # Test 9: Relationship ID reference validation
+ if not self.validate_all_relationship_ids():
+ all_valid = False
+
+ # Count and compare paragraphs
+ self.compare_paragraph_counts()
+
+ return all_valid
+
+ def validate_whitespace_preservation(self):
+ """
+ Validate that w:t elements with whitespace have xml:space='preserve'.
+ """
+ errors = []
+
+ for xml_file in self.xml_files:
+ # Only check document.xml files
+ if xml_file.name != "document.xml":
+ continue
+
+ try:
+ root = lxml.etree.parse(str(xml_file)).getroot()
+
+ # Find all w:t elements
+ for elem in root.iter(f"{{{self.WORD_2006_NAMESPACE}}}t"):
+ if elem.text:
+ text = elem.text
+ # Check if text starts or ends with whitespace
+ if re.match(r"^\s.*", text) or re.match(r".*\s$", text):
+ # Check if xml:space="preserve" attribute exists
+ xml_space_attr = f"{{{self.XML_NAMESPACE}}}space"
+ if (
+ xml_space_attr not in elem.attrib
+ or elem.attrib[xml_space_attr] != "preserve"
+ ):
+ # Show a preview of the text
+ text_preview = (
+ repr(text)[:50] + "..."
+ if len(repr(text)) > 50
+ else repr(text)
+ )
+ errors.append(
+ f" {xml_file.relative_to(self.unpacked_dir)}: "
+ f"Line {elem.sourceline}: w:t element with whitespace missing xml:space='preserve': {text_preview}"
+ )
+
+ except (lxml.etree.XMLSyntaxError, Exception) as e:
+ errors.append(
+ f" {xml_file.relative_to(self.unpacked_dir)}: Error: {e}"
+ )
+
+ if errors:
+ print(f"FAILED - Found {len(errors)} whitespace preservation violations:")
+ for error in errors:
+ print(error)
+ return False
+ else:
+ if self.verbose:
+ print("PASSED - All whitespace is properly preserved")
+ return True
+
+ def validate_deletions(self):
+ """
+ Validate that w:t elements are not within w:del elements.
+ For some reason, XSD validation does not catch this, so we do it manually.
+ """
+ errors = []
+
+ for xml_file in self.xml_files:
+ # Only check document.xml files
+ if xml_file.name != "document.xml":
+ continue
+
+ try:
+ root = lxml.etree.parse(str(xml_file)).getroot()
+
+ # Find all w:t elements that are descendants of w:del elements
+ namespaces = {"w": self.WORD_2006_NAMESPACE}
+ xpath_expression = ".//w:del//w:t"
+ problematic_t_elements = root.xpath(
+ xpath_expression, namespaces=namespaces
+ )
+ for t_elem in problematic_t_elements:
+ if t_elem.text:
+ # Show a preview of the text
+ text_preview = (
+ repr(t_elem.text)[:50] + "..."
+ if len(repr(t_elem.text)) > 50
+ else repr(t_elem.text)
+ )
+ errors.append(
+ f" {xml_file.relative_to(self.unpacked_dir)}: "
+ f"Line {t_elem.sourceline}: found within : {text_preview}"
+ )
+
+ except (lxml.etree.XMLSyntaxError, Exception) as e:
+ errors.append(
+ f" {xml_file.relative_to(self.unpacked_dir)}: Error: {e}"
+ )
+
+ if errors:
+ print(f"FAILED - Found {len(errors)} deletion validation violations:")
+ for error in errors:
+ print(error)
+ return False
+ else:
+ if self.verbose:
+ print("PASSED - No w:t elements found within w:del elements")
+ return True
+
+ def count_paragraphs_in_unpacked(self):
+ """Count the number of paragraphs in the unpacked document."""
+ count = 0
+
+ for xml_file in self.xml_files:
+ # Only check document.xml files
+ if xml_file.name != "document.xml":
+ continue
+
+ try:
+ root = lxml.etree.parse(str(xml_file)).getroot()
+ # Count all w:p elements
+ paragraphs = root.findall(f".//{{{self.WORD_2006_NAMESPACE}}}p")
+ count = len(paragraphs)
+ except Exception as e:
+ print(f"Error counting paragraphs in unpacked document: {e}")
+
+ return count
+
+ def count_paragraphs_in_original(self):
+ """Count the number of paragraphs in the original docx file."""
+ count = 0
+
+ try:
+ # Create temporary directory to unpack original
+ with tempfile.TemporaryDirectory() as temp_dir:
+ # Unpack original docx
+ with zipfile.ZipFile(self.original_file, "r") as zip_ref:
+ zip_ref.extractall(temp_dir)
+
+ # Parse document.xml
+ doc_xml_path = temp_dir + "/word/document.xml"
+ root = lxml.etree.parse(doc_xml_path).getroot()
+
+ # Count all w:p elements
+ paragraphs = root.findall(f".//{{{self.WORD_2006_NAMESPACE}}}p")
+ count = len(paragraphs)
+
+ except Exception as e:
+ print(f"Error counting paragraphs in original document: {e}")
+
+ return count
+
+ def validate_insertions(self):
+ """
+ Validate that w:delText elements are not within w:ins elements.
+ w:delText is only allowed in w:ins if nested within a w:del.
+ """
+ errors = []
+
+ for xml_file in self.xml_files:
+ if xml_file.name != "document.xml":
+ continue
+
+ try:
+ root = lxml.etree.parse(str(xml_file)).getroot()
+ namespaces = {"w": self.WORD_2006_NAMESPACE}
+
+ # Find w:delText in w:ins that are NOT within w:del
+ invalid_elements = root.xpath(
+ ".//w:ins//w:delText[not(ancestor::w:del)]",
+ namespaces=namespaces
+ )
+
+ for elem in invalid_elements:
+ text_preview = (
+ repr(elem.text or "")[:50] + "..."
+ if len(repr(elem.text or "")) > 50
+ else repr(elem.text or "")
+ )
+ errors.append(
+ f" {xml_file.relative_to(self.unpacked_dir)}: "
+ f"Line {elem.sourceline}: within : {text_preview}"
+ )
+
+ except (lxml.etree.XMLSyntaxError, Exception) as e:
+ errors.append(
+ f" {xml_file.relative_to(self.unpacked_dir)}: Error: {e}"
+ )
+
+ if errors:
+ print(f"FAILED - Found {len(errors)} insertion validation violations:")
+ for error in errors:
+ print(error)
+ return False
+ else:
+ if self.verbose:
+ print("PASSED - No w:delText elements within w:ins elements")
+ return True
+
+ def compare_paragraph_counts(self):
+ """Compare paragraph counts between original and new document."""
+ original_count = self.count_paragraphs_in_original()
+ new_count = self.count_paragraphs_in_unpacked()
+
+ diff = new_count - original_count
+ diff_str = f"+{diff}" if diff > 0 else str(diff)
+ print(f"\nParagraphs: {original_count} → {new_count} ({diff_str})")
+
+
+if __name__ == "__main__":
+ raise RuntimeError("This module should not be run directly.")
diff --git a/scientific-skills/document-skills/pptx/ooxml/scripts/validation/pptx.py b/scientific-skills/document-skills/pptx/ooxml/scripts/validation/pptx.py
new file mode 100644
index 0000000..66d5b1e
--- /dev/null
+++ b/scientific-skills/document-skills/pptx/ooxml/scripts/validation/pptx.py
@@ -0,0 +1,315 @@
+"""
+Validator for PowerPoint presentation XML files against XSD schemas.
+"""
+
+import re
+
+from .base import BaseSchemaValidator
+
+
+class PPTXSchemaValidator(BaseSchemaValidator):
+ """Validator for PowerPoint presentation XML files against XSD schemas."""
+
+ # PowerPoint presentation namespace
+ PRESENTATIONML_NAMESPACE = (
+ "http://schemas.openxmlformats.org/presentationml/2006/main"
+ )
+
+ # PowerPoint-specific element to relationship type mappings
+ ELEMENT_RELATIONSHIP_TYPES = {
+ "sldid": "slide",
+ "sldmasterid": "slidemaster",
+ "notesmasterid": "notesmaster",
+ "sldlayoutid": "slidelayout",
+ "themeid": "theme",
+ "tablestyleid": "tablestyles",
+ }
+
+ def validate(self):
+ """Run all validation checks and return True if all pass."""
+ # Test 0: XML well-formedness
+ if not self.validate_xml():
+ return False
+
+ # Test 1: Namespace declarations
+ all_valid = True
+ if not self.validate_namespaces():
+ all_valid = False
+
+ # Test 2: Unique IDs
+ if not self.validate_unique_ids():
+ all_valid = False
+
+ # Test 3: UUID ID validation
+ if not self.validate_uuid_ids():
+ all_valid = False
+
+ # Test 4: Relationship and file reference validation
+ if not self.validate_file_references():
+ all_valid = False
+
+ # Test 5: Slide layout ID validation
+ if not self.validate_slide_layout_ids():
+ all_valid = False
+
+ # Test 6: Content type declarations
+ if not self.validate_content_types():
+ all_valid = False
+
+ # Test 7: XSD schema validation
+ if not self.validate_against_xsd():
+ all_valid = False
+
+ # Test 8: Notes slide reference validation
+ if not self.validate_notes_slide_references():
+ all_valid = False
+
+ # Test 9: Relationship ID reference validation
+ if not self.validate_all_relationship_ids():
+ all_valid = False
+
+ # Test 10: Duplicate slide layout references validation
+ if not self.validate_no_duplicate_slide_layouts():
+ all_valid = False
+
+ return all_valid
+
+ def validate_uuid_ids(self):
+ """Validate that ID attributes that look like UUIDs contain only hex values."""
+ import lxml.etree
+
+ errors = []
+ # UUID pattern: 8-4-4-4-12 hex digits with optional braces/hyphens
+ uuid_pattern = re.compile(
+ r"^[\{\(]?[0-9A-Fa-f]{8}-?[0-9A-Fa-f]{4}-?[0-9A-Fa-f]{4}-?[0-9A-Fa-f]{4}-?[0-9A-Fa-f]{12}[\}\)]?$"
+ )
+
+ for xml_file in self.xml_files:
+ try:
+ root = lxml.etree.parse(str(xml_file)).getroot()
+
+ # Check all elements for ID attributes
+ for elem in root.iter():
+ for attr, value in elem.attrib.items():
+ # Check if this is an ID attribute
+ attr_name = attr.split("}")[-1].lower()
+ if attr_name == "id" or attr_name.endswith("id"):
+ # Check if value looks like a UUID (has the right length and pattern structure)
+ if self._looks_like_uuid(value):
+ # Validate that it contains only hex characters in the right positions
+ if not uuid_pattern.match(value):
+ errors.append(
+ f" {xml_file.relative_to(self.unpacked_dir)}: "
+ f"Line {elem.sourceline}: ID '{value}' appears to be a UUID but contains invalid hex characters"
+ )
+
+ except (lxml.etree.XMLSyntaxError, Exception) as e:
+ errors.append(
+ f" {xml_file.relative_to(self.unpacked_dir)}: Error: {e}"
+ )
+
+ if errors:
+ print(f"FAILED - Found {len(errors)} UUID ID validation errors:")
+ for error in errors:
+ print(error)
+ return False
+ else:
+ if self.verbose:
+ print("PASSED - All UUID-like IDs contain valid hex values")
+ return True
+
+ def _looks_like_uuid(self, value):
+ """Check if a value has the general structure of a UUID."""
+ # Remove common UUID delimiters
+ clean_value = value.strip("{}()").replace("-", "")
+ # Check if it's 32 hex-like characters (could include invalid hex chars)
+ return len(clean_value) == 32 and all(c.isalnum() for c in clean_value)
+
+ def validate_slide_layout_ids(self):
+ """Validate that sldLayoutId elements in slide masters reference valid slide layouts."""
+ import lxml.etree
+
+ errors = []
+
+ # Find all slide master files
+ slide_masters = list(self.unpacked_dir.glob("ppt/slideMasters/*.xml"))
+
+ if not slide_masters:
+ if self.verbose:
+ print("PASSED - No slide masters found")
+ return True
+
+ for slide_master in slide_masters:
+ try:
+ # Parse the slide master file
+ root = lxml.etree.parse(str(slide_master)).getroot()
+
+ # Find the corresponding _rels file for this slide master
+ rels_file = slide_master.parent / "_rels" / f"{slide_master.name}.rels"
+
+ if not rels_file.exists():
+ errors.append(
+ f" {slide_master.relative_to(self.unpacked_dir)}: "
+ f"Missing relationships file: {rels_file.relative_to(self.unpacked_dir)}"
+ )
+ continue
+
+ # Parse the relationships file
+ rels_root = lxml.etree.parse(str(rels_file)).getroot()
+
+ # Build a set of valid relationship IDs that point to slide layouts
+ valid_layout_rids = set()
+ for rel in rels_root.findall(
+ f".//{{{self.PACKAGE_RELATIONSHIPS_NAMESPACE}}}Relationship"
+ ):
+ rel_type = rel.get("Type", "")
+ if "slideLayout" in rel_type:
+ valid_layout_rids.add(rel.get("Id"))
+
+ # Find all sldLayoutId elements in the slide master
+ for sld_layout_id in root.findall(
+ f".//{{{self.PRESENTATIONML_NAMESPACE}}}sldLayoutId"
+ ):
+ r_id = sld_layout_id.get(
+ f"{{{self.OFFICE_RELATIONSHIPS_NAMESPACE}}}id"
+ )
+ layout_id = sld_layout_id.get("id")
+
+ if r_id and r_id not in valid_layout_rids:
+ errors.append(
+ f" {slide_master.relative_to(self.unpacked_dir)}: "
+ f"Line {sld_layout_id.sourceline}: sldLayoutId with id='{layout_id}' "
+ f"references r:id='{r_id}' which is not found in slide layout relationships"
+ )
+
+ except (lxml.etree.XMLSyntaxError, Exception) as e:
+ errors.append(
+ f" {slide_master.relative_to(self.unpacked_dir)}: Error: {e}"
+ )
+
+ if errors:
+ print(f"FAILED - Found {len(errors)} slide layout ID validation errors:")
+ for error in errors:
+ print(error)
+ print(
+ "Remove invalid references or add missing slide layouts to the relationships file."
+ )
+ return False
+ else:
+ if self.verbose:
+ print("PASSED - All slide layout IDs reference valid slide layouts")
+ return True
+
+ def validate_no_duplicate_slide_layouts(self):
+ """Validate that each slide has exactly one slideLayout reference."""
+ import lxml.etree
+
+ errors = []
+ slide_rels_files = list(self.unpacked_dir.glob("ppt/slides/_rels/*.xml.rels"))
+
+ for rels_file in slide_rels_files:
+ try:
+ root = lxml.etree.parse(str(rels_file)).getroot()
+
+ # Find all slideLayout relationships
+ layout_rels = [
+ rel
+ for rel in root.findall(
+ f".//{{{self.PACKAGE_RELATIONSHIPS_NAMESPACE}}}Relationship"
+ )
+ if "slideLayout" in rel.get("Type", "")
+ ]
+
+ if len(layout_rels) > 1:
+ errors.append(
+ f" {rels_file.relative_to(self.unpacked_dir)}: has {len(layout_rels)} slideLayout references"
+ )
+
+ except Exception as e:
+ errors.append(
+ f" {rels_file.relative_to(self.unpacked_dir)}: Error: {e}"
+ )
+
+ if errors:
+ print("FAILED - Found slides with duplicate slideLayout references:")
+ for error in errors:
+ print(error)
+ return False
+ else:
+ if self.verbose:
+ print("PASSED - All slides have exactly one slideLayout reference")
+ return True
+
+ def validate_notes_slide_references(self):
+ """Validate that each notesSlide file is referenced by only one slide."""
+ import lxml.etree
+
+ errors = []
+ notes_slide_references = {} # Track which slides reference each notesSlide
+
+ # Find all slide relationship files
+ slide_rels_files = list(self.unpacked_dir.glob("ppt/slides/_rels/*.xml.rels"))
+
+ if not slide_rels_files:
+ if self.verbose:
+ print("PASSED - No slide relationship files found")
+ return True
+
+ for rels_file in slide_rels_files:
+ try:
+ # Parse the relationships file
+ root = lxml.etree.parse(str(rels_file)).getroot()
+
+ # Find all notesSlide relationships
+ for rel in root.findall(
+ f".//{{{self.PACKAGE_RELATIONSHIPS_NAMESPACE}}}Relationship"
+ ):
+ rel_type = rel.get("Type", "")
+ if "notesSlide" in rel_type:
+ target = rel.get("Target", "")
+ if target:
+ # Normalize the target path to handle relative paths
+ normalized_target = target.replace("../", "")
+
+ # Track which slide references this notesSlide
+ slide_name = rels_file.stem.replace(
+ ".xml", ""
+ ) # e.g., "slide1"
+
+ if normalized_target not in notes_slide_references:
+ notes_slide_references[normalized_target] = []
+ notes_slide_references[normalized_target].append(
+ (slide_name, rels_file)
+ )
+
+ except (lxml.etree.XMLSyntaxError, Exception) as e:
+ errors.append(
+ f" {rels_file.relative_to(self.unpacked_dir)}: Error: {e}"
+ )
+
+ # Check for duplicate references
+ for target, references in notes_slide_references.items():
+ if len(references) > 1:
+ slide_names = [ref[0] for ref in references]
+ errors.append(
+ f" Notes slide '{target}' is referenced by multiple slides: {', '.join(slide_names)}"
+ )
+ for slide_name, rels_file in references:
+ errors.append(f" - {rels_file.relative_to(self.unpacked_dir)}")
+
+ if errors:
+ print(
+ f"FAILED - Found {len([e for e in errors if not e.startswith(' ')])} notes slide reference validation errors:"
+ )
+ for error in errors:
+ print(error)
+ print("Each slide may optionally have its own slide file.")
+ return False
+ else:
+ if self.verbose:
+ print("PASSED - All notes slide references are unique")
+ return True
+
+
+if __name__ == "__main__":
+ raise RuntimeError("This module should not be run directly.")
diff --git a/scientific-skills/document-skills/pptx/ooxml/scripts/validation/redlining.py b/scientific-skills/document-skills/pptx/ooxml/scripts/validation/redlining.py
new file mode 100644
index 0000000..b389bc0
--- /dev/null
+++ b/scientific-skills/document-skills/pptx/ooxml/scripts/validation/redlining.py
@@ -0,0 +1,279 @@
+"""
+Validator for tracked changes in Word documents.
+"""
+
+import subprocess
+import tempfile
+import zipfile
+from pathlib import Path
+
+
+class RedliningValidator:
+ """Validator for tracked changes in Word documents."""
+
+ def __init__(self, unpacked_dir, original_docx, verbose=False):
+ self.unpacked_dir = Path(unpacked_dir)
+ self.original_docx = Path(original_docx)
+ self.verbose = verbose
+ self.namespaces = {
+ "w": "http://schemas.openxmlformats.org/wordprocessingml/2006/main"
+ }
+
+ def validate(self):
+ """Main validation method that returns True if valid, False otherwise."""
+ # Verify unpacked directory exists and has correct structure
+ modified_file = self.unpacked_dir / "word" / "document.xml"
+ if not modified_file.exists():
+ print(f"FAILED - Modified document.xml not found at {modified_file}")
+ return False
+
+ # First, check if there are any tracked changes by Scientific-Writer to validate
+ try:
+ import xml.etree.ElementTree as ET
+
+ tree = ET.parse(modified_file)
+ root = tree.getroot()
+
+ # Check for w:del or w:ins tags authored by Scientific-Writer
+ del_elements = root.findall(".//w:del", self.namespaces)
+ ins_elements = root.findall(".//w:ins", self.namespaces)
+
+ # Filter to only include changes by Scientific-Writer
+ sw_del_elements = [
+ elem
+ for elem in del_elements
+ if elem.get(f"{{{self.namespaces['w']}}}author") == "Scientific-Writer"
+ ]
+ sw_ins_elements = [
+ elem
+ for elem in ins_elements
+ if elem.get(f"{{{self.namespaces['w']}}}author") == "Scientific-Writer"
+ ]
+
+ # Redlining validation is only needed if tracked changes by Scientific-Writer have been used.
+ if not sw_del_elements and not sw_ins_elements:
+ if self.verbose:
+ print("PASSED - No tracked changes by Scientific-Writer found.")
+ return True
+
+ except Exception:
+ # If we can't parse the XML, continue with full validation
+ pass
+
+ # Create temporary directory for unpacking original docx
+ with tempfile.TemporaryDirectory() as temp_dir:
+ temp_path = Path(temp_dir)
+
+ # Unpack original docx
+ try:
+ with zipfile.ZipFile(self.original_docx, "r") as zip_ref:
+ zip_ref.extractall(temp_path)
+ except Exception as e:
+ print(f"FAILED - Error unpacking original docx: {e}")
+ return False
+
+ original_file = temp_path / "word" / "document.xml"
+ if not original_file.exists():
+ print(
+ f"FAILED - Original document.xml not found in {self.original_docx}"
+ )
+ return False
+
+ # Parse both XML files using xml.etree.ElementTree for redlining validation
+ try:
+ import xml.etree.ElementTree as ET
+
+ modified_tree = ET.parse(modified_file)
+ modified_root = modified_tree.getroot()
+ original_tree = ET.parse(original_file)
+ original_root = original_tree.getroot()
+ except ET.ParseError as e:
+ print(f"FAILED - Error parsing XML files: {e}")
+ return False
+
+ # Remove Scientific-Writer's tracked changes from both documents
+ self._remove_sw_tracked_changes(original_root)
+ self._remove_sw_tracked_changes(modified_root)
+
+ # Extract and compare text content
+ modified_text = self._extract_text_content(modified_root)
+ original_text = self._extract_text_content(original_root)
+
+ if modified_text != original_text:
+ # Show detailed character-level differences for each paragraph
+ error_message = self._generate_detailed_diff(
+ original_text, modified_text
+ )
+ print(error_message)
+ return False
+
+ if self.verbose:
+ print("PASSED - All changes by Scientific-Writer are properly tracked")
+ return True
+
+ def _generate_detailed_diff(self, original_text, modified_text):
+ """Generate detailed word-level differences using git word diff."""
+ error_parts = [
+ "FAILED - Document text doesn't match after removing Scientific-Writer's tracked changes",
+ "",
+ "Likely causes:",
+ " 1. Modified text inside another author's or tags",
+ " 2. Made edits without proper tracked changes",
+ " 3. Didn't nest inside when deleting another's insertion",
+ "",
+ "For pre-redlined documents, use correct patterns:",
+ " - To reject another's INSERTION: Nest inside their ",
+ " - To restore another's DELETION: Add new AFTER their ",
+ "",
+ ]
+
+ # Show git word diff
+ git_diff = self._get_git_word_diff(original_text, modified_text)
+ if git_diff:
+ error_parts.extend(["Differences:", "============", git_diff])
+ else:
+ error_parts.append("Unable to generate word diff (git not available)")
+
+ return "\n".join(error_parts)
+
+ def _get_git_word_diff(self, original_text, modified_text):
+ """Generate word diff using git with character-level precision."""
+ try:
+ with tempfile.TemporaryDirectory() as temp_dir:
+ temp_path = Path(temp_dir)
+
+ # Create two files
+ original_file = temp_path / "original.txt"
+ modified_file = temp_path / "modified.txt"
+
+ original_file.write_text(original_text, encoding="utf-8")
+ modified_file.write_text(modified_text, encoding="utf-8")
+
+ # Try character-level diff first for precise differences
+ result = subprocess.run(
+ [
+ "git",
+ "diff",
+ "--word-diff=plain",
+ "--word-diff-regex=.", # Character-by-character diff
+ "-U0", # Zero lines of context - show only changed lines
+ "--no-index",
+ str(original_file),
+ str(modified_file),
+ ],
+ capture_output=True,
+ text=True,
+ )
+
+ if result.stdout.strip():
+ # Clean up the output - remove git diff header lines
+ lines = result.stdout.split("\n")
+ # Skip the header lines (diff --git, index, +++, ---, @@)
+ content_lines = []
+ in_content = False
+ for line in lines:
+ if line.startswith("@@"):
+ in_content = True
+ continue
+ if in_content and line.strip():
+ content_lines.append(line)
+
+ if content_lines:
+ return "\n".join(content_lines)
+
+ # Fallback to word-level diff if character-level is too verbose
+ result = subprocess.run(
+ [
+ "git",
+ "diff",
+ "--word-diff=plain",
+ "-U0", # Zero lines of context
+ "--no-index",
+ str(original_file),
+ str(modified_file),
+ ],
+ capture_output=True,
+ text=True,
+ )
+
+ if result.stdout.strip():
+ lines = result.stdout.split("\n")
+ content_lines = []
+ in_content = False
+ for line in lines:
+ if line.startswith("@@"):
+ in_content = True
+ continue
+ if in_content and line.strip():
+ content_lines.append(line)
+ return "\n".join(content_lines)
+
+ except (subprocess.CalledProcessError, FileNotFoundError, Exception):
+ # Git not available or other error, return None to use fallback
+ pass
+
+ return None
+
+ def _remove_sw_tracked_changes(self, root):
+ """Remove tracked changes authored by Scientific-Writer from the XML root."""
+ ins_tag = f"{{{self.namespaces['w']}}}ins"
+ del_tag = f"{{{self.namespaces['w']}}}del"
+ author_attr = f"{{{self.namespaces['w']}}}author"
+
+ # Remove w:ins elements
+ for parent in root.iter():
+ to_remove = []
+ for child in parent:
+ if child.tag == ins_tag and child.get(author_attr) == "Scientific-Writer":
+ to_remove.append(child)
+ for elem in to_remove:
+ parent.remove(elem)
+
+ # Unwrap content in w:del elements where author is "Scientific-Writer"
+ deltext_tag = f"{{{self.namespaces['w']}}}delText"
+ t_tag = f"{{{self.namespaces['w']}}}t"
+
+ for parent in root.iter():
+ to_process = []
+ for child in parent:
+ if child.tag == del_tag and child.get(author_attr) == "Scientific-Writer":
+ to_process.append((child, list(parent).index(child)))
+
+ # Process in reverse order to maintain indices
+ for del_elem, del_index in reversed(to_process):
+ # Convert w:delText to w:t before moving
+ for elem in del_elem.iter():
+ if elem.tag == deltext_tag:
+ elem.tag = t_tag
+
+ # Move all children of w:del to its parent before removing w:del
+ for child in reversed(list(del_elem)):
+ parent.insert(del_index, child)
+ parent.remove(del_elem)
+
+ def _extract_text_content(self, root):
+ """Extract text content from Word XML, preserving paragraph structure.
+
+ Empty paragraphs are skipped to avoid false positives when tracked
+ insertions add only structural elements without text content.
+ """
+ p_tag = f"{{{self.namespaces['w']}}}p"
+ t_tag = f"{{{self.namespaces['w']}}}t"
+
+ paragraphs = []
+ for p_elem in root.findall(f".//{p_tag}"):
+ # Get all text elements within this paragraph
+ text_parts = []
+ for t_elem in p_elem.findall(f".//{t_tag}"):
+ if t_elem.text:
+ text_parts.append(t_elem.text)
+ paragraph_text = "".join(text_parts)
+ # Skip empty paragraphs - they don't affect content validation
+ if paragraph_text:
+ paragraphs.append(paragraph_text)
+
+ return "\n".join(paragraphs)
+
+
+if __name__ == "__main__":
+ raise RuntimeError("This module should not be run directly.")
diff --git a/scientific-skills/document-skills/pptx/scripts/html2pptx.js b/scientific-skills/document-skills/pptx/scripts/html2pptx.js
new file mode 100755
index 0000000..437bf7c
--- /dev/null
+++ b/scientific-skills/document-skills/pptx/scripts/html2pptx.js
@@ -0,0 +1,979 @@
+/**
+ * html2pptx - Convert HTML slide to pptxgenjs slide with positioned elements
+ *
+ * USAGE:
+ * const pptx = new pptxgen();
+ * pptx.layout = 'LAYOUT_16x9'; // Must match HTML body dimensions
+ *
+ * const { slide, placeholders } = await html2pptx('slide.html', pptx);
+ * slide.addChart(pptx.charts.LINE, data, placeholders[0]);
+ *
+ * await pptx.writeFile('output.pptx');
+ *
+ * FEATURES:
+ * - Converts HTML to PowerPoint with accurate positioning
+ * - Supports text, images, shapes, and bullet lists
+ * - Extracts placeholder elements (class="placeholder") with positions
+ * - Handles CSS gradients, borders, and margins
+ *
+ * VALIDATION:
+ * - Uses body width/height from HTML for viewport sizing
+ * - Throws error if HTML dimensions don't match presentation layout
+ * - Throws error if content overflows body (with overflow details)
+ *
+ * RETURNS:
+ * { slide, placeholders } where placeholders is an array of { id, x, y, w, h }
+ */
+
+const { chromium } = require('playwright');
+const path = require('path');
+const sharp = require('sharp');
+
+const PT_PER_PX = 0.75;
+const PX_PER_IN = 96;
+const EMU_PER_IN = 914400;
+
+// Helper: Get body dimensions and check for overflow
+async function getBodyDimensions(page) {
+ const bodyDimensions = await page.evaluate(() => {
+ const body = document.body;
+ const style = window.getComputedStyle(body);
+
+ return {
+ width: parseFloat(style.width),
+ height: parseFloat(style.height),
+ scrollWidth: body.scrollWidth,
+ scrollHeight: body.scrollHeight
+ };
+ });
+
+ const errors = [];
+ const widthOverflowPx = Math.max(0, bodyDimensions.scrollWidth - bodyDimensions.width - 1);
+ const heightOverflowPx = Math.max(0, bodyDimensions.scrollHeight - bodyDimensions.height - 1);
+
+ const widthOverflowPt = widthOverflowPx * PT_PER_PX;
+ const heightOverflowPt = heightOverflowPx * PT_PER_PX;
+
+ if (widthOverflowPt > 0 || heightOverflowPt > 0) {
+ const directions = [];
+ if (widthOverflowPt > 0) directions.push(`${widthOverflowPt.toFixed(1)}pt horizontally`);
+ if (heightOverflowPt > 0) directions.push(`${heightOverflowPt.toFixed(1)}pt vertically`);
+ const reminder = heightOverflowPt > 0 ? ' (Remember: leave 0.5" margin at bottom of slide)' : '';
+ errors.push(`HTML content overflows body by ${directions.join(' and ')}${reminder}`);
+ }
+
+ return { ...bodyDimensions, errors };
+}
+
+// Helper: Validate dimensions match presentation layout
+function validateDimensions(bodyDimensions, pres) {
+ const errors = [];
+ const widthInches = bodyDimensions.width / PX_PER_IN;
+ const heightInches = bodyDimensions.height / PX_PER_IN;
+
+ if (pres.presLayout) {
+ const layoutWidth = pres.presLayout.width / EMU_PER_IN;
+ const layoutHeight = pres.presLayout.height / EMU_PER_IN;
+
+ if (Math.abs(layoutWidth - widthInches) > 0.1 || Math.abs(layoutHeight - heightInches) > 0.1) {
+ errors.push(
+ `HTML dimensions (${widthInches.toFixed(1)}" × ${heightInches.toFixed(1)}") ` +
+ `don't match presentation layout (${layoutWidth.toFixed(1)}" × ${layoutHeight.toFixed(1)}")`
+ );
+ }
+ }
+ return errors;
+}
+
+function validateTextBoxPosition(slideData, bodyDimensions) {
+ const errors = [];
+ const slideHeightInches = bodyDimensions.height / PX_PER_IN;
+ const minBottomMargin = 0.5; // 0.5 inches from bottom
+
+ for (const el of slideData.elements) {
+ // Check text elements (p, h1-h6, list)
+ if (['p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'list'].includes(el.type)) {
+ const fontSize = el.style?.fontSize || 0;
+ const bottomEdge = el.position.y + el.position.h;
+ const distanceFromBottom = slideHeightInches - bottomEdge;
+
+ if (fontSize > 12 && distanceFromBottom < minBottomMargin) {
+ const getText = () => {
+ if (typeof el.text === 'string') return el.text;
+ if (Array.isArray(el.text)) return el.text.find(t => t.text)?.text || '';
+ if (Array.isArray(el.items)) return el.items.find(item => item.text)?.text || '';
+ return '';
+ };
+ const textPrefix = getText().substring(0, 50) + (getText().length > 50 ? '...' : '');
+
+ errors.push(
+ `Text box "${textPrefix}" ends too close to bottom edge ` +
+ `(${distanceFromBottom.toFixed(2)}" from bottom, minimum ${minBottomMargin}" required)`
+ );
+ }
+ }
+ }
+
+ return errors;
+}
+
+// Helper: Add background to slide
+async function addBackground(slideData, targetSlide, tmpDir) {
+ if (slideData.background.type === 'image' && slideData.background.path) {
+ let imagePath = slideData.background.path.startsWith('file://')
+ ? slideData.background.path.replace('file://', '')
+ : slideData.background.path;
+ targetSlide.background = { path: imagePath };
+ } else if (slideData.background.type === 'color' && slideData.background.value) {
+ targetSlide.background = { color: slideData.background.value };
+ }
+}
+
+// Helper: Add elements to slide
+function addElements(slideData, targetSlide, pres) {
+ for (const el of slideData.elements) {
+ if (el.type === 'image') {
+ let imagePath = el.src.startsWith('file://') ? el.src.replace('file://', '') : el.src;
+ targetSlide.addImage({
+ path: imagePath,
+ x: el.position.x,
+ y: el.position.y,
+ w: el.position.w,
+ h: el.position.h
+ });
+ } else if (el.type === 'line') {
+ targetSlide.addShape(pres.ShapeType.line, {
+ x: el.x1,
+ y: el.y1,
+ w: el.x2 - el.x1,
+ h: el.y2 - el.y1,
+ line: { color: el.color, width: el.width }
+ });
+ } else if (el.type === 'shape') {
+ const shapeOptions = {
+ x: el.position.x,
+ y: el.position.y,
+ w: el.position.w,
+ h: el.position.h,
+ shape: el.shape.rectRadius > 0 ? pres.ShapeType.roundRect : pres.ShapeType.rect
+ };
+
+ if (el.shape.fill) {
+ shapeOptions.fill = { color: el.shape.fill };
+ if (el.shape.transparency != null) shapeOptions.fill.transparency = el.shape.transparency;
+ }
+ if (el.shape.line) shapeOptions.line = el.shape.line;
+ if (el.shape.rectRadius > 0) shapeOptions.rectRadius = el.shape.rectRadius;
+ if (el.shape.shadow) shapeOptions.shadow = el.shape.shadow;
+
+ targetSlide.addText(el.text || '', shapeOptions);
+ } else if (el.type === 'list') {
+ const listOptions = {
+ x: el.position.x,
+ y: el.position.y,
+ w: el.position.w,
+ h: el.position.h,
+ fontSize: el.style.fontSize,
+ fontFace: el.style.fontFace,
+ color: el.style.color,
+ align: el.style.align,
+ valign: 'top',
+ lineSpacing: el.style.lineSpacing,
+ paraSpaceBefore: el.style.paraSpaceBefore,
+ paraSpaceAfter: el.style.paraSpaceAfter,
+ margin: el.style.margin
+ };
+ if (el.style.margin) listOptions.margin = el.style.margin;
+ targetSlide.addText(el.items, listOptions);
+ } else {
+ // Check if text is single-line (height suggests one line)
+ const lineHeight = el.style.lineSpacing || el.style.fontSize * 1.2;
+ const isSingleLine = el.position.h <= lineHeight * 1.5;
+
+ let adjustedX = el.position.x;
+ let adjustedW = el.position.w;
+
+ // Make single-line text 2% wider to account for underestimate
+ if (isSingleLine) {
+ const widthIncrease = el.position.w * 0.02;
+ const align = el.style.align;
+
+ if (align === 'center') {
+ // Center: expand both sides
+ adjustedX = el.position.x - (widthIncrease / 2);
+ adjustedW = el.position.w + widthIncrease;
+ } else if (align === 'right') {
+ // Right: expand to the left
+ adjustedX = el.position.x - widthIncrease;
+ adjustedW = el.position.w + widthIncrease;
+ } else {
+ // Left (default): expand to the right
+ adjustedW = el.position.w + widthIncrease;
+ }
+ }
+
+ const textOptions = {
+ x: adjustedX,
+ y: el.position.y,
+ w: adjustedW,
+ h: el.position.h,
+ fontSize: el.style.fontSize,
+ fontFace: el.style.fontFace,
+ color: el.style.color,
+ bold: el.style.bold,
+ italic: el.style.italic,
+ underline: el.style.underline,
+ valign: 'top',
+ lineSpacing: el.style.lineSpacing,
+ paraSpaceBefore: el.style.paraSpaceBefore,
+ paraSpaceAfter: el.style.paraSpaceAfter,
+ inset: 0 // Remove default PowerPoint internal padding
+ };
+
+ if (el.style.align) textOptions.align = el.style.align;
+ if (el.style.margin) textOptions.margin = el.style.margin;
+ if (el.style.rotate !== undefined) textOptions.rotate = el.style.rotate;
+ if (el.style.transparency !== null && el.style.transparency !== undefined) textOptions.transparency = el.style.transparency;
+
+ targetSlide.addText(el.text, textOptions);
+ }
+ }
+}
+
+// Helper: Extract slide data from HTML page
+async function extractSlideData(page) {
+ return await page.evaluate(() => {
+ const PT_PER_PX = 0.75;
+ const PX_PER_IN = 96;
+
+ // Fonts that are single-weight and should not have bold applied
+ // (applying bold causes PowerPoint to use faux bold which makes text wider)
+ const SINGLE_WEIGHT_FONTS = ['impact'];
+
+ // Helper: Check if a font should skip bold formatting
+ const shouldSkipBold = (fontFamily) => {
+ if (!fontFamily) return false;
+ const normalizedFont = fontFamily.toLowerCase().replace(/['"]/g, '').split(',')[0].trim();
+ return SINGLE_WEIGHT_FONTS.includes(normalizedFont);
+ };
+
+ // Unit conversion helpers
+ const pxToInch = (px) => px / PX_PER_IN;
+ const pxToPoints = (pxStr) => parseFloat(pxStr) * PT_PER_PX;
+ const rgbToHex = (rgbStr) => {
+ // Handle transparent backgrounds by defaulting to white
+ if (rgbStr === 'rgba(0, 0, 0, 0)' || rgbStr === 'transparent') return 'FFFFFF';
+
+ const match = rgbStr.match(/rgba?\((\d+),\s*(\d+),\s*(\d+)/);
+ if (!match) return 'FFFFFF';
+ return match.slice(1).map(n => parseInt(n).toString(16).padStart(2, '0')).join('');
+ };
+
+ const extractAlpha = (rgbStr) => {
+ const match = rgbStr.match(/rgba\((\d+),\s*(\d+),\s*(\d+),\s*([\d.]+)\)/);
+ if (!match || !match[4]) return null;
+ const alpha = parseFloat(match[4]);
+ return Math.round((1 - alpha) * 100);
+ };
+
+ const applyTextTransform = (text, textTransform) => {
+ if (textTransform === 'uppercase') return text.toUpperCase();
+ if (textTransform === 'lowercase') return text.toLowerCase();
+ if (textTransform === 'capitalize') {
+ return text.replace(/\b\w/g, c => c.toUpperCase());
+ }
+ return text;
+ };
+
+ // Extract rotation angle from CSS transform and writing-mode
+ const getRotation = (transform, writingMode) => {
+ let angle = 0;
+
+ // Handle writing-mode first
+ // PowerPoint: 90° = text rotated 90° clockwise (reads top to bottom, letters upright)
+ // PowerPoint: 270° = text rotated 270° clockwise (reads bottom to top, letters upright)
+ if (writingMode === 'vertical-rl') {
+ // vertical-rl alone = text reads top to bottom = 90° in PowerPoint
+ angle = 90;
+ } else if (writingMode === 'vertical-lr') {
+ // vertical-lr alone = text reads bottom to top = 270° in PowerPoint
+ angle = 270;
+ }
+
+ // Then add any transform rotation
+ if (transform && transform !== 'none') {
+ // Try to match rotate() function
+ const rotateMatch = transform.match(/rotate\((-?\d+(?:\.\d+)?)deg\)/);
+ if (rotateMatch) {
+ angle += parseFloat(rotateMatch[1]);
+ } else {
+ // Browser may compute as matrix - extract rotation from matrix
+ const matrixMatch = transform.match(/matrix\(([^)]+)\)/);
+ if (matrixMatch) {
+ const values = matrixMatch[1].split(',').map(parseFloat);
+ // matrix(a, b, c, d, e, f) where rotation = atan2(b, a)
+ const matrixAngle = Math.atan2(values[1], values[0]) * (180 / Math.PI);
+ angle += Math.round(matrixAngle);
+ }
+ }
+ }
+
+ // Normalize to 0-359 range
+ angle = angle % 360;
+ if (angle < 0) angle += 360;
+
+ return angle === 0 ? null : angle;
+ };
+
+ // Get position/dimensions accounting for rotation
+ const getPositionAndSize = (el, rect, rotation) => {
+ if (rotation === null) {
+ return { x: rect.left, y: rect.top, w: rect.width, h: rect.height };
+ }
+
+ // For 90° or 270° rotations, swap width and height
+ // because PowerPoint applies rotation to the original (unrotated) box
+ const isVertical = rotation === 90 || rotation === 270;
+
+ if (isVertical) {
+ // The browser shows us the rotated dimensions (tall box for vertical text)
+ // But PowerPoint needs the pre-rotation dimensions (wide box that will be rotated)
+ // So we swap: browser's height becomes PPT's width, browser's width becomes PPT's height
+ const centerX = rect.left + rect.width / 2;
+ const centerY = rect.top + rect.height / 2;
+
+ return {
+ x: centerX - rect.height / 2,
+ y: centerY - rect.width / 2,
+ w: rect.height,
+ h: rect.width
+ };
+ }
+
+ // For other rotations, use element's offset dimensions
+ const centerX = rect.left + rect.width / 2;
+ const centerY = rect.top + rect.height / 2;
+ return {
+ x: centerX - el.offsetWidth / 2,
+ y: centerY - el.offsetHeight / 2,
+ w: el.offsetWidth,
+ h: el.offsetHeight
+ };
+ };
+
+ // Parse CSS box-shadow into PptxGenJS shadow properties
+ const parseBoxShadow = (boxShadow) => {
+ if (!boxShadow || boxShadow === 'none') return null;
+
+ // Browser computed style format: "rgba(0, 0, 0, 0.3) 2px 2px 8px 0px [inset]"
+ // CSS format: "[inset] 2px 2px 8px 0px rgba(0, 0, 0, 0.3)"
+
+ const insetMatch = boxShadow.match(/inset/);
+
+ // IMPORTANT: PptxGenJS/PowerPoint doesn't properly support inset shadows
+ // Only process outer shadows to avoid file corruption
+ if (insetMatch) return null;
+
+ // Extract color first (rgba or rgb at start)
+ const colorMatch = boxShadow.match(/rgba?\([^)]+\)/);
+
+ // Extract numeric values (handles both px and pt units)
+ const parts = boxShadow.match(/([-\d.]+)(px|pt)/g);
+
+ if (!parts || parts.length < 2) return null;
+
+ const offsetX = parseFloat(parts[0]);
+ const offsetY = parseFloat(parts[1]);
+ const blur = parts.length > 2 ? parseFloat(parts[2]) : 0;
+
+ // Calculate angle from offsets (in degrees, 0 = right, 90 = down)
+ let angle = 0;
+ if (offsetX !== 0 || offsetY !== 0) {
+ angle = Math.atan2(offsetY, offsetX) * (180 / Math.PI);
+ if (angle < 0) angle += 360;
+ }
+
+ // Calculate offset distance (hypotenuse)
+ const offset = Math.sqrt(offsetX * offsetX + offsetY * offsetY) * PT_PER_PX;
+
+ // Extract opacity from rgba
+ let opacity = 0.5;
+ if (colorMatch) {
+ const opacityMatch = colorMatch[0].match(/[\d.]+\)$/);
+ if (opacityMatch) {
+ opacity = parseFloat(opacityMatch[0].replace(')', ''));
+ }
+ }
+
+ return {
+ type: 'outer',
+ angle: Math.round(angle),
+ blur: blur * 0.75, // Convert to points
+ color: colorMatch ? rgbToHex(colorMatch[0]) : '000000',
+ offset: offset,
+ opacity
+ };
+ };
+
+ // Parse inline formatting tags (, , , , , ) into text runs
+ const parseInlineFormatting = (element, baseOptions = {}, runs = [], baseTextTransform = (x) => x) => {
+ let prevNodeIsText = false;
+
+ element.childNodes.forEach((node) => {
+ let textTransform = baseTextTransform;
+
+ const isText = node.nodeType === Node.TEXT_NODE || node.tagName === 'BR';
+ if (isText) {
+ const text = node.tagName === 'BR' ? '\n' : textTransform(node.textContent.replace(/\s+/g, ' '));
+ const prevRun = runs[runs.length - 1];
+ if (prevNodeIsText && prevRun) {
+ prevRun.text += text;
+ } else {
+ runs.push({ text, options: { ...baseOptions } });
+ }
+
+ } else if (node.nodeType === Node.ELEMENT_NODE && node.textContent.trim()) {
+ const options = { ...baseOptions };
+ const computed = window.getComputedStyle(node);
+
+ // Handle inline elements with computed styles
+ if (node.tagName === 'SPAN' || node.tagName === 'B' || node.tagName === 'STRONG' || node.tagName === 'I' || node.tagName === 'EM' || node.tagName === 'U') {
+ const isBold = computed.fontWeight === 'bold' || parseInt(computed.fontWeight) >= 600;
+ if (isBold && !shouldSkipBold(computed.fontFamily)) options.bold = true;
+ if (computed.fontStyle === 'italic') options.italic = true;
+ if (computed.textDecoration && computed.textDecoration.includes('underline')) options.underline = true;
+ if (computed.color && computed.color !== 'rgb(0, 0, 0)') {
+ options.color = rgbToHex(computed.color);
+ const transparency = extractAlpha(computed.color);
+ if (transparency !== null) options.transparency = transparency;
+ }
+ if (computed.fontSize) options.fontSize = pxToPoints(computed.fontSize);
+
+ // Apply text-transform on the span element itself
+ if (computed.textTransform && computed.textTransform !== 'none') {
+ const transformStr = computed.textTransform;
+ textTransform = (text) => applyTextTransform(text, transformStr);
+ }
+
+ // Validate: Check for margins on inline elements
+ if (computed.marginLeft && parseFloat(computed.marginLeft) > 0) {
+ errors.push(`Inline element <${node.tagName.toLowerCase()}> has margin-left which is not supported in PowerPoint. Remove margin from inline elements.`);
+ }
+ if (computed.marginRight && parseFloat(computed.marginRight) > 0) {
+ errors.push(`Inline element <${node.tagName.toLowerCase()}> has margin-right which is not supported in PowerPoint. Remove margin from inline elements.`);
+ }
+ if (computed.marginTop && parseFloat(computed.marginTop) > 0) {
+ errors.push(`Inline element <${node.tagName.toLowerCase()}> has margin-top which is not supported in PowerPoint. Remove margin from inline elements.`);
+ }
+ if (computed.marginBottom && parseFloat(computed.marginBottom) > 0) {
+ errors.push(`Inline element <${node.tagName.toLowerCase()}> has margin-bottom which is not supported in PowerPoint. Remove margin from inline elements.`);
+ }
+
+ // Recursively process the child node. This will flatten nested spans into multiple runs.
+ parseInlineFormatting(node, options, runs, textTransform);
+ }
+ }
+
+ prevNodeIsText = isText;
+ });
+
+ // Trim leading space from first run and trailing space from last run
+ if (runs.length > 0) {
+ runs[0].text = runs[0].text.replace(/^\s+/, '');
+ runs[runs.length - 1].text = runs[runs.length - 1].text.replace(/\s+$/, '');
+ }
+
+ return runs.filter(r => r.text.length > 0);
+ };
+
+ // Extract background from body (image or color)
+ const body = document.body;
+ const bodyStyle = window.getComputedStyle(body);
+ const bgImage = bodyStyle.backgroundImage;
+ const bgColor = bodyStyle.backgroundColor;
+
+ // Collect validation errors
+ const errors = [];
+
+ // Validate: Check for CSS gradients
+ if (bgImage && (bgImage.includes('linear-gradient') || bgImage.includes('radial-gradient'))) {
+ errors.push(
+ 'CSS gradients are not supported. Use Sharp to rasterize gradients as PNG images first, ' +
+ 'then reference with background-image: url(\'gradient.png\')'
+ );
+ }
+
+ let background;
+ if (bgImage && bgImage !== 'none') {
+ // Extract URL from url("...") or url(...)
+ const urlMatch = bgImage.match(/url\(["']?([^"')]+)["']?\)/);
+ if (urlMatch) {
+ background = {
+ type: 'image',
+ path: urlMatch[1]
+ };
+ } else {
+ background = {
+ type: 'color',
+ value: rgbToHex(bgColor)
+ };
+ }
+ } else {
+ background = {
+ type: 'color',
+ value: rgbToHex(bgColor)
+ };
+ }
+
+ // Process all elements
+ const elements = [];
+ const placeholders = [];
+ const textTags = ['P', 'H1', 'H2', 'H3', 'H4', 'H5', 'H6', 'UL', 'OL', 'LI'];
+ const processed = new Set();
+
+ document.querySelectorAll('*').forEach((el) => {
+ if (processed.has(el)) return;
+
+ // Validate text elements don't have backgrounds, borders, or shadows
+ if (textTags.includes(el.tagName)) {
+ const computed = window.getComputedStyle(el);
+ const hasBg = computed.backgroundColor && computed.backgroundColor !== 'rgba(0, 0, 0, 0)';
+ const hasBorder = (computed.borderWidth && parseFloat(computed.borderWidth) > 0) ||
+ (computed.borderTopWidth && parseFloat(computed.borderTopWidth) > 0) ||
+ (computed.borderRightWidth && parseFloat(computed.borderRightWidth) > 0) ||
+ (computed.borderBottomWidth && parseFloat(computed.borderBottomWidth) > 0) ||
+ (computed.borderLeftWidth && parseFloat(computed.borderLeftWidth) > 0);
+ const hasShadow = computed.boxShadow && computed.boxShadow !== 'none';
+
+ if (hasBg || hasBorder || hasShadow) {
+ errors.push(
+ `Text element <${el.tagName.toLowerCase()}> has ${hasBg ? 'background' : hasBorder ? 'border' : 'shadow'}. ` +
+ 'Backgrounds, borders, and shadows are only supported on elements, not text elements.'
+ );
+ return;
+ }
+ }
+
+ // Extract placeholder elements (for charts, etc.)
+ if (el.className && el.className.includes('placeholder')) {
+ const rect = el.getBoundingClientRect();
+ if (rect.width === 0 || rect.height === 0) {
+ errors.push(
+ `Placeholder "${el.id || 'unnamed'}" has ${rect.width === 0 ? 'width: 0' : 'height: 0'}. Check the layout CSS.`
+ );
+ } else {
+ placeholders.push({
+ id: el.id || `placeholder-${placeholders.length}`,
+ x: pxToInch(rect.left),
+ y: pxToInch(rect.top),
+ w: pxToInch(rect.width),
+ h: pxToInch(rect.height)
+ });
+ }
+ processed.add(el);
+ return;
+ }
+
+ // Extract images
+ if (el.tagName === 'IMG') {
+ const rect = el.getBoundingClientRect();
+ if (rect.width > 0 && rect.height > 0) {
+ elements.push({
+ type: 'image',
+ src: el.src,
+ position: {
+ x: pxToInch(rect.left),
+ y: pxToInch(rect.top),
+ w: pxToInch(rect.width),
+ h: pxToInch(rect.height)
+ }
+ });
+ processed.add(el);
+ return;
+ }
+ }
+
+ // Extract DIVs with backgrounds/borders as shapes
+ const isContainer = el.tagName === 'DIV' && !textTags.includes(el.tagName);
+ if (isContainer) {
+ const computed = window.getComputedStyle(el);
+ const hasBg = computed.backgroundColor && computed.backgroundColor !== 'rgba(0, 0, 0, 0)';
+
+ // Validate: Check for unwrapped text content in DIV
+ for (const node of el.childNodes) {
+ if (node.nodeType === Node.TEXT_NODE) {
+ const text = node.textContent.trim();
+ if (text) {
+ errors.push(
+ `DIV element contains unwrapped text "${text.substring(0, 50)}${text.length > 50 ? '...' : ''}". ` +
+ 'All text must be wrapped in
,
-, , or tags to appear in PowerPoint.'
+ );
+ }
+ }
+ }
+
+ // Check for background images on shapes
+ const bgImage = computed.backgroundImage;
+ if (bgImage && bgImage !== 'none') {
+ errors.push(
+ 'Background images on DIV elements are not supported. ' +
+ 'Use solid colors or borders for shapes, or use slide.addImage() in PptxGenJS to layer images.'
+ );
+ return;
+ }
+
+ // Check for borders - both uniform and partial
+ const borderTop = computed.borderTopWidth;
+ const borderRight = computed.borderRightWidth;
+ const borderBottom = computed.borderBottomWidth;
+ const borderLeft = computed.borderLeftWidth;
+ const borders = [borderTop, borderRight, borderBottom, borderLeft].map(b => parseFloat(b) || 0);
+ const hasBorder = borders.some(b => b > 0);
+ const hasUniformBorder = hasBorder && borders.every(b => b === borders[0]);
+ const borderLines = [];
+
+ if (hasBorder && !hasUniformBorder) {
+ const rect = el.getBoundingClientRect();
+ const x = pxToInch(rect.left);
+ const y = pxToInch(rect.top);
+ const w = pxToInch(rect.width);
+ const h = pxToInch(rect.height);
+
+ // Collect lines to add after shape (inset by half the line width to center on edge)
+ if (parseFloat(borderTop) > 0) {
+ const widthPt = pxToPoints(borderTop);
+ const inset = (widthPt / 72) / 2; // Convert points to inches, then half
+ borderLines.push({
+ type: 'line',
+ x1: x, y1: y + inset, x2: x + w, y2: y + inset,
+ width: widthPt,
+ color: rgbToHex(computed.borderTopColor)
+ });
+ }
+ if (parseFloat(borderRight) > 0) {
+ const widthPt = pxToPoints(borderRight);
+ const inset = (widthPt / 72) / 2;
+ borderLines.push({
+ type: 'line',
+ x1: x + w - inset, y1: y, x2: x + w - inset, y2: y + h,
+ width: widthPt,
+ color: rgbToHex(computed.borderRightColor)
+ });
+ }
+ if (parseFloat(borderBottom) > 0) {
+ const widthPt = pxToPoints(borderBottom);
+ const inset = (widthPt / 72) / 2;
+ borderLines.push({
+ type: 'line',
+ x1: x, y1: y + h - inset, x2: x + w, y2: y + h - inset,
+ width: widthPt,
+ color: rgbToHex(computed.borderBottomColor)
+ });
+ }
+ if (parseFloat(borderLeft) > 0) {
+ const widthPt = pxToPoints(borderLeft);
+ const inset = (widthPt / 72) / 2;
+ borderLines.push({
+ type: 'line',
+ x1: x + inset, y1: y, x2: x + inset, y2: y + h,
+ width: widthPt,
+ color: rgbToHex(computed.borderLeftColor)
+ });
+ }
+ }
+
+ if (hasBg || hasBorder) {
+ const rect = el.getBoundingClientRect();
+ if (rect.width > 0 && rect.height > 0) {
+ const shadow = parseBoxShadow(computed.boxShadow);
+
+ // Only add shape if there's background or uniform border
+ if (hasBg || hasUniformBorder) {
+ elements.push({
+ type: 'shape',
+ text: '', // Shape only - child text elements render on top
+ position: {
+ x: pxToInch(rect.left),
+ y: pxToInch(rect.top),
+ w: pxToInch(rect.width),
+ h: pxToInch(rect.height)
+ },
+ shape: {
+ fill: hasBg ? rgbToHex(computed.backgroundColor) : null,
+ transparency: hasBg ? extractAlpha(computed.backgroundColor) : null,
+ line: hasUniformBorder ? {
+ color: rgbToHex(computed.borderColor),
+ width: pxToPoints(computed.borderWidth)
+ } : null,
+ // Convert border-radius to rectRadius (in inches)
+ // % values: 50%+ = circle (1), <50% = percentage of min dimension
+ // pt values: divide by 72 (72pt = 1 inch)
+ // px values: divide by 96 (96px = 1 inch)
+ rectRadius: (() => {
+ const radius = computed.borderRadius;
+ const radiusValue = parseFloat(radius);
+ if (radiusValue === 0) return 0;
+
+ if (radius.includes('%')) {
+ if (radiusValue >= 50) return 1;
+ // Calculate percentage of smaller dimension
+ const minDim = Math.min(rect.width, rect.height);
+ return (radiusValue / 100) * pxToInch(minDim);
+ }
+
+ if (radius.includes('pt')) return radiusValue / 72;
+ return radiusValue / PX_PER_IN;
+ })(),
+ shadow: shadow
+ }
+ });
+ }
+
+ // Add partial border lines
+ elements.push(...borderLines);
+
+ processed.add(el);
+ return;
+ }
+ }
+ }
+
+ // Extract bullet lists as single text block
+ if (el.tagName === 'UL' || el.tagName === 'OL') {
+ const rect = el.getBoundingClientRect();
+ if (rect.width === 0 || rect.height === 0) return;
+
+ const liElements = Array.from(el.querySelectorAll('li'));
+ const items = [];
+ const ulComputed = window.getComputedStyle(el);
+ const ulPaddingLeftPt = pxToPoints(ulComputed.paddingLeft);
+
+ // Split: margin-left for bullet position, indent for text position
+ // margin-left + indent = ul padding-left
+ const marginLeft = ulPaddingLeftPt * 0.5;
+ const textIndent = ulPaddingLeftPt * 0.5;
+
+ liElements.forEach((li, idx) => {
+ const isLast = idx === liElements.length - 1;
+ const runs = parseInlineFormatting(li, { breakLine: false });
+ // Clean manual bullets from first run
+ if (runs.length > 0) {
+ runs[0].text = runs[0].text.replace(/^[•\-\*▪▸]\s*/, '');
+ runs[0].options.bullet = { indent: textIndent };
+ }
+ // Set breakLine on last run
+ if (runs.length > 0 && !isLast) {
+ runs[runs.length - 1].options.breakLine = true;
+ }
+ items.push(...runs);
+ });
+
+ const computed = window.getComputedStyle(liElements[0] || el);
+
+ elements.push({
+ type: 'list',
+ items: items,
+ position: {
+ x: pxToInch(rect.left),
+ y: pxToInch(rect.top),
+ w: pxToInch(rect.width),
+ h: pxToInch(rect.height)
+ },
+ style: {
+ fontSize: pxToPoints(computed.fontSize),
+ fontFace: computed.fontFamily.split(',')[0].replace(/['"]/g, '').trim(),
+ color: rgbToHex(computed.color),
+ transparency: extractAlpha(computed.color),
+ align: computed.textAlign === 'start' ? 'left' : computed.textAlign,
+ lineSpacing: computed.lineHeight && computed.lineHeight !== 'normal' ? pxToPoints(computed.lineHeight) : null,
+ paraSpaceBefore: 0,
+ paraSpaceAfter: pxToPoints(computed.marginBottom),
+ // PptxGenJS margin array is [left, right, bottom, top]
+ margin: [marginLeft, 0, 0, 0]
+ }
+ });
+
+ liElements.forEach(li => processed.add(li));
+ processed.add(el);
+ return;
+ }
+
+ // Extract text elements (P, H1, H2, etc.)
+ if (!textTags.includes(el.tagName)) return;
+
+ const rect = el.getBoundingClientRect();
+ const text = el.textContent.trim();
+ if (rect.width === 0 || rect.height === 0 || !text) return;
+
+ // Validate: Check for manual bullet symbols in text elements (not in lists)
+ if (el.tagName !== 'LI' && /^[•\-\*▪▸○●◆◇■□]\s/.test(text.trimStart())) {
+ errors.push(
+ `Text element <${el.tagName.toLowerCase()}> starts with bullet symbol "${text.substring(0, 20)}...". ` +
+ 'Use or lists instead of manual bullet symbols.'
+ );
+ return;
+ }
+
+ const computed = window.getComputedStyle(el);
+ const rotation = getRotation(computed.transform, computed.writingMode);
+ const { x, y, w, h } = getPositionAndSize(el, rect, rotation);
+
+ const baseStyle = {
+ fontSize: pxToPoints(computed.fontSize),
+ fontFace: computed.fontFamily.split(',')[0].replace(/['"]/g, '').trim(),
+ color: rgbToHex(computed.color),
+ align: computed.textAlign === 'start' ? 'left' : computed.textAlign,
+ lineSpacing: pxToPoints(computed.lineHeight),
+ paraSpaceBefore: pxToPoints(computed.marginTop),
+ paraSpaceAfter: pxToPoints(computed.marginBottom),
+ // PptxGenJS margin array is [left, right, bottom, top] (not [top, right, bottom, left] as documented)
+ margin: [
+ pxToPoints(computed.paddingLeft),
+ pxToPoints(computed.paddingRight),
+ pxToPoints(computed.paddingBottom),
+ pxToPoints(computed.paddingTop)
+ ]
+ };
+
+ const transparency = extractAlpha(computed.color);
+ if (transparency !== null) baseStyle.transparency = transparency;
+
+ if (rotation !== null) baseStyle.rotate = rotation;
+
+ const hasFormatting = el.querySelector('b, i, u, strong, em, span, br');
+
+ if (hasFormatting) {
+ // Text with inline formatting
+ const transformStr = computed.textTransform;
+ const runs = parseInlineFormatting(el, {}, [], (str) => applyTextTransform(str, transformStr));
+
+ // Adjust lineSpacing based on largest fontSize in runs
+ const adjustedStyle = { ...baseStyle };
+ if (adjustedStyle.lineSpacing) {
+ const maxFontSize = Math.max(
+ adjustedStyle.fontSize,
+ ...runs.map(r => r.options?.fontSize || 0)
+ );
+ if (maxFontSize > adjustedStyle.fontSize) {
+ const lineHeightMultiplier = adjustedStyle.lineSpacing / adjustedStyle.fontSize;
+ adjustedStyle.lineSpacing = maxFontSize * lineHeightMultiplier;
+ }
+ }
+
+ elements.push({
+ type: el.tagName.toLowerCase(),
+ text: runs,
+ position: { x: pxToInch(x), y: pxToInch(y), w: pxToInch(w), h: pxToInch(h) },
+ style: adjustedStyle
+ });
+ } else {
+ // Plain text - inherit CSS formatting
+ const textTransform = computed.textTransform;
+ const transformedText = applyTextTransform(text, textTransform);
+
+ const isBold = computed.fontWeight === 'bold' || parseInt(computed.fontWeight) >= 600;
+
+ elements.push({
+ type: el.tagName.toLowerCase(),
+ text: transformedText,
+ position: { x: pxToInch(x), y: pxToInch(y), w: pxToInch(w), h: pxToInch(h) },
+ style: {
+ ...baseStyle,
+ bold: isBold && !shouldSkipBold(computed.fontFamily),
+ italic: computed.fontStyle === 'italic',
+ underline: computed.textDecoration.includes('underline')
+ }
+ });
+ }
+
+ processed.add(el);
+ });
+
+ return { background, elements, placeholders, errors };
+ });
+}
+
+async function html2pptx(htmlFile, pres, options = {}) {
+ const {
+ tmpDir = process.env.TMPDIR || '/tmp',
+ slide = null
+ } = options;
+
+ try {
+ // Use Chrome on macOS, default Chromium on Unix
+ const launchOptions = { env: { TMPDIR: tmpDir } };
+ if (process.platform === 'darwin') {
+ launchOptions.channel = 'chrome';
+ }
+
+ const browser = await chromium.launch(launchOptions);
+
+ let bodyDimensions;
+ let slideData;
+
+ const filePath = path.isAbsolute(htmlFile) ? htmlFile : path.join(process.cwd(), htmlFile);
+ const validationErrors = [];
+
+ try {
+ const page = await browser.newPage();
+ page.on('console', (msg) => {
+ // Log the message text to your test runner's console
+ console.log(`Browser console: ${msg.text()}`);
+ });
+
+ await page.goto(`file://${filePath}`);
+
+ bodyDimensions = await getBodyDimensions(page);
+
+ await page.setViewportSize({
+ width: Math.round(bodyDimensions.width),
+ height: Math.round(bodyDimensions.height)
+ });
+
+ slideData = await extractSlideData(page);
+ } finally {
+ await browser.close();
+ }
+
+ // Collect all validation errors
+ if (bodyDimensions.errors && bodyDimensions.errors.length > 0) {
+ validationErrors.push(...bodyDimensions.errors);
+ }
+
+ const dimensionErrors = validateDimensions(bodyDimensions, pres);
+ if (dimensionErrors.length > 0) {
+ validationErrors.push(...dimensionErrors);
+ }
+
+ const textBoxPositionErrors = validateTextBoxPosition(slideData, bodyDimensions);
+ if (textBoxPositionErrors.length > 0) {
+ validationErrors.push(...textBoxPositionErrors);
+ }
+
+ if (slideData.errors && slideData.errors.length > 0) {
+ validationErrors.push(...slideData.errors);
+ }
+
+ // Throw all errors at once if any exist
+ if (validationErrors.length > 0) {
+ const errorMessage = validationErrors.length === 1
+ ? validationErrors[0]
+ : `Multiple validation errors found:\n${validationErrors.map((e, i) => ` ${i + 1}. ${e}`).join('\n')}`;
+ throw new Error(errorMessage);
+ }
+
+ const targetSlide = slide || pres.addSlide();
+
+ await addBackground(slideData, targetSlide, tmpDir);
+ addElements(slideData, targetSlide, pres);
+
+ return { slide: targetSlide, placeholders: slideData.placeholders };
+ } catch (error) {
+ if (!error.message.startsWith(htmlFile)) {
+ throw new Error(`${htmlFile}: ${error.message}`);
+ }
+ throw error;
+ }
+}
+
+module.exports = html2pptx;
\ No newline at end of file
diff --git a/scientific-skills/document-skills/pptx/scripts/inventory.py b/scientific-skills/document-skills/pptx/scripts/inventory.py
new file mode 100755
index 0000000..edda390
--- /dev/null
+++ b/scientific-skills/document-skills/pptx/scripts/inventory.py
@@ -0,0 +1,1020 @@
+#!/usr/bin/env python3
+"""
+Extract structured text content from PowerPoint presentations.
+
+This module provides functionality to:
+- Extract all text content from PowerPoint shapes
+- Preserve paragraph formatting (alignment, bullets, fonts, spacing)
+- Handle nested GroupShapes recursively with correct absolute positions
+- Sort shapes by visual position on slides
+- Filter out slide numbers and non-content placeholders
+- Export to JSON with clean, structured data
+
+Classes:
+ ParagraphData: Represents a text paragraph with formatting
+ ShapeData: Represents a shape with position and text content
+
+Main Functions:
+ extract_text_inventory: Extract all text from a presentation
+ save_inventory: Save extracted data to JSON
+
+Usage:
+ python inventory.py input.pptx output.json
+"""
+
+import argparse
+import json
+import platform
+import sys
+from dataclasses import dataclass
+from pathlib import Path
+from typing import Any, Dict, List, Optional, Tuple, Union
+
+from PIL import Image, ImageDraw, ImageFont
+from pptx import Presentation
+from pptx.enum.text import PP_ALIGN
+from pptx.shapes.base import BaseShape
+
+# Type aliases for cleaner signatures
+JsonValue = Union[str, int, float, bool, None]
+ParagraphDict = Dict[str, JsonValue]
+ShapeDict = Dict[
+ str, Union[str, float, bool, List[ParagraphDict], List[str], Dict[str, Any], None]
+]
+InventoryData = Dict[
+ str, Dict[str, "ShapeData"]
+] # Dict of slide_id -> {shape_id -> ShapeData}
+InventoryDict = Dict[str, Dict[str, ShapeDict]] # JSON-serializable inventory
+
+
+def main():
+ """Main entry point for command-line usage."""
+ parser = argparse.ArgumentParser(
+ description="Extract text inventory from PowerPoint with proper GroupShape support.",
+ formatter_class=argparse.RawDescriptionHelpFormatter,
+ epilog="""
+Examples:
+ python inventory.py presentation.pptx inventory.json
+ Extracts text inventory with correct absolute positions for grouped shapes
+
+ python inventory.py presentation.pptx inventory.json --issues-only
+ Extracts only text shapes that have overflow or overlap issues
+
+The output JSON includes:
+ - All text content organized by slide and shape
+ - Correct absolute positions for shapes in groups
+ - Visual position and size in inches
+ - Paragraph properties and formatting
+ - Issue detection: text overflow and shape overlaps
+ """,
+ )
+
+ parser.add_argument("input", help="Input PowerPoint file (.pptx)")
+ parser.add_argument("output", help="Output JSON file for inventory")
+ parser.add_argument(
+ "--issues-only",
+ action="store_true",
+ help="Include only text shapes that have overflow or overlap issues",
+ )
+
+ args = parser.parse_args()
+
+ input_path = Path(args.input)
+ if not input_path.exists():
+ print(f"Error: Input file not found: {args.input}")
+ sys.exit(1)
+
+ if not input_path.suffix.lower() == ".pptx":
+ print("Error: Input must be a PowerPoint file (.pptx)")
+ sys.exit(1)
+
+ try:
+ print(f"Extracting text inventory from: {args.input}")
+ if args.issues_only:
+ print(
+ "Filtering to include only text shapes with issues (overflow/overlap)"
+ )
+ inventory = extract_text_inventory(input_path, issues_only=args.issues_only)
+
+ output_path = Path(args.output)
+ output_path.parent.mkdir(parents=True, exist_ok=True)
+ save_inventory(inventory, output_path)
+
+ print(f"Output saved to: {args.output}")
+
+ # Report statistics
+ total_slides = len(inventory)
+ total_shapes = sum(len(shapes) for shapes in inventory.values())
+ if args.issues_only:
+ if total_shapes > 0:
+ print(
+ f"Found {total_shapes} text elements with issues in {total_slides} slides"
+ )
+ else:
+ print("No issues discovered")
+ else:
+ print(
+ f"Found text in {total_slides} slides with {total_shapes} text elements"
+ )
+
+ except Exception as e:
+ print(f"Error processing presentation: {e}")
+ import traceback
+
+ traceback.print_exc()
+ sys.exit(1)
+
+
+@dataclass
+class ShapeWithPosition:
+ """A shape with its absolute position on the slide."""
+
+ shape: BaseShape
+ absolute_left: int # in EMUs
+ absolute_top: int # in EMUs
+
+
+class ParagraphData:
+ """Data structure for paragraph properties extracted from a PowerPoint paragraph."""
+
+ def __init__(self, paragraph: Any):
+ """Initialize from a PowerPoint paragraph object.
+
+ Args:
+ paragraph: The PowerPoint paragraph object
+ """
+ self.text: str = paragraph.text.strip()
+ self.bullet: bool = False
+ self.level: Optional[int] = None
+ self.alignment: Optional[str] = None
+ self.space_before: Optional[float] = None
+ self.space_after: Optional[float] = None
+ self.font_name: Optional[str] = None
+ self.font_size: Optional[float] = None
+ self.bold: Optional[bool] = None
+ self.italic: Optional[bool] = None
+ self.underline: Optional[bool] = None
+ self.color: Optional[str] = None
+ self.theme_color: Optional[str] = None
+ self.line_spacing: Optional[float] = None
+
+ # Check for bullet formatting
+ if (
+ hasattr(paragraph, "_p")
+ and paragraph._p is not None
+ and paragraph._p.pPr is not None
+ ):
+ pPr = paragraph._p.pPr
+ ns = "{http://schemas.openxmlformats.org/drawingml/2006/main}"
+ if (
+ pPr.find(f"{ns}buChar") is not None
+ or pPr.find(f"{ns}buAutoNum") is not None
+ ):
+ self.bullet = True
+ if hasattr(paragraph, "level"):
+ self.level = paragraph.level
+
+ # Add alignment if not LEFT (default)
+ if hasattr(paragraph, "alignment") and paragraph.alignment is not None:
+ alignment_map = {
+ PP_ALIGN.CENTER: "CENTER",
+ PP_ALIGN.RIGHT: "RIGHT",
+ PP_ALIGN.JUSTIFY: "JUSTIFY",
+ }
+ if paragraph.alignment in alignment_map:
+ self.alignment = alignment_map[paragraph.alignment]
+
+ # Add spacing properties if set
+ if hasattr(paragraph, "space_before") and paragraph.space_before:
+ self.space_before = paragraph.space_before.pt
+ if hasattr(paragraph, "space_after") and paragraph.space_after:
+ self.space_after = paragraph.space_after.pt
+
+ # Extract font properties from first run
+ if paragraph.runs:
+ first_run = paragraph.runs[0]
+ if hasattr(first_run, "font"):
+ font = first_run.font
+ if font.name:
+ self.font_name = font.name
+ if font.size:
+ self.font_size = font.size.pt
+ if font.bold is not None:
+ self.bold = font.bold
+ if font.italic is not None:
+ self.italic = font.italic
+ if font.underline is not None:
+ self.underline = font.underline
+
+ # Handle color - both RGB and theme colors
+ try:
+ # Try RGB color first
+ if font.color.rgb:
+ self.color = str(font.color.rgb)
+ except (AttributeError, TypeError):
+ # Fall back to theme color
+ try:
+ if font.color.theme_color:
+ self.theme_color = font.color.theme_color.name
+ except (AttributeError, TypeError):
+ pass
+
+ # Add line spacing if set
+ if hasattr(paragraph, "line_spacing") and paragraph.line_spacing is not None:
+ if hasattr(paragraph.line_spacing, "pt"):
+ self.line_spacing = round(paragraph.line_spacing.pt, 2)
+ else:
+ # Multiplier - convert to points
+ font_size = self.font_size if self.font_size else 12.0
+ self.line_spacing = round(paragraph.line_spacing * font_size, 2)
+
+ def to_dict(self) -> ParagraphDict:
+ """Convert to dictionary for JSON serialization, excluding None values."""
+ result: ParagraphDict = {"text": self.text}
+
+ # Add optional fields only if they have values
+ if self.bullet:
+ result["bullet"] = self.bullet
+ if self.level is not None:
+ result["level"] = self.level
+ if self.alignment:
+ result["alignment"] = self.alignment
+ if self.space_before is not None:
+ result["space_before"] = self.space_before
+ if self.space_after is not None:
+ result["space_after"] = self.space_after
+ if self.font_name:
+ result["font_name"] = self.font_name
+ if self.font_size is not None:
+ result["font_size"] = self.font_size
+ if self.bold is not None:
+ result["bold"] = self.bold
+ if self.italic is not None:
+ result["italic"] = self.italic
+ if self.underline is not None:
+ result["underline"] = self.underline
+ if self.color:
+ result["color"] = self.color
+ if self.theme_color:
+ result["theme_color"] = self.theme_color
+ if self.line_spacing is not None:
+ result["line_spacing"] = self.line_spacing
+
+ return result
+
+
+class ShapeData:
+ """Data structure for shape properties extracted from a PowerPoint shape."""
+
+ @staticmethod
+ def emu_to_inches(emu: int) -> float:
+ """Convert EMUs (English Metric Units) to inches."""
+ return emu / 914400.0
+
+ @staticmethod
+ def inches_to_pixels(inches: float, dpi: int = 96) -> int:
+ """Convert inches to pixels at given DPI."""
+ return int(inches * dpi)
+
+ @staticmethod
+ def get_font_path(font_name: str) -> Optional[str]:
+ """Get the font file path for a given font name.
+
+ Args:
+ font_name: Name of the font (e.g., 'Arial', 'Calibri')
+
+ Returns:
+ Path to the font file, or None if not found
+ """
+ system = platform.system()
+
+ # Common font file variations to try
+ font_variations = [
+ font_name,
+ font_name.lower(),
+ font_name.replace(" ", ""),
+ font_name.replace(" ", "-"),
+ ]
+
+ # Define font directories and extensions by platform
+ if system == "Darwin": # macOS
+ font_dirs = [
+ "/System/Library/Fonts/",
+ "/Library/Fonts/",
+ "~/Library/Fonts/",
+ ]
+ extensions = [".ttf", ".otf", ".ttc", ".dfont"]
+ else: # Linux
+ font_dirs = [
+ "/usr/share/fonts/truetype/",
+ "/usr/local/share/fonts/",
+ "~/.fonts/",
+ ]
+ extensions = [".ttf", ".otf"]
+
+ # Try to find the font file
+ from pathlib import Path
+
+ for font_dir in font_dirs:
+ font_dir_path = Path(font_dir).expanduser()
+ if not font_dir_path.exists():
+ continue
+
+ # First try exact matches
+ for variant in font_variations:
+ for ext in extensions:
+ font_path = font_dir_path / f"{variant}{ext}"
+ if font_path.exists():
+ return str(font_path)
+
+ # Then try fuzzy matching - find files containing the font name
+ try:
+ for file_path in font_dir_path.iterdir():
+ if file_path.is_file():
+ file_name_lower = file_path.name.lower()
+ font_name_lower = font_name.lower().replace(" ", "")
+ if font_name_lower in file_name_lower and any(
+ file_name_lower.endswith(ext) for ext in extensions
+ ):
+ return str(file_path)
+ except (OSError, PermissionError):
+ continue
+
+ return None
+
+ @staticmethod
+ def get_slide_dimensions(slide: Any) -> tuple[Optional[int], Optional[int]]:
+ """Get slide dimensions from slide object.
+
+ Args:
+ slide: Slide object
+
+ Returns:
+ Tuple of (width_emu, height_emu) or (None, None) if not found
+ """
+ try:
+ prs = slide.part.package.presentation_part.presentation
+ return prs.slide_width, prs.slide_height
+ except (AttributeError, TypeError):
+ return None, None
+
+ @staticmethod
+ def get_default_font_size(shape: BaseShape, slide_layout: Any) -> Optional[float]:
+ """Extract default font size from slide layout for a placeholder shape.
+
+ Args:
+ shape: Placeholder shape
+ slide_layout: Slide layout containing the placeholder definition
+
+ Returns:
+ Default font size in points, or None if not found
+ """
+ try:
+ if not hasattr(shape, "placeholder_format"):
+ return None
+
+ shape_type = shape.placeholder_format.type # type: ignore
+ for layout_placeholder in slide_layout.placeholders:
+ if layout_placeholder.placeholder_format.type == shape_type:
+ # Find first defRPr element with sz (size) attribute
+ for elem in layout_placeholder.element.iter():
+ if "defRPr" in elem.tag and (sz := elem.get("sz")):
+ return float(sz) / 100.0 # Convert EMUs to points
+ break
+ except Exception:
+ pass
+ return None
+
+ def __init__(
+ self,
+ shape: BaseShape,
+ absolute_left: Optional[int] = None,
+ absolute_top: Optional[int] = None,
+ slide: Optional[Any] = None,
+ ):
+ """Initialize from a PowerPoint shape object.
+
+ Args:
+ shape: The PowerPoint shape object (should be pre-validated)
+ absolute_left: Absolute left position in EMUs (for shapes in groups)
+ absolute_top: Absolute top position in EMUs (for shapes in groups)
+ slide: Optional slide object to get dimensions and layout information
+ """
+ self.shape = shape # Store reference to original shape
+ self.shape_id: str = "" # Will be set after sorting
+
+ # Get slide dimensions from slide object
+ self.slide_width_emu, self.slide_height_emu = (
+ self.get_slide_dimensions(slide) if slide else (None, None)
+ )
+
+ # Get placeholder type if applicable
+ self.placeholder_type: Optional[str] = None
+ self.default_font_size: Optional[float] = None
+ if hasattr(shape, "is_placeholder") and shape.is_placeholder: # type: ignore
+ if shape.placeholder_format and shape.placeholder_format.type: # type: ignore
+ self.placeholder_type = (
+ str(shape.placeholder_format.type).split(".")[-1].split(" ")[0] # type: ignore
+ )
+
+ # Get default font size from layout
+ if slide and hasattr(slide, "slide_layout"):
+ self.default_font_size = self.get_default_font_size(
+ shape, slide.slide_layout
+ )
+
+ # Get position information
+ # Use absolute positions if provided (for shapes in groups), otherwise use shape's position
+ left_emu = (
+ absolute_left
+ if absolute_left is not None
+ else (shape.left if hasattr(shape, "left") else 0)
+ )
+ top_emu = (
+ absolute_top
+ if absolute_top is not None
+ else (shape.top if hasattr(shape, "top") else 0)
+ )
+
+ self.left: float = round(self.emu_to_inches(left_emu), 2) # type: ignore
+ self.top: float = round(self.emu_to_inches(top_emu), 2) # type: ignore
+ self.width: float = round(
+ self.emu_to_inches(shape.width if hasattr(shape, "width") else 0),
+ 2, # type: ignore
+ )
+ self.height: float = round(
+ self.emu_to_inches(shape.height if hasattr(shape, "height") else 0),
+ 2, # type: ignore
+ )
+
+ # Store EMU positions for overflow calculations
+ self.left_emu = left_emu
+ self.top_emu = top_emu
+ self.width_emu = shape.width if hasattr(shape, "width") else 0
+ self.height_emu = shape.height if hasattr(shape, "height") else 0
+
+ # Calculate overflow status
+ self.frame_overflow_bottom: Optional[float] = None
+ self.slide_overflow_right: Optional[float] = None
+ self.slide_overflow_bottom: Optional[float] = None
+ self.overlapping_shapes: Dict[
+ str, float
+ ] = {} # Dict of shape_id -> overlap area in sq inches
+ self.warnings: List[str] = []
+ self._estimate_frame_overflow()
+ self._calculate_slide_overflow()
+ self._detect_bullet_issues()
+
+ @property
+ def paragraphs(self) -> List[ParagraphData]:
+ """Calculate paragraphs from the shape's text frame."""
+ if not self.shape or not hasattr(self.shape, "text_frame"):
+ return []
+
+ paragraphs = []
+ for paragraph in self.shape.text_frame.paragraphs: # type: ignore
+ if paragraph.text.strip():
+ paragraphs.append(ParagraphData(paragraph))
+ return paragraphs
+
+ def _get_default_font_size(self) -> int:
+ """Get default font size from theme text styles or use conservative default."""
+ try:
+ if not (
+ hasattr(self.shape, "part") and hasattr(self.shape.part, "slide_layout")
+ ):
+ return 14
+
+ slide_master = self.shape.part.slide_layout.slide_master # type: ignore
+ if not hasattr(slide_master, "element"):
+ return 14
+
+ # Determine theme style based on placeholder type
+ style_name = "bodyStyle" # Default
+ if self.placeholder_type and "TITLE" in self.placeholder_type:
+ style_name = "titleStyle"
+
+ # Find font size in theme styles
+ for child in slide_master.element.iter():
+ tag = child.tag.split("}")[-1] if "}" in child.tag else child.tag
+ if tag == style_name:
+ for elem in child.iter():
+ if "sz" in elem.attrib:
+ return int(elem.attrib["sz"]) // 100
+ except Exception:
+ pass
+
+ return 14 # Conservative default for body text
+
+ def _get_usable_dimensions(self, text_frame) -> Tuple[int, int]:
+ """Get usable width and height in pixels after accounting for margins."""
+ # Default PowerPoint margins in inches
+ margins = {"top": 0.05, "bottom": 0.05, "left": 0.1, "right": 0.1}
+
+ # Override with actual margins if set
+ if hasattr(text_frame, "margin_top") and text_frame.margin_top:
+ margins["top"] = self.emu_to_inches(text_frame.margin_top)
+ if hasattr(text_frame, "margin_bottom") and text_frame.margin_bottom:
+ margins["bottom"] = self.emu_to_inches(text_frame.margin_bottom)
+ if hasattr(text_frame, "margin_left") and text_frame.margin_left:
+ margins["left"] = self.emu_to_inches(text_frame.margin_left)
+ if hasattr(text_frame, "margin_right") and text_frame.margin_right:
+ margins["right"] = self.emu_to_inches(text_frame.margin_right)
+
+ # Calculate usable area
+ usable_width = self.width - margins["left"] - margins["right"]
+ usable_height = self.height - margins["top"] - margins["bottom"]
+
+ # Convert to pixels
+ return (
+ self.inches_to_pixels(usable_width),
+ self.inches_to_pixels(usable_height),
+ )
+
+ def _wrap_text_line(self, line: str, max_width_px: int, draw, font) -> List[str]:
+ """Wrap a single line of text to fit within max_width_px."""
+ if not line:
+ return [""]
+
+ # Use textlength for efficient width calculation
+ if draw.textlength(line, font=font) <= max_width_px:
+ return [line]
+
+ # Need to wrap - split into words
+ wrapped = []
+ words = line.split(" ")
+ current_line = ""
+
+ for word in words:
+ test_line = current_line + (" " if current_line else "") + word
+ if draw.textlength(test_line, font=font) <= max_width_px:
+ current_line = test_line
+ else:
+ if current_line:
+ wrapped.append(current_line)
+ current_line = word
+
+ if current_line:
+ wrapped.append(current_line)
+
+ return wrapped
+
+ def _estimate_frame_overflow(self) -> None:
+ """Estimate if text overflows the shape bounds using PIL text measurement."""
+ if not self.shape or not hasattr(self.shape, "text_frame"):
+ return
+
+ text_frame = self.shape.text_frame # type: ignore
+ if not text_frame or not text_frame.paragraphs:
+ return
+
+ # Get usable dimensions after accounting for margins
+ usable_width_px, usable_height_px = self._get_usable_dimensions(text_frame)
+ if usable_width_px <= 0 or usable_height_px <= 0:
+ return
+
+ # Set up PIL for text measurement
+ dummy_img = Image.new("RGB", (1, 1))
+ draw = ImageDraw.Draw(dummy_img)
+
+ # Get default font size from placeholder or use conservative estimate
+ default_font_size = self._get_default_font_size()
+
+ # Calculate total height of all paragraphs
+ total_height_px = 0
+
+ for para_idx, paragraph in enumerate(text_frame.paragraphs):
+ if not paragraph.text.strip():
+ continue
+
+ para_data = ParagraphData(paragraph)
+
+ # Load font for this paragraph
+ font_name = para_data.font_name or "Arial"
+ font_size = int(para_data.font_size or default_font_size)
+
+ font = None
+ font_path = self.get_font_path(font_name)
+ if font_path:
+ try:
+ font = ImageFont.truetype(font_path, size=font_size)
+ except Exception:
+ font = ImageFont.load_default()
+ else:
+ font = ImageFont.load_default()
+
+ # Wrap all lines in this paragraph
+ all_wrapped_lines = []
+ for line in paragraph.text.split("\n"):
+ wrapped = self._wrap_text_line(line, usable_width_px, draw, font)
+ all_wrapped_lines.extend(wrapped)
+
+ if all_wrapped_lines:
+ # Calculate line height
+ if para_data.line_spacing:
+ # Custom line spacing explicitly set
+ line_height_px = para_data.line_spacing * 96 / 72
+ else:
+ # PowerPoint default single spacing (1.0x font size)
+ line_height_px = font_size * 96 / 72
+
+ # Add space_before (except first paragraph)
+ if para_idx > 0 and para_data.space_before:
+ total_height_px += para_data.space_before * 96 / 72
+
+ # Add paragraph text height
+ total_height_px += len(all_wrapped_lines) * line_height_px
+
+ # Add space_after
+ if para_data.space_after:
+ total_height_px += para_data.space_after * 96 / 72
+
+ # Check for overflow (ignore negligible overflows <= 0.05")
+ if total_height_px > usable_height_px:
+ overflow_px = total_height_px - usable_height_px
+ overflow_inches = round(overflow_px / 96.0, 2)
+ if overflow_inches > 0.05: # Only report significant overflows
+ self.frame_overflow_bottom = overflow_inches
+
+ def _calculate_slide_overflow(self) -> None:
+ """Calculate if shape overflows the slide boundaries."""
+ if self.slide_width_emu is None or self.slide_height_emu is None:
+ return
+
+ # Check right overflow (ignore negligible overflows <= 0.01")
+ right_edge_emu = self.left_emu + self.width_emu
+ if right_edge_emu > self.slide_width_emu:
+ overflow_emu = right_edge_emu - self.slide_width_emu
+ overflow_inches = round(self.emu_to_inches(overflow_emu), 2)
+ if overflow_inches > 0.01: # Only report significant overflows
+ self.slide_overflow_right = overflow_inches
+
+ # Check bottom overflow (ignore negligible overflows <= 0.01")
+ bottom_edge_emu = self.top_emu + self.height_emu
+ if bottom_edge_emu > self.slide_height_emu:
+ overflow_emu = bottom_edge_emu - self.slide_height_emu
+ overflow_inches = round(self.emu_to_inches(overflow_emu), 2)
+ if overflow_inches > 0.01: # Only report significant overflows
+ self.slide_overflow_bottom = overflow_inches
+
+ def _detect_bullet_issues(self) -> None:
+ """Detect bullet point formatting issues in paragraphs."""
+ if not self.shape or not hasattr(self.shape, "text_frame"):
+ return
+
+ text_frame = self.shape.text_frame # type: ignore
+ if not text_frame or not text_frame.paragraphs:
+ return
+
+ # Common bullet symbols that indicate manual bullets
+ bullet_symbols = ["•", "●", "○"]
+
+ for paragraph in text_frame.paragraphs:
+ text = paragraph.text.strip()
+ # Check for manual bullet symbols
+ if text and any(text.startswith(symbol + " ") for symbol in bullet_symbols):
+ self.warnings.append(
+ "manual_bullet_symbol: use proper bullet formatting"
+ )
+ break
+
+ @property
+ def has_any_issues(self) -> bool:
+ """Check if shape has any issues (overflow, overlap, or warnings)."""
+ return (
+ self.frame_overflow_bottom is not None
+ or self.slide_overflow_right is not None
+ or self.slide_overflow_bottom is not None
+ or len(self.overlapping_shapes) > 0
+ or len(self.warnings) > 0
+ )
+
+ def to_dict(self) -> ShapeDict:
+ """Convert to dictionary for JSON serialization."""
+ result: ShapeDict = {
+ "left": self.left,
+ "top": self.top,
+ "width": self.width,
+ "height": self.height,
+ }
+
+ # Add optional fields if present
+ if self.placeholder_type:
+ result["placeholder_type"] = self.placeholder_type
+
+ if self.default_font_size:
+ result["default_font_size"] = self.default_font_size
+
+ # Add overflow information only if there is overflow
+ overflow_data = {}
+
+ # Add frame overflow if present
+ if self.frame_overflow_bottom is not None:
+ overflow_data["frame"] = {"overflow_bottom": self.frame_overflow_bottom}
+
+ # Add slide overflow if present
+ slide_overflow = {}
+ if self.slide_overflow_right is not None:
+ slide_overflow["overflow_right"] = self.slide_overflow_right
+ if self.slide_overflow_bottom is not None:
+ slide_overflow["overflow_bottom"] = self.slide_overflow_bottom
+ if slide_overflow:
+ overflow_data["slide"] = slide_overflow
+
+ # Only add overflow field if there is overflow
+ if overflow_data:
+ result["overflow"] = overflow_data
+
+ # Add overlap field if there are overlapping shapes
+ if self.overlapping_shapes:
+ result["overlap"] = {"overlapping_shapes": self.overlapping_shapes}
+
+ # Add warnings field if there are warnings
+ if self.warnings:
+ result["warnings"] = self.warnings
+
+ # Add paragraphs after placeholder_type
+ result["paragraphs"] = [para.to_dict() for para in self.paragraphs]
+
+ return result
+
+
+def is_valid_shape(shape: BaseShape) -> bool:
+ """Check if a shape contains meaningful text content."""
+ # Must have a text frame with content
+ if not hasattr(shape, "text_frame") or not shape.text_frame: # type: ignore
+ return False
+
+ text = shape.text_frame.text.strip() # type: ignore
+ if not text:
+ return False
+
+ # Skip slide numbers and numeric footers
+ if hasattr(shape, "is_placeholder") and shape.is_placeholder: # type: ignore
+ if shape.placeholder_format and shape.placeholder_format.type: # type: ignore
+ placeholder_type = (
+ str(shape.placeholder_format.type).split(".")[-1].split(" ")[0] # type: ignore
+ )
+ if placeholder_type == "SLIDE_NUMBER":
+ return False
+ if placeholder_type == "FOOTER" and text.isdigit():
+ return False
+
+ return True
+
+
+def collect_shapes_with_absolute_positions(
+ shape: BaseShape, parent_left: int = 0, parent_top: int = 0
+) -> List[ShapeWithPosition]:
+ """Recursively collect all shapes with valid text, calculating absolute positions.
+
+ For shapes within groups, their positions are relative to the group.
+ This function calculates the absolute position on the slide by accumulating
+ parent group offsets.
+
+ Args:
+ shape: The shape to process
+ parent_left: Accumulated left offset from parent groups (in EMUs)
+ parent_top: Accumulated top offset from parent groups (in EMUs)
+
+ Returns:
+ List of ShapeWithPosition objects with absolute positions
+ """
+ if hasattr(shape, "shapes"): # GroupShape
+ result = []
+ # Get this group's position
+ group_left = shape.left if hasattr(shape, "left") else 0
+ group_top = shape.top if hasattr(shape, "top") else 0
+
+ # Calculate absolute position for this group
+ abs_group_left = parent_left + group_left
+ abs_group_top = parent_top + group_top
+
+ # Process children with accumulated offsets
+ for child in shape.shapes: # type: ignore
+ result.extend(
+ collect_shapes_with_absolute_positions(
+ child, abs_group_left, abs_group_top
+ )
+ )
+ return result
+
+ # Regular shape - check if it has valid text
+ if is_valid_shape(shape):
+ # Calculate absolute position
+ shape_left = shape.left if hasattr(shape, "left") else 0
+ shape_top = shape.top if hasattr(shape, "top") else 0
+
+ return [
+ ShapeWithPosition(
+ shape=shape,
+ absolute_left=parent_left + shape_left,
+ absolute_top=parent_top + shape_top,
+ )
+ ]
+
+ return []
+
+
+def sort_shapes_by_position(shapes: List[ShapeData]) -> List[ShapeData]:
+ """Sort shapes by visual position (top-to-bottom, left-to-right).
+
+ Shapes within 0.5 inches vertically are considered on the same row.
+ """
+ if not shapes:
+ return shapes
+
+ # Sort by top position first
+ shapes = sorted(shapes, key=lambda s: (s.top, s.left))
+
+ # Group shapes by row (within 0.5 inches vertically)
+ result = []
+ row = [shapes[0]]
+ row_top = shapes[0].top
+
+ for shape in shapes[1:]:
+ if abs(shape.top - row_top) <= 0.5:
+ row.append(shape)
+ else:
+ # Sort current row by left position and add to result
+ result.extend(sorted(row, key=lambda s: s.left))
+ row = [shape]
+ row_top = shape.top
+
+ # Don't forget the last row
+ result.extend(sorted(row, key=lambda s: s.left))
+ return result
+
+
+def calculate_overlap(
+ rect1: Tuple[float, float, float, float],
+ rect2: Tuple[float, float, float, float],
+ tolerance: float = 0.05,
+) -> Tuple[bool, float]:
+ """Calculate if and how much two rectangles overlap.
+
+ Args:
+ rect1: (left, top, width, height) of first rectangle in inches
+ rect2: (left, top, width, height) of second rectangle in inches
+ tolerance: Minimum overlap in inches to consider as overlapping (default: 0.05")
+
+ Returns:
+ Tuple of (overlaps, overlap_area) where:
+ - overlaps: True if rectangles overlap by more than tolerance
+ - overlap_area: Area of overlap in square inches
+ """
+ left1, top1, w1, h1 = rect1
+ left2, top2, w2, h2 = rect2
+
+ # Calculate overlap dimensions
+ overlap_width = min(left1 + w1, left2 + w2) - max(left1, left2)
+ overlap_height = min(top1 + h1, top2 + h2) - max(top1, top2)
+
+ # Check if there's meaningful overlap (more than tolerance)
+ if overlap_width > tolerance and overlap_height > tolerance:
+ # Calculate overlap area in square inches
+ overlap_area = overlap_width * overlap_height
+ return True, round(overlap_area, 2)
+
+ return False, 0
+
+
+def detect_overlaps(shapes: List[ShapeData]) -> None:
+ """Detect overlapping shapes and update their overlapping_shapes dictionaries.
+
+ This function requires each ShapeData to have its shape_id already set.
+ It modifies the shapes in-place, adding shape IDs with overlap areas in square inches.
+
+ Args:
+ shapes: List of ShapeData objects with shape_id attributes set
+ """
+ n = len(shapes)
+
+ # Compare each pair of shapes
+ for i in range(n):
+ for j in range(i + 1, n):
+ shape1 = shapes[i]
+ shape2 = shapes[j]
+
+ # Ensure shape IDs are set
+ assert shape1.shape_id, f"Shape at index {i} has no shape_id"
+ assert shape2.shape_id, f"Shape at index {j} has no shape_id"
+
+ rect1 = (shape1.left, shape1.top, shape1.width, shape1.height)
+ rect2 = (shape2.left, shape2.top, shape2.width, shape2.height)
+
+ overlaps, overlap_area = calculate_overlap(rect1, rect2)
+
+ if overlaps:
+ # Add shape IDs with overlap area in square inches
+ shape1.overlapping_shapes[shape2.shape_id] = overlap_area
+ shape2.overlapping_shapes[shape1.shape_id] = overlap_area
+
+
+def extract_text_inventory(
+ pptx_path: Path, prs: Optional[Any] = None, issues_only: bool = False
+) -> InventoryData:
+ """Extract text content from all slides in a PowerPoint presentation.
+
+ Args:
+ pptx_path: Path to the PowerPoint file
+ prs: Optional Presentation object to use. If not provided, will load from pptx_path.
+ issues_only: If True, only include shapes that have overflow or overlap issues
+
+ Returns a nested dictionary: {slide-N: {shape-N: ShapeData}}
+ Shapes are sorted by visual position (top-to-bottom, left-to-right).
+ The ShapeData objects contain the full shape information and can be
+ converted to dictionaries for JSON serialization using to_dict().
+ """
+ if prs is None:
+ prs = Presentation(str(pptx_path))
+ inventory: InventoryData = {}
+
+ for slide_idx, slide in enumerate(prs.slides):
+ # Collect all valid shapes from this slide with absolute positions
+ shapes_with_positions = []
+ for shape in slide.shapes: # type: ignore
+ shapes_with_positions.extend(collect_shapes_with_absolute_positions(shape))
+
+ if not shapes_with_positions:
+ continue
+
+ # Convert to ShapeData with absolute positions and slide reference
+ shape_data_list = [
+ ShapeData(
+ swp.shape,
+ swp.absolute_left,
+ swp.absolute_top,
+ slide,
+ )
+ for swp in shapes_with_positions
+ ]
+
+ # Sort by visual position and assign stable IDs in one step
+ sorted_shapes = sort_shapes_by_position(shape_data_list)
+ for idx, shape_data in enumerate(sorted_shapes):
+ shape_data.shape_id = f"shape-{idx}"
+
+ # Detect overlaps using the stable shape IDs
+ if len(sorted_shapes) > 1:
+ detect_overlaps(sorted_shapes)
+
+ # Filter for issues only if requested (after overlap detection)
+ if issues_only:
+ sorted_shapes = [sd for sd in sorted_shapes if sd.has_any_issues]
+
+ if not sorted_shapes:
+ continue
+
+ # Create slide inventory using the stable shape IDs
+ inventory[f"slide-{slide_idx}"] = {
+ shape_data.shape_id: shape_data for shape_data in sorted_shapes
+ }
+
+ return inventory
+
+
+def get_inventory_as_dict(pptx_path: Path, issues_only: bool = False) -> InventoryDict:
+ """Extract text inventory and return as JSON-serializable dictionaries.
+
+ This is a convenience wrapper around extract_text_inventory that returns
+ dictionaries instead of ShapeData objects, useful for testing and direct
+ JSON serialization.
+
+ Args:
+ pptx_path: Path to the PowerPoint file
+ issues_only: If True, only include shapes that have overflow or overlap issues
+
+ Returns:
+ Nested dictionary with all data serialized for JSON
+ """
+ inventory = extract_text_inventory(pptx_path, issues_only=issues_only)
+
+ # Convert ShapeData objects to dictionaries
+ dict_inventory: InventoryDict = {}
+ for slide_key, shapes in inventory.items():
+ dict_inventory[slide_key] = {
+ shape_key: shape_data.to_dict() for shape_key, shape_data in shapes.items()
+ }
+
+ return dict_inventory
+
+
+def save_inventory(inventory: InventoryData, output_path: Path) -> None:
+ """Save inventory to JSON file with proper formatting.
+
+ Converts ShapeData objects to dictionaries for JSON serialization.
+ """
+ # Convert ShapeData objects to dictionaries
+ json_inventory: InventoryDict = {}
+ for slide_key, shapes in inventory.items():
+ json_inventory[slide_key] = {
+ shape_key: shape_data.to_dict() for shape_key, shape_data in shapes.items()
+ }
+
+ with open(output_path, "w", encoding="utf-8") as f:
+ json.dump(json_inventory, f, indent=2, ensure_ascii=False)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/scientific-skills/document-skills/pptx/scripts/rearrange.py b/scientific-skills/document-skills/pptx/scripts/rearrange.py
new file mode 100755
index 0000000..2519911
--- /dev/null
+++ b/scientific-skills/document-skills/pptx/scripts/rearrange.py
@@ -0,0 +1,231 @@
+#!/usr/bin/env python3
+"""
+Rearrange PowerPoint slides based on a sequence of indices.
+
+Usage:
+ python rearrange.py template.pptx output.pptx 0,34,34,50,52
+
+This will create output.pptx using slides from template.pptx in the specified order.
+Slides can be repeated (e.g., 34 appears twice).
+"""
+
+import argparse
+import shutil
+import sys
+from copy import deepcopy
+from pathlib import Path
+
+import six
+from pptx import Presentation
+
+
+def main():
+ parser = argparse.ArgumentParser(
+ description="Rearrange PowerPoint slides based on a sequence of indices.",
+ formatter_class=argparse.RawDescriptionHelpFormatter,
+ epilog="""
+Examples:
+ python rearrange.py template.pptx output.pptx 0,34,34,50,52
+ Creates output.pptx using slides 0, 34 (twice), 50, and 52 from template.pptx
+
+ python rearrange.py template.pptx output.pptx 5,3,1,2,4
+ Creates output.pptx with slides reordered as specified
+
+Note: Slide indices are 0-based (first slide is 0, second is 1, etc.)
+ """,
+ )
+
+ parser.add_argument("template", help="Path to template PPTX file")
+ parser.add_argument("output", help="Path for output PPTX file")
+ parser.add_argument(
+ "sequence", help="Comma-separated sequence of slide indices (0-based)"
+ )
+
+ args = parser.parse_args()
+
+ # Parse the slide sequence
+ try:
+ slide_sequence = [int(x.strip()) for x in args.sequence.split(",")]
+ except ValueError:
+ print(
+ "Error: Invalid sequence format. Use comma-separated integers (e.g., 0,34,34,50,52)"
+ )
+ sys.exit(1)
+
+ # Check template exists
+ template_path = Path(args.template)
+ if not template_path.exists():
+ print(f"Error: Template file not found: {args.template}")
+ sys.exit(1)
+
+ # Create output directory if needed
+ output_path = Path(args.output)
+ output_path.parent.mkdir(parents=True, exist_ok=True)
+
+ try:
+ rearrange_presentation(template_path, output_path, slide_sequence)
+ except ValueError as e:
+ print(f"Error: {e}")
+ sys.exit(1)
+ except Exception as e:
+ print(f"Error processing presentation: {e}")
+ sys.exit(1)
+
+
+def duplicate_slide(pres, index):
+ """Duplicate a slide in the presentation."""
+ source = pres.slides[index]
+
+ # Use source's layout to preserve formatting
+ new_slide = pres.slides.add_slide(source.slide_layout)
+
+ # Collect all image and media relationships from the source slide
+ image_rels = {}
+ for rel_id, rel in six.iteritems(source.part.rels):
+ if "image" in rel.reltype or "media" in rel.reltype:
+ image_rels[rel_id] = rel
+
+ # CRITICAL: Clear placeholder shapes to avoid duplicates
+ for shape in new_slide.shapes:
+ sp = shape.element
+ sp.getparent().remove(sp)
+
+ # Copy all shapes from source
+ for shape in source.shapes:
+ el = shape.element
+ new_el = deepcopy(el)
+ new_slide.shapes._spTree.insert_element_before(new_el, "p:extLst")
+
+ # Handle picture shapes - need to update the blip reference
+ # Look for all blip elements (they can be in pic or other contexts)
+ # Using the element's own xpath method without namespaces argument
+ blips = new_el.xpath(".//a:blip[@r:embed]")
+ for blip in blips:
+ old_rId = blip.get(
+ "{http://schemas.openxmlformats.org/officeDocument/2006/relationships}embed"
+ )
+ if old_rId in image_rels:
+ # Create a new relationship in the destination slide for this image
+ old_rel = image_rels[old_rId]
+ # get_or_add returns the rId directly, or adds and returns new rId
+ new_rId = new_slide.part.rels.get_or_add(
+ old_rel.reltype, old_rel._target
+ )
+ # Update the blip's embed reference to use the new relationship ID
+ blip.set(
+ "{http://schemas.openxmlformats.org/officeDocument/2006/relationships}embed",
+ new_rId,
+ )
+
+ # Copy any additional image/media relationships that might be referenced elsewhere
+ for rel_id, rel in image_rels.items():
+ try:
+ new_slide.part.rels.get_or_add(rel.reltype, rel._target)
+ except Exception:
+ pass # Relationship might already exist
+
+ return new_slide
+
+
+def delete_slide(pres, index):
+ """Delete a slide from the presentation."""
+ rId = pres.slides._sldIdLst[index].rId
+ pres.part.drop_rel(rId)
+ del pres.slides._sldIdLst[index]
+
+
+def reorder_slides(pres, slide_index, target_index):
+ """Move a slide from one position to another."""
+ slides = pres.slides._sldIdLst
+
+ # Remove slide element from current position
+ slide_element = slides[slide_index]
+ slides.remove(slide_element)
+
+ # Insert at target position
+ slides.insert(target_index, slide_element)
+
+
+def rearrange_presentation(template_path, output_path, slide_sequence):
+ """
+ Create a new presentation with slides from template in specified order.
+
+ Args:
+ template_path: Path to template PPTX file
+ output_path: Path for output PPTX file
+ slide_sequence: List of slide indices (0-based) to include
+ """
+ # Copy template to preserve dimensions and theme
+ if template_path != output_path:
+ shutil.copy2(template_path, output_path)
+ prs = Presentation(output_path)
+ else:
+ prs = Presentation(template_path)
+
+ total_slides = len(prs.slides)
+
+ # Validate indices
+ for idx in slide_sequence:
+ if idx < 0 or idx >= total_slides:
+ raise ValueError(f"Slide index {idx} out of range (0-{total_slides - 1})")
+
+ # Track original slides and their duplicates
+ slide_map = [] # List of actual slide indices for final presentation
+ duplicated = {} # Track duplicates: original_idx -> [duplicate_indices]
+
+ # Step 1: DUPLICATE repeated slides
+ print(f"Processing {len(slide_sequence)} slides from template...")
+ for i, template_idx in enumerate(slide_sequence):
+ if template_idx in duplicated and duplicated[template_idx]:
+ # Already duplicated this slide, use the duplicate
+ slide_map.append(duplicated[template_idx].pop(0))
+ print(f" [{i}] Using duplicate of slide {template_idx}")
+ elif slide_sequence.count(template_idx) > 1 and template_idx not in duplicated:
+ # First occurrence of a repeated slide - create duplicates
+ slide_map.append(template_idx)
+ duplicates = []
+ count = slide_sequence.count(template_idx) - 1
+ print(
+ f" [{i}] Using original slide {template_idx}, creating {count} duplicate(s)"
+ )
+ for _ in range(count):
+ duplicate_slide(prs, template_idx)
+ duplicates.append(len(prs.slides) - 1)
+ duplicated[template_idx] = duplicates
+ else:
+ # Unique slide or first occurrence already handled, use original
+ slide_map.append(template_idx)
+ print(f" [{i}] Using original slide {template_idx}")
+
+ # Step 2: DELETE unwanted slides (work backwards)
+ slides_to_keep = set(slide_map)
+ print(f"\nDeleting {len(prs.slides) - len(slides_to_keep)} unused slides...")
+ for i in range(len(prs.slides) - 1, -1, -1):
+ if i not in slides_to_keep:
+ delete_slide(prs, i)
+ # Update slide_map indices after deletion
+ slide_map = [idx - 1 if idx > i else idx for idx in slide_map]
+
+ # Step 3: REORDER to final sequence
+ print(f"Reordering {len(slide_map)} slides to final sequence...")
+ for target_pos in range(len(slide_map)):
+ # Find which slide should be at target_pos
+ current_pos = slide_map[target_pos]
+ if current_pos != target_pos:
+ reorder_slides(prs, current_pos, target_pos)
+ # Update slide_map: the move shifts other slides
+ for i in range(len(slide_map)):
+ if slide_map[i] > current_pos and slide_map[i] <= target_pos:
+ slide_map[i] -= 1
+ elif slide_map[i] < current_pos and slide_map[i] >= target_pos:
+ slide_map[i] += 1
+ slide_map[target_pos] = target_pos
+
+ # Save the presentation
+ prs.save(output_path)
+ print(f"\nSaved rearranged presentation to: {output_path}")
+ print(f"Final presentation has {len(prs.slides)} slides")
+
+
+if __name__ == "__main__":
+ main()
diff --git a/scientific-skills/document-skills/pptx/scripts/replace.py b/scientific-skills/document-skills/pptx/scripts/replace.py
new file mode 100755
index 0000000..8f7a8b1
--- /dev/null
+++ b/scientific-skills/document-skills/pptx/scripts/replace.py
@@ -0,0 +1,385 @@
+#!/usr/bin/env python3
+"""Apply text replacements to PowerPoint presentation.
+
+Usage:
+ python replace.py
+
+The replacements JSON should have the structure output by inventory.py.
+ALL text shapes identified by inventory.py will have their text cleared
+unless "paragraphs" is specified in the replacements for that shape.
+"""
+
+import json
+import sys
+from pathlib import Path
+from typing import Any, Dict, List
+
+from inventory import InventoryData, extract_text_inventory
+from pptx import Presentation
+from pptx.dml.color import RGBColor
+from pptx.enum.dml import MSO_THEME_COLOR
+from pptx.enum.text import PP_ALIGN
+from pptx.oxml.xmlchemy import OxmlElement
+from pptx.util import Pt
+
+
+def clear_paragraph_bullets(paragraph):
+ """Clear bullet formatting from a paragraph."""
+ pPr = paragraph._element.get_or_add_pPr()
+
+ # Remove existing bullet elements
+ for child in list(pPr):
+ if (
+ child.tag.endswith("buChar")
+ or child.tag.endswith("buNone")
+ or child.tag.endswith("buAutoNum")
+ or child.tag.endswith("buFont")
+ ):
+ pPr.remove(child)
+
+ return pPr
+
+
+def apply_paragraph_properties(paragraph, para_data: Dict[str, Any]):
+ """Apply formatting properties to a paragraph."""
+ # Get the text but don't set it on paragraph directly yet
+ text = para_data.get("text", "")
+
+ # Get or create paragraph properties
+ pPr = clear_paragraph_bullets(paragraph)
+
+ # Handle bullet formatting
+ if para_data.get("bullet", False):
+ level = para_data.get("level", 0)
+ paragraph.level = level
+
+ # Calculate font-proportional indentation
+ font_size = para_data.get("font_size", 18.0)
+ level_indent_emu = int((font_size * (1.6 + level * 1.6)) * 12700)
+ hanging_indent_emu = int(-font_size * 0.8 * 12700)
+
+ # Set indentation
+ pPr.attrib["marL"] = str(level_indent_emu)
+ pPr.attrib["indent"] = str(hanging_indent_emu)
+
+ # Add bullet character
+ buChar = OxmlElement("a:buChar")
+ buChar.set("char", "•")
+ pPr.append(buChar)
+
+ # Default to left alignment for bullets if not specified
+ if "alignment" not in para_data:
+ paragraph.alignment = PP_ALIGN.LEFT
+ else:
+ # Remove indentation for non-bullet text
+ pPr.attrib["marL"] = "0"
+ pPr.attrib["indent"] = "0"
+
+ # Add buNone element
+ buNone = OxmlElement("a:buNone")
+ pPr.insert(0, buNone)
+
+ # Apply alignment
+ if "alignment" in para_data:
+ alignment_map = {
+ "LEFT": PP_ALIGN.LEFT,
+ "CENTER": PP_ALIGN.CENTER,
+ "RIGHT": PP_ALIGN.RIGHT,
+ "JUSTIFY": PP_ALIGN.JUSTIFY,
+ }
+ if para_data["alignment"] in alignment_map:
+ paragraph.alignment = alignment_map[para_data["alignment"]]
+
+ # Apply spacing
+ if "space_before" in para_data:
+ paragraph.space_before = Pt(para_data["space_before"])
+ if "space_after" in para_data:
+ paragraph.space_after = Pt(para_data["space_after"])
+ if "line_spacing" in para_data:
+ paragraph.line_spacing = Pt(para_data["line_spacing"])
+
+ # Apply run-level formatting
+ if not paragraph.runs:
+ run = paragraph.add_run()
+ run.text = text
+ else:
+ run = paragraph.runs[0]
+ run.text = text
+
+ # Apply font properties
+ apply_font_properties(run, para_data)
+
+
+def apply_font_properties(run, para_data: Dict[str, Any]):
+ """Apply font properties to a text run."""
+ if "bold" in para_data:
+ run.font.bold = para_data["bold"]
+ if "italic" in para_data:
+ run.font.italic = para_data["italic"]
+ if "underline" in para_data:
+ run.font.underline = para_data["underline"]
+ if "font_size" in para_data:
+ run.font.size = Pt(para_data["font_size"])
+ if "font_name" in para_data:
+ run.font.name = para_data["font_name"]
+
+ # Apply color - prefer RGB, fall back to theme_color
+ if "color" in para_data:
+ color_hex = para_data["color"].lstrip("#")
+ if len(color_hex) == 6:
+ r = int(color_hex[0:2], 16)
+ g = int(color_hex[2:4], 16)
+ b = int(color_hex[4:6], 16)
+ run.font.color.rgb = RGBColor(r, g, b)
+ elif "theme_color" in para_data:
+ # Get theme color by name (e.g., "DARK_1", "ACCENT_1")
+ theme_name = para_data["theme_color"]
+ try:
+ run.font.color.theme_color = getattr(MSO_THEME_COLOR, theme_name)
+ except AttributeError:
+ print(f" WARNING: Unknown theme color name '{theme_name}'")
+
+
+def detect_frame_overflow(inventory: InventoryData) -> Dict[str, Dict[str, float]]:
+ """Detect text overflow in shapes (text exceeding shape bounds).
+
+ Returns dict of slide_key -> shape_key -> overflow_inches.
+ Only includes shapes that have text overflow.
+ """
+ overflow_map = {}
+
+ for slide_key, shapes_dict in inventory.items():
+ for shape_key, shape_data in shapes_dict.items():
+ # Check for frame overflow (text exceeding shape bounds)
+ if shape_data.frame_overflow_bottom is not None:
+ if slide_key not in overflow_map:
+ overflow_map[slide_key] = {}
+ overflow_map[slide_key][shape_key] = shape_data.frame_overflow_bottom
+
+ return overflow_map
+
+
+def validate_replacements(inventory: InventoryData, replacements: Dict) -> List[str]:
+ """Validate that all shapes in replacements exist in inventory.
+
+ Returns list of error messages.
+ """
+ errors = []
+
+ for slide_key, shapes_data in replacements.items():
+ if not slide_key.startswith("slide-"):
+ continue
+
+ # Check if slide exists
+ if slide_key not in inventory:
+ errors.append(f"Slide '{slide_key}' not found in inventory")
+ continue
+
+ # Check each shape
+ for shape_key in shapes_data.keys():
+ if shape_key not in inventory[slide_key]:
+ # Find shapes without replacements defined and show their content
+ unused_with_content = []
+ for k in inventory[slide_key].keys():
+ if k not in shapes_data:
+ shape_data = inventory[slide_key][k]
+ # Get text from paragraphs as preview
+ paragraphs = shape_data.paragraphs
+ if paragraphs and paragraphs[0].text:
+ first_text = paragraphs[0].text[:50]
+ if len(paragraphs[0].text) > 50:
+ first_text += "..."
+ unused_with_content.append(f"{k} ('{first_text}')")
+ else:
+ unused_with_content.append(k)
+
+ errors.append(
+ f"Shape '{shape_key}' not found on '{slide_key}'. "
+ f"Shapes without replacements: {', '.join(sorted(unused_with_content)) if unused_with_content else 'none'}"
+ )
+
+ return errors
+
+
+def check_duplicate_keys(pairs):
+ """Check for duplicate keys when loading JSON."""
+ result = {}
+ for key, value in pairs:
+ if key in result:
+ raise ValueError(f"Duplicate key found in JSON: '{key}'")
+ result[key] = value
+ return result
+
+
+def apply_replacements(pptx_file: str, json_file: str, output_file: str):
+ """Apply text replacements from JSON to PowerPoint presentation."""
+
+ # Load presentation
+ prs = Presentation(pptx_file)
+
+ # Get inventory of all text shapes (returns ShapeData objects)
+ # Pass prs to use same Presentation instance
+ inventory = extract_text_inventory(Path(pptx_file), prs)
+
+ # Detect text overflow in original presentation
+ original_overflow = detect_frame_overflow(inventory)
+
+ # Load replacement data with duplicate key detection
+ with open(json_file, "r") as f:
+ replacements = json.load(f, object_pairs_hook=check_duplicate_keys)
+
+ # Validate replacements
+ errors = validate_replacements(inventory, replacements)
+ if errors:
+ print("ERROR: Invalid shapes in replacement JSON:")
+ for error in errors:
+ print(f" - {error}")
+ print("\nPlease check the inventory and update your replacement JSON.")
+ print(
+ "You can regenerate the inventory with: python inventory.py "
+ )
+ raise ValueError(f"Found {len(errors)} validation error(s)")
+
+ # Track statistics
+ shapes_processed = 0
+ shapes_cleared = 0
+ shapes_replaced = 0
+
+ # Process each slide from inventory
+ for slide_key, shapes_dict in inventory.items():
+ if not slide_key.startswith("slide-"):
+ continue
+
+ slide_index = int(slide_key.split("-")[1])
+
+ if slide_index >= len(prs.slides):
+ print(f"Warning: Slide {slide_index} not found")
+ continue
+
+ # Process each shape from inventory
+ for shape_key, shape_data in shapes_dict.items():
+ shapes_processed += 1
+
+ # Get the shape directly from ShapeData
+ shape = shape_data.shape
+ if not shape:
+ print(f"Warning: {shape_key} has no shape reference")
+ continue
+
+ # ShapeData already validates text_frame in __init__
+ text_frame = shape.text_frame # type: ignore
+
+ text_frame.clear() # type: ignore
+ shapes_cleared += 1
+
+ # Check for replacement paragraphs
+ replacement_shape_data = replacements.get(slide_key, {}).get(shape_key, {})
+ if "paragraphs" not in replacement_shape_data:
+ continue
+
+ shapes_replaced += 1
+
+ # Add replacement paragraphs
+ for i, para_data in enumerate(replacement_shape_data["paragraphs"]):
+ if i == 0:
+ p = text_frame.paragraphs[0] # type: ignore
+ else:
+ p = text_frame.add_paragraph() # type: ignore
+
+ apply_paragraph_properties(p, para_data)
+
+ # Check for issues after replacements
+ # Save to a temporary file and reload to avoid modifying the presentation during inventory
+ # (extract_text_inventory accesses font.color which adds empty elements)
+ import tempfile
+
+ with tempfile.NamedTemporaryFile(suffix=".pptx", delete=False) as tmp:
+ tmp_path = Path(tmp.name)
+ prs.save(str(tmp_path))
+
+ try:
+ updated_inventory = extract_text_inventory(tmp_path)
+ updated_overflow = detect_frame_overflow(updated_inventory)
+ finally:
+ tmp_path.unlink() # Clean up temp file
+
+ # Check if any text overflow got worse
+ overflow_errors = []
+ for slide_key, shape_overflows in updated_overflow.items():
+ for shape_key, new_overflow in shape_overflows.items():
+ # Get original overflow (0 if there was no overflow before)
+ original = original_overflow.get(slide_key, {}).get(shape_key, 0.0)
+
+ # Error if overflow increased
+ if new_overflow > original + 0.01: # Small tolerance for rounding
+ increase = new_overflow - original
+ overflow_errors.append(
+ f'{slide_key}/{shape_key}: overflow worsened by {increase:.2f}" '
+ f'(was {original:.2f}", now {new_overflow:.2f}")'
+ )
+
+ # Collect warnings from updated shapes
+ warnings = []
+ for slide_key, shapes_dict in updated_inventory.items():
+ for shape_key, shape_data in shapes_dict.items():
+ if shape_data.warnings:
+ for warning in shape_data.warnings:
+ warnings.append(f"{slide_key}/{shape_key}: {warning}")
+
+ # Fail if there are any issues
+ if overflow_errors or warnings:
+ print("\nERROR: Issues detected in replacement output:")
+ if overflow_errors:
+ print("\nText overflow worsened:")
+ for error in overflow_errors:
+ print(f" - {error}")
+ if warnings:
+ print("\nFormatting warnings:")
+ for warning in warnings:
+ print(f" - {warning}")
+ print("\nPlease fix these issues before saving.")
+ raise ValueError(
+ f"Found {len(overflow_errors)} overflow error(s) and {len(warnings)} warning(s)"
+ )
+
+ # Save the presentation
+ prs.save(output_file)
+
+ # Report results
+ print(f"Saved updated presentation to: {output_file}")
+ print(f"Processed {len(prs.slides)} slides")
+ print(f" - Shapes processed: {shapes_processed}")
+ print(f" - Shapes cleared: {shapes_cleared}")
+ print(f" - Shapes replaced: {shapes_replaced}")
+
+
+def main():
+ """Main entry point for command-line usage."""
+ if len(sys.argv) != 4:
+ print(__doc__)
+ sys.exit(1)
+
+ input_pptx = Path(sys.argv[1])
+ replacements_json = Path(sys.argv[2])
+ output_pptx = Path(sys.argv[3])
+
+ if not input_pptx.exists():
+ print(f"Error: Input file '{input_pptx}' not found")
+ sys.exit(1)
+
+ if not replacements_json.exists():
+ print(f"Error: Replacements JSON file '{replacements_json}' not found")
+ sys.exit(1)
+
+ try:
+ apply_replacements(str(input_pptx), str(replacements_json), str(output_pptx))
+ except Exception as e:
+ print(f"Error applying replacements: {e}")
+ import traceback
+
+ traceback.print_exc()
+ sys.exit(1)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/scientific-skills/document-skills/pptx/scripts/thumbnail.py b/scientific-skills/document-skills/pptx/scripts/thumbnail.py
new file mode 100755
index 0000000..5c7fdf1
--- /dev/null
+++ b/scientific-skills/document-skills/pptx/scripts/thumbnail.py
@@ -0,0 +1,450 @@
+#!/usr/bin/env python3
+"""
+Create thumbnail grids from PowerPoint presentation slides.
+
+Creates a grid layout of slide thumbnails with configurable columns (max 6).
+Each grid contains up to cols×(cols+1) images. For presentations with more
+slides, multiple numbered grid files are created automatically.
+
+The program outputs the names of all files created.
+
+Output:
+- Single grid: {prefix}.jpg (if slides fit in one grid)
+- Multiple grids: {prefix}-1.jpg, {prefix}-2.jpg, etc.
+
+Grid limits by column count:
+- 3 cols: max 12 slides per grid (3×4)
+- 4 cols: max 20 slides per grid (4×5)
+- 5 cols: max 30 slides per grid (5×6) [default]
+- 6 cols: max 42 slides per grid (6×7)
+
+Usage:
+ python thumbnail.py input.pptx [output_prefix] [--cols N] [--outline-placeholders]
+
+Examples:
+ python thumbnail.py presentation.pptx
+ # Creates: thumbnails.jpg (using default prefix)
+ # Outputs:
+ # Created 1 grid(s):
+ # - thumbnails.jpg
+
+ python thumbnail.py large-deck.pptx grid --cols 4
+ # Creates: grid-1.jpg, grid-2.jpg, grid-3.jpg
+ # Outputs:
+ # Created 3 grid(s):
+ # - grid-1.jpg
+ # - grid-2.jpg
+ # - grid-3.jpg
+
+ python thumbnail.py template.pptx analysis --outline-placeholders
+ # Creates thumbnail grids with red outlines around text placeholders
+"""
+
+import argparse
+import subprocess
+import sys
+import tempfile
+from pathlib import Path
+
+from inventory import extract_text_inventory
+from PIL import Image, ImageDraw, ImageFont
+from pptx import Presentation
+
+# Constants
+THUMBNAIL_WIDTH = 300 # Fixed thumbnail width in pixels
+CONVERSION_DPI = 100 # DPI for PDF to image conversion
+MAX_COLS = 6 # Maximum number of columns
+DEFAULT_COLS = 5 # Default number of columns
+JPEG_QUALITY = 95 # JPEG compression quality
+
+# Grid layout constants
+GRID_PADDING = 20 # Padding between thumbnails
+BORDER_WIDTH = 2 # Border width around thumbnails
+FONT_SIZE_RATIO = 0.12 # Font size as fraction of thumbnail width
+LABEL_PADDING_RATIO = 0.4 # Label padding as fraction of font size
+
+
+def main():
+ parser = argparse.ArgumentParser(
+ description="Create thumbnail grids from PowerPoint slides."
+ )
+ parser.add_argument("input", help="Input PowerPoint file (.pptx)")
+ parser.add_argument(
+ "output_prefix",
+ nargs="?",
+ default="thumbnails",
+ help="Output prefix for image files (default: thumbnails, will create prefix.jpg or prefix-N.jpg)",
+ )
+ parser.add_argument(
+ "--cols",
+ type=int,
+ default=DEFAULT_COLS,
+ help=f"Number of columns (default: {DEFAULT_COLS}, max: {MAX_COLS})",
+ )
+ parser.add_argument(
+ "--outline-placeholders",
+ action="store_true",
+ help="Outline text placeholders with a colored border",
+ )
+
+ args = parser.parse_args()
+
+ # Validate columns
+ cols = min(args.cols, MAX_COLS)
+ if args.cols > MAX_COLS:
+ print(f"Warning: Columns limited to {MAX_COLS} (requested {args.cols})")
+
+ # Validate input
+ input_path = Path(args.input)
+ if not input_path.exists() or input_path.suffix.lower() != ".pptx":
+ print(f"Error: Invalid PowerPoint file: {args.input}")
+ sys.exit(1)
+
+ # Construct output path (always JPG)
+ output_path = Path(f"{args.output_prefix}.jpg")
+
+ print(f"Processing: {args.input}")
+
+ try:
+ with tempfile.TemporaryDirectory() as temp_dir:
+ # Get placeholder regions if outlining is enabled
+ placeholder_regions = None
+ slide_dimensions = None
+ if args.outline_placeholders:
+ print("Extracting placeholder regions...")
+ placeholder_regions, slide_dimensions = get_placeholder_regions(
+ input_path
+ )
+ if placeholder_regions:
+ print(f"Found placeholders on {len(placeholder_regions)} slides")
+
+ # Convert slides to images
+ slide_images = convert_to_images(input_path, Path(temp_dir), CONVERSION_DPI)
+ if not slide_images:
+ print("Error: No slides found")
+ sys.exit(1)
+
+ print(f"Found {len(slide_images)} slides")
+
+ # Create grids (max cols×(cols+1) images per grid)
+ grid_files = create_grids(
+ slide_images,
+ cols,
+ THUMBNAIL_WIDTH,
+ output_path,
+ placeholder_regions,
+ slide_dimensions,
+ )
+
+ # Print saved files
+ print(f"Created {len(grid_files)} grid(s):")
+ for grid_file in grid_files:
+ print(f" - {grid_file}")
+
+ except Exception as e:
+ print(f"Error: {e}")
+ sys.exit(1)
+
+
+def create_hidden_slide_placeholder(size):
+ """Create placeholder image for hidden slides."""
+ img = Image.new("RGB", size, color="#F0F0F0")
+ draw = ImageDraw.Draw(img)
+ line_width = max(5, min(size) // 100)
+ draw.line([(0, 0), size], fill="#CCCCCC", width=line_width)
+ draw.line([(size[0], 0), (0, size[1])], fill="#CCCCCC", width=line_width)
+ return img
+
+
+def get_placeholder_regions(pptx_path):
+ """Extract ALL text regions from the presentation.
+
+ Returns a tuple of (placeholder_regions, slide_dimensions).
+ text_regions is a dict mapping slide indices to lists of text regions.
+ Each region is a dict with 'left', 'top', 'width', 'height' in inches.
+ slide_dimensions is a tuple of (width_inches, height_inches).
+ """
+ prs = Presentation(str(pptx_path))
+ inventory = extract_text_inventory(pptx_path, prs)
+ placeholder_regions = {}
+
+ # Get actual slide dimensions in inches (EMU to inches conversion)
+ slide_width_inches = (prs.slide_width or 9144000) / 914400.0
+ slide_height_inches = (prs.slide_height or 5143500) / 914400.0
+
+ for slide_key, shapes in inventory.items():
+ # Extract slide index from "slide-N" format
+ slide_idx = int(slide_key.split("-")[1])
+ regions = []
+
+ for shape_key, shape_data in shapes.items():
+ # The inventory only contains shapes with text, so all shapes should be highlighted
+ regions.append(
+ {
+ "left": shape_data.left,
+ "top": shape_data.top,
+ "width": shape_data.width,
+ "height": shape_data.height,
+ }
+ )
+
+ if regions:
+ placeholder_regions[slide_idx] = regions
+
+ return placeholder_regions, (slide_width_inches, slide_height_inches)
+
+
+def convert_to_images(pptx_path, temp_dir, dpi):
+ """Convert PowerPoint to images via PDF, handling hidden slides."""
+ # Detect hidden slides
+ print("Analyzing presentation...")
+ prs = Presentation(str(pptx_path))
+ total_slides = len(prs.slides)
+
+ # Find hidden slides (1-based indexing for display)
+ hidden_slides = {
+ idx + 1
+ for idx, slide in enumerate(prs.slides)
+ if slide.element.get("show") == "0"
+ }
+
+ print(f"Total slides: {total_slides}")
+ if hidden_slides:
+ print(f"Hidden slides: {sorted(hidden_slides)}")
+
+ pdf_path = temp_dir / f"{pptx_path.stem}.pdf"
+
+ # Convert to PDF
+ print("Converting to PDF...")
+ result = subprocess.run(
+ [
+ "soffice",
+ "--headless",
+ "--convert-to",
+ "pdf",
+ "--outdir",
+ str(temp_dir),
+ str(pptx_path),
+ ],
+ capture_output=True,
+ text=True,
+ )
+ if result.returncode != 0 or not pdf_path.exists():
+ raise RuntimeError("PDF conversion failed")
+
+ # Convert PDF to images
+ print(f"Converting to images at {dpi} DPI...")
+ result = subprocess.run(
+ ["pdftoppm", "-jpeg", "-r", str(dpi), str(pdf_path), str(temp_dir / "slide")],
+ capture_output=True,
+ text=True,
+ )
+ if result.returncode != 0:
+ raise RuntimeError("Image conversion failed")
+
+ visible_images = sorted(temp_dir.glob("slide-*.jpg"))
+
+ # Create full list with placeholders for hidden slides
+ all_images = []
+ visible_idx = 0
+
+ # Get placeholder dimensions from first visible slide
+ if visible_images:
+ with Image.open(visible_images[0]) as img:
+ placeholder_size = img.size
+ else:
+ placeholder_size = (1920, 1080)
+
+ for slide_num in range(1, total_slides + 1):
+ if slide_num in hidden_slides:
+ # Create placeholder image for hidden slide
+ placeholder_path = temp_dir / f"hidden-{slide_num:03d}.jpg"
+ placeholder_img = create_hidden_slide_placeholder(placeholder_size)
+ placeholder_img.save(placeholder_path, "JPEG")
+ all_images.append(placeholder_path)
+ else:
+ # Use the actual visible slide image
+ if visible_idx < len(visible_images):
+ all_images.append(visible_images[visible_idx])
+ visible_idx += 1
+
+ return all_images
+
+
+def create_grids(
+ image_paths,
+ cols,
+ width,
+ output_path,
+ placeholder_regions=None,
+ slide_dimensions=None,
+):
+ """Create multiple thumbnail grids from slide images, max cols×(cols+1) images per grid."""
+ # Maximum images per grid is cols × (cols + 1) for better proportions
+ max_images_per_grid = cols * (cols + 1)
+ grid_files = []
+
+ print(
+ f"Creating grids with {cols} columns (max {max_images_per_grid} images per grid)"
+ )
+
+ # Split images into chunks
+ for chunk_idx, start_idx in enumerate(
+ range(0, len(image_paths), max_images_per_grid)
+ ):
+ end_idx = min(start_idx + max_images_per_grid, len(image_paths))
+ chunk_images = image_paths[start_idx:end_idx]
+
+ # Create grid for this chunk
+ grid = create_grid(
+ chunk_images, cols, width, start_idx, placeholder_regions, slide_dimensions
+ )
+
+ # Generate output filename
+ if len(image_paths) <= max_images_per_grid:
+ # Single grid - use base filename without suffix
+ grid_filename = output_path
+ else:
+ # Multiple grids - insert index before extension with dash
+ stem = output_path.stem
+ suffix = output_path.suffix
+ grid_filename = output_path.parent / f"{stem}-{chunk_idx + 1}{suffix}"
+
+ # Save grid
+ grid_filename.parent.mkdir(parents=True, exist_ok=True)
+ grid.save(str(grid_filename), quality=JPEG_QUALITY)
+ grid_files.append(str(grid_filename))
+
+ return grid_files
+
+
+def create_grid(
+ image_paths,
+ cols,
+ width,
+ start_slide_num=0,
+ placeholder_regions=None,
+ slide_dimensions=None,
+):
+ """Create thumbnail grid from slide images with optional placeholder outlining."""
+ font_size = int(width * FONT_SIZE_RATIO)
+ label_padding = int(font_size * LABEL_PADDING_RATIO)
+
+ # Get dimensions
+ with Image.open(image_paths[0]) as img:
+ aspect = img.height / img.width
+ height = int(width * aspect)
+
+ # Calculate grid size
+ rows = (len(image_paths) + cols - 1) // cols
+ grid_w = cols * width + (cols + 1) * GRID_PADDING
+ grid_h = rows * (height + font_size + label_padding * 2) + (rows + 1) * GRID_PADDING
+
+ # Create grid
+ grid = Image.new("RGB", (grid_w, grid_h), "white")
+ draw = ImageDraw.Draw(grid)
+
+ # Load font with size based on thumbnail width
+ try:
+ # Use Pillow's default font with size
+ font = ImageFont.load_default(size=font_size)
+ except Exception:
+ # Fall back to basic default font if size parameter not supported
+ font = ImageFont.load_default()
+
+ # Place thumbnails
+ for i, img_path in enumerate(image_paths):
+ row, col = i // cols, i % cols
+ x = col * width + (col + 1) * GRID_PADDING
+ y_base = (
+ row * (height + font_size + label_padding * 2) + (row + 1) * GRID_PADDING
+ )
+
+ # Add label with actual slide number
+ label = f"{start_slide_num + i}"
+ bbox = draw.textbbox((0, 0), label, font=font)
+ text_w = bbox[2] - bbox[0]
+ draw.text(
+ (x + (width - text_w) // 2, y_base + label_padding),
+ label,
+ fill="black",
+ font=font,
+ )
+
+ # Add thumbnail below label with proportional spacing
+ y_thumbnail = y_base + label_padding + font_size + label_padding
+
+ with Image.open(img_path) as img:
+ # Get original dimensions before thumbnail
+ orig_w, orig_h = img.size
+
+ # Apply placeholder outlines if enabled
+ if placeholder_regions and (start_slide_num + i) in placeholder_regions:
+ # Convert to RGBA for transparency support
+ if img.mode != "RGBA":
+ img = img.convert("RGBA")
+
+ # Get the regions for this slide
+ regions = placeholder_regions[start_slide_num + i]
+
+ # Calculate scale factors using actual slide dimensions
+ if slide_dimensions:
+ slide_width_inches, slide_height_inches = slide_dimensions
+ else:
+ # Fallback: estimate from image size at CONVERSION_DPI
+ slide_width_inches = orig_w / CONVERSION_DPI
+ slide_height_inches = orig_h / CONVERSION_DPI
+
+ x_scale = orig_w / slide_width_inches
+ y_scale = orig_h / slide_height_inches
+
+ # Create a highlight overlay
+ overlay = Image.new("RGBA", img.size, (255, 255, 255, 0))
+ overlay_draw = ImageDraw.Draw(overlay)
+
+ # Highlight each placeholder region
+ for region in regions:
+ # Convert from inches to pixels in the original image
+ px_left = int(region["left"] * x_scale)
+ px_top = int(region["top"] * y_scale)
+ px_width = int(region["width"] * x_scale)
+ px_height = int(region["height"] * y_scale)
+
+ # Draw highlight outline with red color and thick stroke
+ # Using a bright red outline instead of fill
+ stroke_width = max(
+ 5, min(orig_w, orig_h) // 150
+ ) # Thicker proportional stroke width
+ overlay_draw.rectangle(
+ [(px_left, px_top), (px_left + px_width, px_top + px_height)],
+ outline=(255, 0, 0, 255), # Bright red, fully opaque
+ width=stroke_width,
+ )
+
+ # Composite the overlay onto the image using alpha blending
+ img = Image.alpha_composite(img, overlay)
+ # Convert back to RGB for JPEG saving
+ img = img.convert("RGB")
+
+ img.thumbnail((width, height), Image.Resampling.LANCZOS)
+ w, h = img.size
+ tx = x + (width - w) // 2
+ ty = y_thumbnail + (height - h) // 2
+ grid.paste(img, (tx, ty))
+
+ # Add border
+ if BORDER_WIDTH > 0:
+ draw.rectangle(
+ [
+ (tx - BORDER_WIDTH, ty - BORDER_WIDTH),
+ (tx + w + BORDER_WIDTH - 1, ty + h + BORDER_WIDTH - 1),
+ ],
+ outline="gray",
+ width=BORDER_WIDTH,
+ )
+
+ return grid
+
+
+if __name__ == "__main__":
+ main()
diff --git a/scientific-skills/document-skills/xlsx/LICENSE.txt b/scientific-skills/document-skills/xlsx/LICENSE.txt
new file mode 100644
index 0000000..c55ab42
--- /dev/null
+++ b/scientific-skills/document-skills/xlsx/LICENSE.txt
@@ -0,0 +1,30 @@
+© 2025 Anthropic, PBC. All rights reserved.
+
+LICENSE: Use of these materials (including all code, prompts, assets, files,
+and other components of this Skill) is governed by your agreement with
+Anthropic regarding use of Anthropic's services. If no separate agreement
+exists, use is governed by Anthropic's Consumer Terms of Service or
+Commercial Terms of Service, as applicable:
+https://www.anthropic.com/legal/consumer-terms
+https://www.anthropic.com/legal/commercial-terms
+Your applicable agreement is referred to as the "Agreement." "Services" are
+as defined in the Agreement.
+
+ADDITIONAL RESTRICTIONS: Notwithstanding anything in the Agreement to the
+contrary, users may not:
+
+- Extract these materials from the Services or retain copies of these
+ materials outside the Services
+- Reproduce or copy these materials, except for temporary copies created
+ automatically during authorized use of the Services
+- Create derivative works based on these materials
+- Distribute, sublicense, or transfer these materials to any third party
+- Make, offer to sell, sell, or import any inventions embodied in these
+ materials
+- Reverse engineer, decompile, or disassemble these materials
+
+The receipt, viewing, or possession of these materials does not convey or
+imply any license or right beyond those expressly granted above.
+
+Anthropic retains all right, title, and interest in these materials,
+including all copyrights, patents, and other intellectual property rights.
diff --git a/scientific-skills/document-skills/xlsx/SKILL.md b/scientific-skills/document-skills/xlsx/SKILL.md
new file mode 100644
index 0000000..50029dc
--- /dev/null
+++ b/scientific-skills/document-skills/xlsx/SKILL.md
@@ -0,0 +1,323 @@
+---
+name: xlsx
+description: "Spreadsheet toolkit (.xlsx/.csv). Create/edit with formulas/formatting, analyze data, visualization, recalculate formulas, for spreadsheet processing and analysis."
+license: Proprietary. LICENSE.txt has complete terms
+---
+
+# Requirements for Outputs
+
+## All Excel files
+
+### Zero Formula Errors
+- Every Excel model MUST be delivered with ZERO formula errors (#REF!, #DIV/0!, #VALUE!, #N/A, #NAME?)
+
+### Preserve Existing Templates (when updating templates)
+- Study and EXACTLY match existing format, style, and conventions when modifying files
+- Never impose standardized formatting on files with established patterns
+- Existing template conventions ALWAYS override these guidelines
+
+## Financial models
+
+### Color Coding Standards
+Unless otherwise stated by the user or existing template
+
+#### Industry-Standard Color Conventions
+- **Blue text (RGB: 0,0,255)**: Hardcoded inputs, and numbers users will change for scenarios
+- **Black text (RGB: 0,0,0)**: ALL formulas and calculations
+- **Green text (RGB: 0,128,0)**: Links pulling from other worksheets within same workbook
+- **Red text (RGB: 255,0,0)**: External links to other files
+- **Yellow background (RGB: 255,255,0)**: Key assumptions needing attention or cells that need to be updated
+
+### Number Formatting Standards
+
+#### Required Format Rules
+- **Years**: Format as text strings (e.g., "2024" not "2,024")
+- **Currency**: Use $#,##0 format; ALWAYS specify units in headers ("Revenue ($mm)")
+- **Zeros**: Use number formatting to make all zeros "-", including percentages (e.g., "$#,##0;($#,##0);-")
+- **Percentages**: Default to 0.0% format (one decimal)
+- **Multiples**: Format as 0.0x for valuation multiples (EV/EBITDA, P/E)
+- **Negative numbers**: Use parentheses (123) not minus -123
+
+### Formula Construction Rules
+
+#### Assumptions Placement
+- Place ALL assumptions (growth rates, margins, multiples, etc.) in separate assumption cells
+- Use cell references instead of hardcoded values in formulas
+- Example: Use =B5*(1+$B$6) instead of =B5*1.05
+
+#### Formula Error Prevention
+- Verify all cell references are correct
+- Check for off-by-one errors in ranges
+- Ensure consistent formulas across all projection periods
+- Test with edge cases (zero values, negative numbers)
+- Verify no unintended circular references
+
+#### Documentation Requirements for Hardcodes
+- Comment or in cells beside (if end of table). Format: "Source: [System/Document], [Date], [Specific Reference], [URL if applicable]"
+- Examples:
+ - "Source: Company 10-K, FY2024, Page 45, Revenue Note, [SEC EDGAR URL]"
+ - "Source: Company 10-Q, Q2 2025, Exhibit 99.1, [SEC EDGAR URL]"
+ - "Source: Bloomberg Terminal, 8/15/2025, AAPL US Equity"
+ - "Source: FactSet, 8/20/2025, Consensus Estimates Screen"
+
+# XLSX creation, editing, and analysis
+
+## Overview
+
+Create, edit, or analyze Excel spreadsheets with formulas, formatting, and data analysis. Apply this skill for spreadsheet processing using openpyxl and pandas. Recalculate formulas and ensure zero errors for publication-quality outputs.
+
+## Visual Enhancement with Scientific Schematics
+
+**When creating documents with this skill, always consider adding scientific diagrams and schematics to enhance visual communication.**
+
+If your document does not already contain schematics or diagrams:
+- Use the **scientific-schematics** skill to generate AI-powered publication-quality diagrams
+- Simply describe your desired diagram in natural language
+- Nano Banana Pro will automatically generate, review, and refine the schematic
+
+**For new documents:** Scientific schematics should be generated by default to visually represent key concepts, workflows, architectures, or relationships described in the text.
+
+**How to generate schematics:**
+```bash
+python scripts/generate_schematic.py "your diagram description" -o figures/output.png
+```
+
+The AI will automatically:
+- Create publication-quality images with proper formatting
+- Review and refine through multiple iterations
+- Ensure accessibility (colorblind-friendly, high contrast)
+- Save outputs in the figures/ directory
+
+**When to add schematics:**
+- Spreadsheet workflow diagrams
+- Data processing pipeline illustrations
+- Formula calculation flow diagrams
+- Financial model structure diagrams
+- Data analysis flowcharts
+- Any complex concept that benefits from visualization
+
+For detailed guidance on creating schematics, refer to the scientific-schematics skill documentation.
+
+---
+
+## Important Requirements
+
+**LibreOffice Required for Formula Recalculation**: You can assume LibreOffice is installed for recalculating formula values using the `recalc.py` script. The script automatically configures LibreOffice on first run
+
+## Reading and analyzing data
+
+### Data analysis with pandas
+For data analysis, visualization, and basic operations, use **pandas** which provides powerful data manipulation capabilities:
+
+```python
+import pandas as pd
+
+# Read Excel
+df = pd.read_excel('file.xlsx') # Default: first sheet
+all_sheets = pd.read_excel('file.xlsx', sheet_name=None) # All sheets as dict
+
+# Analyze
+df.head() # Preview data
+df.info() # Column info
+df.describe() # Statistics
+
+# Write Excel
+df.to_excel('output.xlsx', index=False)
+```
+
+## Excel File Workflows
+
+## CRITICAL: Use Formulas, Not Hardcoded Values
+
+**Always use Excel formulas instead of calculating values in Python and hardcoding them.** This ensures the spreadsheet remains dynamic and updateable.
+
+### ❌ WRONG - Hardcoding Calculated Values
+```python
+# Bad: Calculating in Python and hardcoding result
+total = df['Sales'].sum()
+sheet['B10'] = total # Hardcodes 5000
+
+# Bad: Computing growth rate in Python
+growth = (df.iloc[-1]['Revenue'] - df.iloc[0]['Revenue']) / df.iloc[0]['Revenue']
+sheet['C5'] = growth # Hardcodes 0.15
+
+# Bad: Python calculation for average
+avg = sum(values) / len(values)
+sheet['D20'] = avg # Hardcodes 42.5
+```
+
+### ✅ CORRECT - Using Excel Formulas
+```python
+# Good: Let Excel calculate the sum
+sheet['B10'] = '=SUM(B2:B9)'
+
+# Good: Growth rate as Excel formula
+sheet['C5'] = '=(C4-C2)/C2'
+
+# Good: Average using Excel function
+sheet['D20'] = '=AVERAGE(D2:D19)'
+```
+
+This applies to ALL calculations - totals, percentages, ratios, differences, etc. The spreadsheet should be able to recalculate when source data changes.
+
+## Common Workflow
+1. **Choose tool**: pandas for data, openpyxl for formulas/formatting
+2. **Create/Load**: Create new workbook or load existing file
+3. **Modify**: Add/edit data, formulas, and formatting
+4. **Save**: Write to file
+5. **Recalculate formulas (MANDATORY IF USING FORMULAS)**: Use the recalc.py script
+ ```bash
+ python recalc.py output.xlsx
+ ```
+6. **Verify and fix any errors**:
+ - The script returns JSON with error details
+ - If `status` is `errors_found`, check `error_summary` for specific error types and locations
+ - Fix the identified errors and recalculate again
+ - Common errors to fix:
+ - `#REF!`: Invalid cell references
+ - `#DIV/0!`: Division by zero
+ - `#VALUE!`: Wrong data type in formula
+ - `#NAME?`: Unrecognized formula name
+
+### Creating new Excel files
+
+```python
+# Using openpyxl for formulas and formatting
+from openpyxl import Workbook
+from openpyxl.styles import Font, PatternFill, Alignment
+
+wb = Workbook()
+sheet = wb.active
+
+# Add data
+sheet['A1'] = 'Hello'
+sheet['B1'] = 'World'
+sheet.append(['Row', 'of', 'data'])
+
+# Add formula
+sheet['B2'] = '=SUM(A1:A10)'
+
+# Formatting
+sheet['A1'].font = Font(bold=True, color='FF0000')
+sheet['A1'].fill = PatternFill('solid', start_color='FFFF00')
+sheet['A1'].alignment = Alignment(horizontal='center')
+
+# Column width
+sheet.column_dimensions['A'].width = 20
+
+wb.save('output.xlsx')
+```
+
+### Editing existing Excel files
+
+```python
+# Using openpyxl to preserve formulas and formatting
+from openpyxl import load_workbook
+
+# Load existing file
+wb = load_workbook('existing.xlsx')
+sheet = wb.active # or wb['SheetName'] for specific sheet
+
+# Working with multiple sheets
+for sheet_name in wb.sheetnames:
+ sheet = wb[sheet_name]
+ print(f"Sheet: {sheet_name}")
+
+# Modify cells
+sheet['A1'] = 'New Value'
+sheet.insert_rows(2) # Insert row at position 2
+sheet.delete_cols(3) # Delete column 3
+
+# Add new sheet
+new_sheet = wb.create_sheet('NewSheet')
+new_sheet['A1'] = 'Data'
+
+wb.save('modified.xlsx')
+```
+
+## Recalculating formulas
+
+Excel files created or modified by openpyxl contain formulas as strings but not calculated values. Use the provided `recalc.py` script to recalculate formulas:
+
+```bash
+python recalc.py [timeout_seconds]
+```
+
+Example:
+```bash
+python recalc.py output.xlsx 30
+```
+
+The script:
+- Automatically sets up LibreOffice macro on first run
+- Recalculates all formulas in all sheets
+- Scans ALL cells for Excel errors (#REF!, #DIV/0!, etc.)
+- Returns JSON with detailed error locations and counts
+- Works on both Linux and macOS
+
+## Formula Verification Checklist
+
+Quick checks to ensure formulas work correctly:
+
+### Essential Verification
+- [ ] **Test 2-3 sample references**: Verify they pull correct values before building full model
+- [ ] **Column mapping**: Confirm Excel columns match (e.g., column 64 = BL, not BK)
+- [ ] **Row offset**: Remember Excel rows are 1-indexed (DataFrame row 5 = Excel row 6)
+
+### Common Pitfalls
+- [ ] **NaN handling**: Check for null values with `pd.notna()`
+- [ ] **Far-right columns**: FY data often in columns 50+
+- [ ] **Multiple matches**: Search all occurrences, not just first
+- [ ] **Division by zero**: Check denominators before using `/` in formulas (#DIV/0!)
+- [ ] **Wrong references**: Verify all cell references point to intended cells (#REF!)
+- [ ] **Cross-sheet references**: Use correct format (Sheet1!A1) for linking sheets
+
+### Formula Testing Strategy
+- [ ] **Start small**: Test formulas on 2-3 cells before applying broadly
+- [ ] **Verify dependencies**: Check all cells referenced in formulas exist
+- [ ] **Test edge cases**: Include zero, negative, and very large values
+
+### Interpreting recalc.py Output
+The script returns JSON with error details:
+```json
+{
+ "status": "success", // or "errors_found"
+ "total_errors": 0, // Total error count
+ "total_formulas": 42, // Number of formulas in file
+ "error_summary": { // Only present if errors found
+ "#REF!": {
+ "count": 2,
+ "locations": ["Sheet1!B5", "Sheet1!C10"]
+ }
+ }
+}
+```
+
+## Best Practices
+
+### Library Selection
+- **pandas**: Best for data analysis, bulk operations, and simple data export
+- **openpyxl**: Best for complex formatting, formulas, and Excel-specific features
+
+### Working with openpyxl
+- Cell indices are 1-based (row=1, column=1 refers to cell A1)
+- Use `data_only=True` to read calculated values: `load_workbook('file.xlsx', data_only=True)`
+- **Warning**: If opened with `data_only=True` and saved, formulas are replaced with values and permanently lost
+- For large files: Use `read_only=True` for reading or `write_only=True` for writing
+- Formulas are preserved but not evaluated - use recalc.py to update values
+
+### Working with pandas
+- Specify data types to avoid inference issues: `pd.read_excel('file.xlsx', dtype={'id': str})`
+- For large files, read specific columns: `pd.read_excel('file.xlsx', usecols=['A', 'C', 'E'])`
+- Handle dates properly: `pd.read_excel('file.xlsx', parse_dates=['date_column'])`
+
+## Code Style Guidelines
+**IMPORTANT**: When generating Python code for Excel operations:
+- Write minimal, concise Python code without unnecessary comments
+- Avoid verbose variable names and redundant operations
+- Avoid unnecessary print statements
+
+**For Excel files themselves**:
+- Add comments to cells with complex formulas or important assumptions
+- Document data sources for hardcoded values
+- Include notes for key calculations and model sections
\ No newline at end of file
diff --git a/scientific-skills/document-skills/xlsx/recalc.py b/scientific-skills/document-skills/xlsx/recalc.py
new file mode 100644
index 0000000..102e157
--- /dev/null
+++ b/scientific-skills/document-skills/xlsx/recalc.py
@@ -0,0 +1,178 @@
+#!/usr/bin/env python3
+"""
+Excel Formula Recalculation Script
+Recalculates all formulas in an Excel file using LibreOffice
+"""
+
+import json
+import sys
+import subprocess
+import os
+import platform
+from pathlib import Path
+from openpyxl import load_workbook
+
+
+def setup_libreoffice_macro():
+ """Setup LibreOffice macro for recalculation if not already configured"""
+ if platform.system() == 'Darwin':
+ macro_dir = os.path.expanduser('~/Library/Application Support/LibreOffice/4/user/basic/Standard')
+ else:
+ macro_dir = os.path.expanduser('~/.config/libreoffice/4/user/basic/Standard')
+
+ macro_file = os.path.join(macro_dir, 'Module1.xba')
+
+ if os.path.exists(macro_file):
+ with open(macro_file, 'r') as f:
+ if 'RecalculateAndSave' in f.read():
+ return True
+
+ if not os.path.exists(macro_dir):
+ subprocess.run(['soffice', '--headless', '--terminate_after_init'],
+ capture_output=True, timeout=10)
+ os.makedirs(macro_dir, exist_ok=True)
+
+ macro_content = '''
+
+
+ Sub RecalculateAndSave()
+ ThisComponent.calculateAll()
+ ThisComponent.store()
+ ThisComponent.close(True)
+ End Sub
+'''
+
+ try:
+ with open(macro_file, 'w') as f:
+ f.write(macro_content)
+ return True
+ except Exception:
+ return False
+
+
+def recalc(filename, timeout=30):
+ """
+ Recalculate formulas in Excel file and report any errors
+
+ Args:
+ filename: Path to Excel file
+ timeout: Maximum time to wait for recalculation (seconds)
+
+ Returns:
+ dict with error locations and counts
+ """
+ if not Path(filename).exists():
+ return {'error': f'File {filename} does not exist'}
+
+ abs_path = str(Path(filename).absolute())
+
+ if not setup_libreoffice_macro():
+ return {'error': 'Failed to setup LibreOffice macro'}
+
+ cmd = [
+ 'soffice', '--headless', '--norestore',
+ 'vnd.sun.star.script:Standard.Module1.RecalculateAndSave?language=Basic&location=application',
+ abs_path
+ ]
+
+ # Handle timeout command differences between Linux and macOS
+ if platform.system() != 'Windows':
+ timeout_cmd = 'timeout' if platform.system() == 'Linux' else None
+ if platform.system() == 'Darwin':
+ # Check if gtimeout is available on macOS
+ try:
+ subprocess.run(['gtimeout', '--version'], capture_output=True, timeout=1, check=False)
+ timeout_cmd = 'gtimeout'
+ except (FileNotFoundError, subprocess.TimeoutExpired):
+ pass
+
+ if timeout_cmd:
+ cmd = [timeout_cmd, str(timeout)] + cmd
+
+ result = subprocess.run(cmd, capture_output=True, text=True)
+
+ if result.returncode != 0 and result.returncode != 124: # 124 is timeout exit code
+ error_msg = result.stderr or 'Unknown error during recalculation'
+ if 'Module1' in error_msg or 'RecalculateAndSave' not in error_msg:
+ return {'error': 'LibreOffice macro not configured properly'}
+ else:
+ return {'error': error_msg}
+
+ # Check for Excel errors in the recalculated file - scan ALL cells
+ try:
+ wb = load_workbook(filename, data_only=True)
+
+ excel_errors = ['#VALUE!', '#DIV/0!', '#REF!', '#NAME?', '#NULL!', '#NUM!', '#N/A']
+ error_details = {err: [] for err in excel_errors}
+ total_errors = 0
+
+ for sheet_name in wb.sheetnames:
+ ws = wb[sheet_name]
+ # Check ALL rows and columns - no limits
+ for row in ws.iter_rows():
+ for cell in row:
+ if cell.value is not None and isinstance(cell.value, str):
+ for err in excel_errors:
+ if err in cell.value:
+ location = f"{sheet_name}!{cell.coordinate}"
+ error_details[err].append(location)
+ total_errors += 1
+ break
+
+ wb.close()
+
+ # Build result summary
+ result = {
+ 'status': 'success' if total_errors == 0 else 'errors_found',
+ 'total_errors': total_errors,
+ 'error_summary': {}
+ }
+
+ # Add non-empty error categories
+ for err_type, locations in error_details.items():
+ if locations:
+ result['error_summary'][err_type] = {
+ 'count': len(locations),
+ 'locations': locations[:20] # Show up to 20 locations
+ }
+
+ # Add formula count for context - also check ALL cells
+ wb_formulas = load_workbook(filename, data_only=False)
+ formula_count = 0
+ for sheet_name in wb_formulas.sheetnames:
+ ws = wb_formulas[sheet_name]
+ for row in ws.iter_rows():
+ for cell in row:
+ if cell.value and isinstance(cell.value, str) and cell.value.startswith('='):
+ formula_count += 1
+ wb_formulas.close()
+
+ result['total_formulas'] = formula_count
+
+ return result
+
+ except Exception as e:
+ return {'error': str(e)}
+
+
+def main():
+ if len(sys.argv) < 2:
+ print("Usage: python recalc.py [timeout_seconds]")
+ print("\nRecalculates all formulas in an Excel file using LibreOffice")
+ print("\nReturns JSON with error details:")
+ print(" - status: 'success' or 'errors_found'")
+ print(" - total_errors: Total number of Excel errors found")
+ print(" - total_formulas: Number of formulas in the file")
+ print(" - error_summary: Breakdown by error type with locations")
+ print(" - #VALUE!, #DIV/0!, #REF!, #NAME?, #NULL!, #NUM!, #N/A")
+ sys.exit(1)
+
+ filename = sys.argv[1]
+ timeout = int(sys.argv[2]) if len(sys.argv) > 2 else 30
+
+ result = recalc(filename, timeout)
+ print(json.dumps(result, indent=2))
+
+
+if __name__ == '__main__':
+ main()
\ No newline at end of file
diff --git a/scientific-skills/latex-posters/README.md b/scientific-skills/latex-posters/README.md
new file mode 100644
index 0000000..64ecc9d
--- /dev/null
+++ b/scientific-skills/latex-posters/README.md
@@ -0,0 +1,417 @@
+# LaTeX Research Poster Generation Skill
+
+Create professional, publication-ready research posters for conferences and academic presentations using LaTeX.
+
+## Overview
+
+This skill provides comprehensive guidance for creating research posters with three major LaTeX packages:
+- **beamerposter**: Traditional academic posters, familiar Beamer syntax
+- **tikzposter**: Modern, colorful designs with TikZ integration
+- **baposter**: Structured multi-column layouts with automatic positioning
+
+## Quick Start
+
+### 1. Choose a Template
+
+Browse templates in `assets/`:
+- `beamerposter_template.tex` - Classic academic style
+- `tikzposter_template.tex` - Modern, colorful design
+- `baposter_template.tex` - Structured multi-column layout
+
+### 2. Customize Content
+
+Edit the template with your research:
+- Title, authors, affiliations
+- Introduction, methods, results, conclusions
+- Replace placeholder figures with your images
+- Update references and acknowledgments
+
+### 3. Configure for Full Page
+
+Posters should span the entire page with minimal margins:
+
+```latex
+% beamerposter - full page setup
+\documentclass[final,t]{beamer}
+\usepackage[size=a0,scale=1.4,orientation=portrait]{beamerposter}
+\setbeamersize{text margin left=5mm, text margin right=5mm}
+\usepackage[margin=10mm]{geometry}
+
+% tikzposter - full page setup
+\documentclass[25pt,a0paper,portrait,margin=10mm,innermargin=15mm]{tikzposter}
+
+% baposter - full page setup
+\documentclass[a0paper,portrait,fontscale=0.285]{baposter}
+```
+
+### 4. Compile
+
+```bash
+pdflatex poster.tex
+
+# Or for better font support:
+lualatex poster.tex
+xelatex poster.tex
+```
+
+### 5. Review PDF Quality
+
+**Essential before printing!**
+
+```bash
+# Run automated checks
+./scripts/review_poster.sh poster.pdf
+
+# Manual verification (see checklist below)
+```
+
+## Key Features
+
+### Full Page Coverage
+
+All templates configured to maximize content area:
+- Minimal outer margins (5-15mm)
+- Optimal spacing between columns (15-20mm)
+- Proper block padding for readability
+- No wasted white space
+
+### PDF Quality Control
+
+**Automated Checks** (`review_poster.sh`):
+- Page size verification
+- Font embedding check
+- Image resolution analysis
+- File size optimization
+
+**Manual Verification** (`assets/poster_quality_checklist.md`):
+- Visual inspection at 100% zoom
+- Reduced-scale print test (25%)
+- Typography and spacing review
+- Content completeness check
+
+### Design Principles
+
+All templates follow evidence-based poster design:
+- **Typography**: 72pt+ title, 48-72pt headers, 24-36pt body text
+- **Color**: High contrast (≥4.5:1), color-blind friendly palettes
+- **Layout**: Clear visual hierarchy, logical flow
+- **Content**: 300-800 words maximum, 40-50% visual content
+
+## Common Poster Sizes
+
+Templates support all standard sizes:
+
+| Size | Dimensions | Configuration |
+|------|------------|---------------|
+| A0 | 841 × 1189 mm | `size=a0` or `a0paper` |
+| A1 | 594 × 841 mm | `size=a1` or `a1paper` |
+| 36×48" | 914 × 1219 mm | Custom page size |
+| 42×56" | 1067 × 1422 mm | Custom page size |
+
+## Documentation
+
+### Reference Guides
+
+**Comprehensive Documentation** (in `references/`):
+
+1. **`latex_poster_packages.md`** (746 lines)
+ - Detailed comparison of beamerposter, tikzposter, baposter
+ - Package-specific syntax and examples
+ - Strengths, limitations, best use cases
+ - Theme and color customization
+ - Compilation tips and troubleshooting
+
+2. **`poster_design_principles.md`** (807 lines)
+ - Visual hierarchy and white space
+ - Typography: font selection, sizing, readability
+ - Color theory: schemes, contrast, accessibility
+ - Color-blind friendly palettes
+ - Icons, graphics, and visual elements
+ - Common design mistakes to avoid
+
+3. **`poster_layout_design.md`** (650+ lines)
+ - Grid systems (2, 3, 4-column layouts)
+ - Visual flow and reading patterns
+ - Spatial organization strategies
+ - White space management
+ - Block and box design
+ - Layout patterns by research type
+
+4. **`poster_content_guide.md`** (900+ lines)
+ - Content strategy (3-5 minute rule)
+ - Word budgets by section
+ - Visual-to-text ratio (40-50% visual)
+ - Section-specific writing guidance
+ - Figure integration and captions
+ - From paper to poster adaptation
+
+### Tools and Assets
+
+**Scripts** (in `scripts/`):
+- `review_poster.sh`: Automated PDF quality check
+ - Page size verification
+ - Font embedding check
+ - Image resolution analysis
+ - File size assessment
+
+**Checklists** (in `assets/`):
+- `poster_quality_checklist.md`: Comprehensive pre-printing checklist
+ - Pre-compilation checks
+ - PDF quality verification
+ - Visual inspection items
+ - Accessibility checks
+ - Peer review guidelines
+ - Final printing checklist
+
+**Templates** (in `assets/`):
+- `beamerposter_template.tex`: Full working template
+- `tikzposter_template.tex`: Full working template
+- `baposter_template.tex`: Full working template
+
+## Workflow
+
+### Recommended Poster Creation Process
+
+**1. Planning** (before LaTeX)
+- Determine conference requirements (size, orientation)
+- Identify 3-5 key results to highlight
+- Create figures (300+ DPI)
+- Draft 300-800 word content outline
+
+**2. Template Selection**
+- Choose package based on needs:
+ - **beamerposter**: Traditional conferences, institutional branding
+ - **tikzposter**: Modern conferences, creative fields
+ - **baposter**: Multi-section posters, structured layouts
+
+**3. Content Integration**
+- Copy template and customize
+- Replace placeholder text
+- Add figures and ensure high resolution
+- Configure colors to match branding
+
+**4. Compilation & Review**
+- Compile to PDF
+- Run `review_poster.sh` for automated checks
+- Review visually at 100% zoom
+- Check against `poster_quality_checklist.md`
+
+**5. Test Print**
+- **Critical step!** Print at 25% scale
+- A0 → A4 paper, 36×48" → Letter paper
+- View from 2-3 feet (simulates 8-12 feet for full poster)
+- Verify readability and colors
+
+**6. Revisions**
+- Fix any issues identified
+- Proofread carefully (errors are magnified!)
+- Get colleague feedback
+- Final compilation
+
+**7. Printing**
+- Verify page size: `pdfinfo poster.pdf`
+- Check fonts embedded: `pdffonts poster.pdf`
+- Send to professional printer 2-3 days before deadline
+- Keep backup copy
+
+## Troubleshooting
+
+### Large White Margins
+
+**Problem**: Excessive white space around poster edges
+
+**Solution**:
+```latex
+% beamerposter
+\setbeamersize{text margin left=5mm, text margin right=5mm}
+\usepackage[margin=10mm]{geometry}
+
+% tikzposter
+\documentclass[..., margin=5mm, innermargin=10mm]{tikzposter}
+
+% baposter
+\documentclass[a0paper, margin=5mm]{baposter}
+```
+
+### Content Cut Off
+
+**Problem**: Text or figures extending beyond page
+
+**Solution**:
+- Check total width: columns + spacing + margins = pagewidth
+- Reduce column widths or spacing
+- Debug with visible page boundary:
+```latex
+\usepackage{eso-pic}
+\AddToShipoutPictureBG{
+ \AtPageLowerLeft{
+ \put(0,0){\framebox(\LenToUnit{\paperwidth},\LenToUnit{\paperheight}){}}
+ }
+}
+```
+
+### Blurry Images
+
+**Problem**: Pixelated or low-quality figures
+
+**Solution**:
+- Use vector graphics (PDF, SVG) when possible
+- Raster images: minimum 300 DPI at final print size
+- For A0 width (33.1"): 300 DPI = 9930 pixels minimum
+- Check with: `pdfimages -list poster.pdf`
+
+### Fonts Not Embedded
+
+**Problem**: Printer rejects PDF due to missing fonts
+
+**Solution**:
+```bash
+# Recompile with embedded fonts
+pdflatex -dEmbedAllFonts=true poster.tex
+
+# Verify embedding
+pdffonts poster.pdf
+# All fonts should show "yes" in "emb" column
+```
+
+### File Too Large
+
+**Problem**: PDF exceeds email size limit (>50MB)
+
+**Solution**:
+```bash
+# Compress for digital sharing
+gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 \
+ -dPDFSETTINGS=/printer -dNOPAUSE -dQUIET -dBATCH \
+ -sOutputFile=poster_compressed.pdf poster.pdf
+
+# Keep original uncompressed version for printing
+```
+
+## Common Mistakes to Avoid
+
+### Content
+- ❌ Too much text (>1000 words)
+- ❌ Font sizes too small (<24pt body text)
+- ❌ No clear main message
+- ✅ 300-800 words, 30pt+ body text, 1-3 key findings
+
+### Design
+- ❌ Poor color contrast (<4.5:1)
+- ❌ Red-green color combinations (color-blind issue)
+- ❌ Cluttered layout with no white space
+- ✅ High contrast, accessible colors, generous spacing
+
+### Technical
+- ❌ Wrong poster dimensions
+- ❌ Low resolution images (<300 DPI)
+- ❌ Fonts not embedded
+- ✅ Verify specs, high-res images, embedded fonts
+
+## Package Comparison
+
+Quick reference for choosing the right package:
+
+| Feature | beamerposter | tikzposter | baposter |
+|---------|--------------|------------|----------|
+| **Learning Curve** | Easy (Beamer users) | Moderate | Moderate |
+| **Aesthetics** | Traditional | Modern | Professional |
+| **Customization** | Moderate | High (TikZ) | Structured |
+| **Compilation Speed** | Fast | Slower | Fast-Medium |
+| **Best For** | Academic conferences | Creative designs | Multi-column layouts |
+
+**Recommendation**:
+- First-time poster makers: **beamerposter** (familiar, simple)
+- Modern conferences: **tikzposter** (beautiful, flexible)
+- Complex layouts: **baposter** (automatic positioning)
+
+## Example Usage
+
+### In Scientific Writer CLI
+
+```
+> Create a research poster for NeurIPS conference on transformer attention
+
+The assistant will:
+1. Ask about poster size and orientation
+2. Generate complete LaTeX poster with your content
+3. Configure for full page coverage
+4. Provide compilation instructions
+5. Run quality checks on generated PDF
+```
+
+### Manual Creation
+
+```bash
+# 1. Copy template
+cp assets/tikzposter_template.tex my_poster.tex
+
+# 2. Edit content
+vim my_poster.tex
+
+# 3. Compile
+pdflatex my_poster.tex
+
+# 4. Review
+./scripts/review_poster.sh my_poster.pdf
+
+# 5. Test print at 25% scale
+# (A0 on A4 paper)
+
+# 6. Final printing
+```
+
+## Tips for Success
+
+### Content Strategy
+1. **One main message**: What's the one thing viewers should remember?
+2. **3-5 key figures**: Visual content dominates
+3. **300-800 words**: Less is more
+4. **Bullet points**: More scannable than paragraphs
+
+### Design Strategy
+1. **High contrast**: Dark on light or light on dark
+2. **Large fonts**: 30pt+ body text for readability from distance
+3. **White space**: 30-40% of poster should be empty
+4. **Visual hierarchy**: Vary sizes significantly (title 3× body text)
+
+### Technical Strategy
+1. **Test early**: Print at 25% scale before final printing
+2. **Vector graphics**: Use PDF/SVG when possible
+3. **Verify specs**: Check page size, fonts, resolution
+4. **Get feedback**: Ask colleague to review before printing
+
+## Additional Resources
+
+### Online Tools
+- **Color contrast checker**: https://webaim.org/resources/contrastchecker/
+- **Color blindness simulator**: https://www.color-blindness.com/coblis-color-blindness-simulator/
+- **Color palette generator**: https://coolors.co/
+
+### LaTeX Packages
+- `beamerposter`: Extends Beamer for poster-sized documents
+- `tikzposter`: Modern poster creation with TikZ
+- `baposter`: Box-based automatic poster layout
+- `qrcode`: Generate QR codes in LaTeX
+- `graphicx`: Include images
+- `tcolorbox`: Colored boxes and frames
+
+### Further Reading
+- All reference documents in `references/` directory
+- Quality checklist in `assets/poster_quality_checklist.md`
+- Package comparison in `references/latex_poster_packages.md`
+
+## Support
+
+For issues or questions:
+- Review reference documentation in `references/`
+- Check troubleshooting section above
+- Run automated review: `./scripts/review_poster.sh`
+- Use quality checklist: `assets/poster_quality_checklist.md`
+
+## Version
+
+LaTeX Poster Skill v1.0
+Compatible with: beamerposter, tikzposter, baposter
+Last updated: January 2025
+
diff --git a/scientific-skills/latex-posters/SKILL.md b/scientific-skills/latex-posters/SKILL.md
new file mode 100644
index 0000000..3ba3ef9
--- /dev/null
+++ b/scientific-skills/latex-posters/SKILL.md
@@ -0,0 +1,958 @@
+---
+name: latex-posters
+description: "Create professional research posters in LaTeX using beamerposter, tikzposter, or baposter. Support for conference presentations, academic posters, and scientific communication. Includes layout design, color schemes, multi-column formats, figure integration, and poster-specific best practices for visual communication."
+allowed-tools: [Read, Write, Edit, Bash]
+---
+
+# LaTeX Research Posters
+
+## Overview
+
+Research posters are a critical medium for scientific communication at conferences, symposia, and academic events. This skill provides comprehensive guidance for creating professional, visually appealing research posters using LaTeX packages. Generate publication-quality posters with proper layout, typography, color schemes, and visual hierarchy.
+
+## When to Use This Skill
+
+This skill should be used when:
+- Creating research posters for conferences, symposia, or poster sessions
+- Designing academic posters for university events or thesis defenses
+- Preparing visual summaries of research for public engagement
+- Converting scientific papers into poster format
+- Creating template posters for research groups or departments
+- Designing posters that comply with specific conference size requirements (A0, A1, 36×48", etc.)
+- Building posters with complex multi-column layouts
+- Integrating figures, tables, equations, and citations in poster format
+
+## Visual Enhancement with Scientific Schematics
+
+**⚠️ MANDATORY: Every research poster MUST include at least 2-3 AI-generated figures using the scientific-schematics skill.**
+
+This is not optional. Posters are primarily visual media - text-heavy posters fail to communicate effectively. Before finalizing any poster:
+1. Generate at minimum TWO schematics or diagrams
+2. Target 3-4 figures for comprehensive posters (methodology flowchart, key results visualization, conceptual framework)
+3. Figures should occupy 40-50% of poster area
+
+**How to generate figures:**
+- Use the **scientific-schematics** skill to generate AI-powered publication-quality diagrams
+- Simply describe your desired diagram in natural language
+- Nano Banana Pro will automatically generate, review, and refine the schematic
+
+**How to generate schematics:**
+```bash
+python scripts/generate_schematic.py "your diagram description" -o figures/output.png
+```
+
+The AI will automatically:
+- Create publication-quality images with proper formatting
+- Review and refine through multiple iterations
+- Ensure accessibility (colorblind-friendly, high contrast)
+- Save outputs in the figures/ directory
+
+**When to add schematics:**
+- Research methodology flowcharts for poster content
+- Conceptual framework diagrams
+- Experimental design visualizations
+- Data analysis pipeline diagrams
+- System architecture diagrams
+- Biological pathway illustrations
+- Any complex concept that benefits from visualization
+
+For detailed guidance on creating schematics, refer to the scientific-schematics skill documentation.
+
+---
+
+## Core Capabilities
+
+### 1. LaTeX Poster Packages
+
+Support for three major LaTeX poster packages, each with distinct advantages. For detailed comparison and package-specific guidance, refer to `references/latex_poster_packages.md`.
+
+**beamerposter**:
+- Extension of the Beamer presentation class
+- Familiar syntax for Beamer users
+- Excellent theme support and customization
+- Best for: Traditional academic posters, institutional branding
+
+**tikzposter**:
+- Modern, flexible design with TikZ integration
+- Built-in color themes and layout templates
+- Extensive customization through TikZ commands
+- Best for: Colorful, modern designs, custom graphics
+
+**baposter**:
+- Box-based layout system
+- Automatic spacing and positioning
+- Professional-looking default styles
+- Best for: Multi-column layouts, consistent spacing
+
+### 2. Poster Layout and Structure
+
+Create effective poster layouts following visual communication principles. For comprehensive layout guidance, refer to `references/poster_layout_design.md`.
+
+**Common Poster Sections**:
+- **Header/Title**: Title, authors, affiliations, logos
+- **Introduction/Background**: Research context and motivation
+- **Methods/Approach**: Methodology and experimental design
+- **Results**: Key findings with figures and data visualizations
+- **Conclusions**: Main takeaways and implications
+- **References**: Key citations (typically abbreviated)
+- **Acknowledgments**: Funding, collaborators, institutions
+
+**Layout Strategies**:
+- **Column-based layouts**: 2-column, 3-column, or 4-column grids
+- **Block-based layouts**: Flexible arrangement of content blocks
+- **Z-pattern flow**: Guide readers through content logically
+- **Visual hierarchy**: Use size, color, and spacing to emphasize key points
+
+### 3. Design Principles for Research Posters
+
+Apply evidence-based design principles for maximum impact. For detailed design guidance, refer to `references/poster_design_principles.md`.
+
+**Typography**:
+- Title: 72-120pt for visibility from distance
+- Section headers: 48-72pt
+- Body text: 24-36pt minimum for readability from 4-6 feet
+- Use sans-serif fonts (Arial, Helvetica, Calibri) for clarity
+- Limit to 2-3 font families maximum
+
+**Color and Contrast**:
+- Use high-contrast color schemes for readability
+- Institutional color palettes for branding
+- Color-blind friendly palettes (avoid red-green combinations)
+- White space is active space—don't overcrowd
+
+**Visual Elements**:
+- High-resolution figures (300 DPI minimum for print)
+- Large, clear labels on all figures
+- Consistent figure styling throughout
+- Strategic use of icons and graphics
+- Balance text with visual content (40-50% visual recommended)
+
+**Content Guidelines**:
+- **Less is more**: 300-800 words total recommended
+- Bullet points over paragraphs for scannability
+- Clear, concise messaging
+- Self-explanatory figures with minimal text explanation
+- QR codes for supplementary materials or online resources
+
+### 4. Standard Poster Sizes
+
+Support for international and conference-specific poster dimensions:
+
+**International Standards**:
+- A0 (841 × 1189 mm / 33.1 × 46.8 inches) - Most common European standard
+- A1 (594 × 841 mm / 23.4 × 33.1 inches) - Smaller format
+- A2 (420 × 594 mm / 16.5 × 23.4 inches) - Compact posters
+
+**North American Standards**:
+- 36 × 48 inches (914 × 1219 mm) - Common US conference size
+- 42 × 56 inches (1067 × 1422 mm) - Large format
+- 48 × 72 inches (1219 × 1829 mm) - Extra large
+
+**Orientation**:
+- Portrait (vertical) - Most common, traditional
+- Landscape (horizontal) - Better for wide content, timelines
+
+### 5. Package-Specific Templates
+
+Provide ready-to-use templates for each major package. Templates available in `assets/` directory.
+
+**beamerposter Templates**:
+- `beamerposter_classic.tex` - Traditional academic style
+- `beamerposter_modern.tex` - Clean, minimal design
+- `beamerposter_colorful.tex` - Vibrant theme with blocks
+
+**tikzposter Templates**:
+- `tikzposter_default.tex` - Standard tikzposter layout
+- `tikzposter_rays.tex` - Modern design with ray theme
+- `tikzposter_wave.tex` - Professional wave-style theme
+
+**baposter Templates**:
+- `baposter_portrait.tex` - Classic portrait layout
+- `baposter_landscape.tex` - Landscape multi-column
+- `baposter_minimal.tex` - Minimalist design
+
+### 6. Figure and Image Integration
+
+Optimize visual content for poster presentations:
+
+**Best Practices**:
+- Use vector graphics (PDF, SVG) when possible for scalability
+- Raster images: minimum 300 DPI at final print size
+- Consistent image styling (borders, captions, sizes)
+- Group related figures together
+- Use subfigures for comparisons
+
+**LaTeX Figure Commands**:
+```latex
+% Include graphics package
+\usepackage{graphicx}
+
+% Simple figure
+\includegraphics[width=0.8\linewidth]{figure.pdf}
+
+% Figure with caption in tikzposter
+\block{Results}{
+ \begin{tikzfigure}
+ \includegraphics[width=0.9\linewidth]{results.png}
+ \end{tikzfigure}
+}
+
+% Multiple subfigures
+\usepackage{subcaption}
+\begin{figure}
+ \begin{subfigure}{0.48\linewidth}
+ \includegraphics[width=\linewidth]{fig1.pdf}
+ \caption{Condition A}
+ \end{subfigure}
+ \begin{subfigure}{0.48\linewidth}
+ \includegraphics[width=\linewidth]{fig2.pdf}
+ \caption{Condition B}
+ \end{subfigure}
+\end{figure}
+```
+
+### 7. Color Schemes and Themes
+
+Provide professional color palettes for various contexts:
+
+**Academic Institution Colors**:
+- Match university or department branding
+- Use official color codes (RGB, CMYK, or LaTeX color definitions)
+
+**Scientific Color Palettes** (color-blind friendly):
+- Viridis: Professional gradient from purple to yellow
+- ColorBrewer: Research-tested palettes for data visualization
+- IBM Color Blind Safe: Accessible corporate palette
+
+**Package-Specific Theme Selection**:
+
+**beamerposter**:
+```latex
+\usetheme{Berlin}
+\usecolortheme{beaver}
+```
+
+**tikzposter**:
+```latex
+\usetheme{Rays}
+\usecolorstyle{Denmark}
+```
+
+**baposter**:
+```latex
+\begin{poster}{
+ background=plain,
+ bgColorOne=white,
+ headerColorOne=blue!70,
+ textborder=rounded
+}
+```
+
+### 8. Typography and Text Formatting
+
+Ensure readability and visual appeal:
+
+**Font Selection**:
+```latex
+% Sans-serif fonts recommended for posters
+\usepackage{helvet} % Helvetica
+\usepackage{avant} % Avant Garde
+\usepackage{sfmath} % Sans-serif math fonts
+
+% Set default to sans-serif
+\renewcommand{\familydefault}{\sfdefault}
+```
+
+**Text Sizing**:
+```latex
+% Adjust text sizes for visibility
+\setbeamerfont{title}{size=\VeryHuge}
+\setbeamerfont{author}{size=\Large}
+\setbeamerfont{institute}{size=\normalsize}
+```
+
+**Emphasis and Highlighting**:
+- Use bold for key terms: `\textbf{important}`
+- Color highlights sparingly: `\textcolor{blue}{highlight}`
+- Boxes for critical information
+- Avoid italics (harder to read from distance)
+
+### 9. QR Codes and Interactive Elements
+
+Enhance poster interactivity for modern conferences:
+
+**QR Code Integration**:
+```latex
+\usepackage{qrcode}
+
+% Link to paper, code repository, or supplementary materials
+\qrcode[height=2cm]{https://github.com/username/project}
+
+% QR code with caption
+\begin{center}
+ \qrcode[height=3cm]{https://doi.org/10.1234/paper}\\
+ \small Scan for full paper
+\end{center}
+```
+
+**Digital Enhancements**:
+- Link to GitHub repositories for code
+- Link to video presentations or demos
+- Link to interactive web visualizations
+- Link to supplementary data or appendices
+
+### 10. Compilation and Output
+
+Generate high-quality PDF output for printing or digital display:
+
+**Compilation Commands**:
+```bash
+# Basic compilation
+pdflatex poster.tex
+
+# With bibliography
+pdflatex poster.tex
+bibtex poster
+pdflatex poster.tex
+pdflatex poster.tex
+
+# For beamer-based posters
+lualatex poster.tex # Better font support
+xelatex poster.tex # Unicode and modern fonts
+```
+
+**Ensuring Full Page Coverage**:
+
+Posters should use the entire page without excessive margins. Configure packages correctly:
+
+**beamerposter - Full Page Setup**:
+```latex
+\documentclass[final,t]{beamer}
+\usepackage[size=a0,scale=1.4,orientation=portrait]{beamerposter}
+
+% Remove default beamer margins
+\setbeamersize{text margin left=0mm, text margin right=0mm}
+
+% Use geometry for precise control
+\usepackage[margin=10mm]{geometry} % 10mm margins all around
+
+% Remove navigation symbols
+\setbeamertemplate{navigation symbols}{}
+
+% Remove footline and headline if not needed
+\setbeamertemplate{footline}{}
+\setbeamertemplate{headline}{}
+```
+
+**tikzposter - Full Page Setup**:
+```latex
+\documentclass[
+ 25pt, % Font scaling
+ a0paper, % Paper size
+ portrait, % Orientation
+ margin=10mm, % Outer margins (minimal)
+ innermargin=15mm, % Space inside blocks
+ blockverticalspace=15mm, % Space between blocks
+ colspace=15mm, % Space between columns
+ subcolspace=8mm % Space between subcolumns
+]{tikzposter}
+
+% This ensures content fills the page
+```
+
+**baposter - Full Page Setup**:
+```latex
+\documentclass[a0paper,portrait,fontscale=0.285]{baposter}
+
+\begin{poster}{
+ grid=false,
+ columns=3,
+ colspacing=1.5em, % Space between columns
+ eyecatcher=true,
+ background=plain,
+ bgColorOne=white,
+ borderColor=blue!50,
+ headerheight=0.12\textheight, % 12% for header
+ textborder=roundedleft,
+ headerborder=closed,
+ boxheaderheight=2em % Consistent box header heights
+}
+% Content here
+\end{poster}
+```
+
+**Common Issues and Fixes**:
+
+**Problem**: Large white margins around poster
+```latex
+% Fix for beamerposter
+\setbeamersize{text margin left=5mm, text margin right=5mm}
+
+% Fix for tikzposter
+\documentclass[..., margin=5mm, innermargin=10mm]{tikzposter}
+
+% Fix for baposter - adjust in document class
+\documentclass[a0paper, margin=5mm]{baposter}
+```
+
+**Problem**: Content doesn't fill vertical space
+```latex
+% Use \vfill between sections to distribute space
+\block{Introduction}{...}
+\vfill
+\block{Methods}{...}
+\vfill
+\block{Results}{...}
+
+% Or manually adjust block spacing
+\vspace{1cm} % Add space between specific blocks
+```
+
+**Problem**: Poster extends beyond page boundaries
+```latex
+% Check total width calculation
+% For 3 columns with spacing:
+% Total = 3×columnwidth + 2×colspace + 2×margins
+% Ensure this equals \paperwidth
+
+% Debug by adding visible page boundary
+\usepackage{eso-pic}
+\AddToShipoutPictureBG{
+ \AtPageLowerLeft{
+ \put(0,0){\framebox(\LenToUnit{\paperwidth},\LenToUnit{\paperheight}){}}
+ }
+}
+```
+
+**Print Preparation**:
+- Generate PDF/X-1a for professional printing
+- Embed all fonts
+- Convert colors to CMYK if required
+- Check resolution of all images (minimum 300 DPI)
+- Add bleed area if required by printer (usually 3-5mm)
+- Verify page size matches requirements exactly
+
+**Digital Display**:
+- RGB color space for screen display
+- Optimize file size for email/web
+- Test readability on different screens
+
+### 11. PDF Review and Quality Control
+
+**CRITICAL**: Always review the generated PDF before printing or presenting. Use this systematic checklist:
+
+**Step 1: Page Size Verification**
+```bash
+# Check PDF dimensions (should match poster size exactly)
+pdfinfo poster.pdf | grep "Page size"
+
+# Expected outputs:
+# A0: 2384 x 3370 points (841 x 1189 mm)
+# 36x48": 2592 x 3456 points
+# A1: 1684 x 2384 points (594 x 841 mm)
+```
+
+**Step 2: Visual Inspection Checklist**
+
+Open PDF at 100% zoom and check:
+
+**Layout and Spacing**:
+- [ ] Content fills entire page (no large white margins)
+- [ ] Consistent spacing between columns
+- [ ] Consistent spacing between blocks/sections
+- [ ] All elements aligned properly (use ruler tool)
+- [ ] No overlapping text or figures
+- [ ] White space evenly distributed
+
+**Typography**:
+- [ ] Title clearly visible and large (72pt+)
+- [ ] Section headers readable (48-72pt)
+- [ ] Body text readable at 100% zoom (24-36pt minimum)
+- [ ] No text cutoff or running off edges
+- [ ] Consistent font usage throughout
+- [ ] All special characters render correctly (symbols, Greek letters)
+
+**Visual Elements**:
+- [ ] All figures display correctly
+- [ ] No pixelated or blurry images
+- [ ] Figure captions present and readable
+- [ ] Colors render as expected (not washed out or too dark)
+- [ ] Logos display clearly
+- [ ] QR codes visible and scannable
+
+**Content Completeness**:
+- [ ] Title and authors complete
+- [ ] All sections present (Intro, Methods, Results, Conclusions)
+- [ ] References included
+- [ ] Contact information visible
+- [ ] Acknowledgments (if applicable)
+- [ ] No placeholder text remaining (Lorem ipsum, TODO, etc.)
+
+**Technical Quality**:
+- [ ] No LaTeX compilation warnings in important areas
+- [ ] All citations resolved (no [?] marks)
+- [ ] All cross-references working
+- [ ] Page boundaries correct (no content cut off)
+
+**Step 3: Reduced-Scale Print Test**
+
+**Essential Pre-Printing Test**:
+```bash
+# Create reduced-size test print (25% of final size)
+# This simulates viewing full poster from ~8-10 feet
+
+# For A0 poster, print on A4 paper (24.7% scale)
+# For 36x48" poster, print on letter paper (~25% scale)
+```
+
+**Print Test Checklist**:
+- [ ] Title readable from 6 feet away
+- [ ] Section headers readable from 4 feet away
+- [ ] Body text readable from 2 feet away
+- [ ] Figures clear and understandable
+- [ ] Colors printed accurately
+- [ ] No obvious design flaws
+
+**Step 4: Digital Quality Checks**
+
+**Font Embedding Verification**:
+```bash
+# Check that all fonts are embedded (required for printing)
+pdffonts poster.pdf
+
+# All fonts should show "yes" in "emb" column
+# If any show "no", recompile with:
+pdflatex -dEmbedAllFonts=true poster.tex
+```
+
+**Image Resolution Check**:
+```bash
+# Extract image information
+pdfimages -list poster.pdf
+
+# Check that all images are at least 300 DPI
+# Formula: DPI = pixels / (inches in poster)
+# For A0 width (33.1"): 300 DPI = 9930 pixels minimum
+```
+
+**File Size Optimization**:
+```bash
+# For email/web, compress if needed (>50MB)
+gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 \
+ -dPDFSETTINGS=/printer -dNOPAUSE -dQUIET -dBATCH \
+ -sOutputFile=poster_compressed.pdf poster.pdf
+
+# For printing, keep original (no compression)
+```
+
+**Step 5: Accessibility Check**
+
+**Color Contrast Verification**:
+- [ ] Text-background contrast ratio ≥ 4.5:1 (WCAG AA)
+- [ ] Important elements contrast ratio ≥ 7:1 (WCAG AAA)
+- Test online: https://webaim.org/resources/contrastchecker/
+
+**Color Blindness Simulation**:
+- [ ] View PDF through color blindness simulator
+- [ ] Information not lost with red-green simulation
+- [ ] Use Coblis (color-blindness.com) or similar tool
+
+**Step 6: Content Proofreading**
+
+**Systematic Review**:
+- [ ] Spell-check all text
+- [ ] Verify all author names and affiliations
+- [ ] Check all numbers and statistics for accuracy
+- [ ] Confirm all citations are correct
+- [ ] Review figure labels and captions
+- [ ] Check for typos in headers and titles
+
+**Peer Review**:
+- [ ] Ask colleague to review poster
+- [ ] 30-second test: Can they identify main message?
+- [ ] 5-minute review: Do they understand conclusions?
+- [ ] Note any confusing elements
+
+**Step 7: Technical Validation**
+
+**LaTeX Compilation Log Review**:
+```bash
+# Check for warnings in .log file
+grep -i "warning\|error\|overfull\|underfull" poster.log
+
+# Common issues to fix:
+# - Overfull hbox: Text extending beyond margins
+# - Underfull hbox: Excessive spacing
+# - Missing references: Citations not resolved
+# - Missing figures: Image files not found
+```
+
+**Fix Common Warnings**:
+```latex
+% Overfull hbox (text too wide)
+\usepackage{microtype} % Better spacing
+\sloppy % Allow slightly looser spacing
+\hyphenation{long-word} % Manual hyphenation
+
+% Missing fonts
+\usepackage[T1]{fontenc} % Better font encoding
+
+% Image not found
+% Ensure paths are correct and files exist
+\graphicspath{{./figures/}{./images/}}
+```
+
+**Step 8: Final Pre-Print Checklist**
+
+**Before Sending to Printer**:
+- [ ] PDF size exactly matches requirements (check with pdfinfo)
+- [ ] All fonts embedded (check with pdffonts)
+- [ ] Color mode correct (RGB for screen, CMYK for print if required)
+- [ ] Bleed area added if required (usually 3-5mm)
+- [ ] Crop marks visible if required
+- [ ] Test print completed and reviewed
+- [ ] File naming clear: [LastName]_[Conference]_Poster.pdf
+- [ ] Backup copy saved
+
+**Printing Specifications to Confirm**:
+- [ ] Paper type (matte vs. glossy)
+- [ ] Printing method (inkjet, large format, fabric)
+- [ ] Color profile (provided to printer if required)
+- [ ] Delivery deadline and shipping address
+- [ ] Tube or flat packaging preference
+
+**Digital Presentation Checklist**:
+- [ ] PDF size optimized (<10MB for email)
+- [ ] Tested on multiple PDF viewers (Adobe, Preview, etc.)
+- [ ] Displays correctly on different screens
+- [ ] QR codes tested and functional
+- [ ] Alternative formats prepared (PNG for social media)
+
+**Review Script** (Available in `scripts/review_poster.sh`):
+```bash
+#!/bin/bash
+# Automated poster PDF review script
+
+echo "Poster PDF Quality Check"
+echo "======================="
+
+# Check file exists
+if [ ! -f "$1" ]; then
+ echo "Error: File not found"
+ exit 1
+fi
+
+echo "File: $1"
+echo ""
+
+# Check page size
+echo "1. Page Dimensions:"
+pdfinfo "$1" | grep "Page size"
+echo ""
+
+# Check fonts
+echo "2. Font Embedding:"
+pdffonts "$1" | head -20
+echo ""
+
+# Check file size
+echo "3. File Size:"
+ls -lh "$1" | awk '{print $5}'
+echo ""
+
+# Count pages (should be 1 for poster)
+echo "4. Page Count:"
+pdfinfo "$1" | grep "Pages"
+echo ""
+
+echo "Manual checks required:"
+echo "- Visual inspection at 100% zoom"
+echo "- Reduced-scale print test (25%)"
+echo "- Color contrast verification"
+echo "- Proofreading for typos"
+```
+
+**Common PDF Issues and Solutions**:
+
+| Issue | Cause | Solution |
+|-------|-------|----------|
+| Large white margins | Incorrect margin settings | Reduce margin in documentclass |
+| Content cut off | Exceeds page boundaries | Check total width/height calculations |
+| Blurry images | Low resolution (<300 DPI) | Replace with higher resolution images |
+| Missing fonts | Fonts not embedded | Compile with -dEmbedAllFonts=true |
+| Wrong page size | Incorrect paper size setting | Verify documentclass paper size |
+| Colors look wrong | RGB vs CMYK mismatch | Convert color space for print |
+| File too large (>50MB) | Uncompressed images | Optimize images or compress PDF |
+| QR codes don't work | Too small or low resolution | Minimum 2×2cm, high contrast |
+
+### 11. Common Poster Content Patterns
+
+Effective content organization for different research types:
+
+**Experimental Research Poster**:
+1. Title and authors
+2. Introduction: Problem and hypothesis
+3. Methods: Experimental design (with diagram)
+4. Results: Key findings (2-4 main figures)
+5. Conclusions: Main takeaways (3-5 bullet points)
+6. Future work (optional)
+7. References and acknowledgments
+
+**Computational/Modeling Poster**:
+1. Title and authors
+2. Motivation: Problem statement
+3. Approach: Algorithm or model (with flowchart)
+4. Implementation: Technical details
+5. Results: Performance metrics and comparisons
+6. Applications: Use cases
+7. Code availability (QR code to GitHub)
+8. References
+
+**Review/Survey Poster**:
+1. Title and authors
+2. Scope: Topic overview
+3. Methods: Literature search strategy
+4. Key findings: Main themes (organized by category)
+5. Trends: Visualizations of publication patterns
+6. Gaps: Identified research needs
+7. Conclusions: Summary and implications
+8. References
+
+### 12. Accessibility and Inclusive Design
+
+Design posters that are accessible to diverse audiences:
+
+**Color Blindness Considerations**:
+- Avoid red-green combinations (most common color blindness)
+- Use patterns or shapes in addition to color
+- Test with color-blindness simulators
+- Provide high contrast (WCAG AA standard: 4.5:1 minimum)
+
+**Visual Impairment Accommodations**:
+- Large, clear fonts (minimum 24pt body text)
+- High contrast text and background
+- Clear visual hierarchy
+- Avoid complex textures or patterns in backgrounds
+
+**Language and Content**:
+- Clear, concise language
+- Define acronyms and jargon
+- International audience considerations
+- Consider multilingual QR code options for global conferences
+
+### 13. Poster Presentation Best Practices
+
+Guidance beyond LaTeX for effective poster sessions:
+
+**Content Strategy**:
+- Tell a story, don't just list facts
+- Focus on 1-3 main messages
+- Use visual abstract or graphical summary
+- Leave room for conversation (don't over-explain)
+
+**Physical Presentation Tips**:
+- Bring printed handouts or business cards with QR code
+- Prepare 30-second, 2-minute, and 5-minute verbal summaries
+- Stand to the side, not blocking the poster
+- Engage viewers with open-ended questions
+
+**Digital Backups**:
+- Save poster as PDF on mobile device
+- Prepare digital version for email sharing
+- Create social media-friendly image version
+- Have backup printed copy or digital display option
+
+## Workflow for Poster Creation
+
+### Stage 1: Planning and Content Development
+
+1. **Determine poster requirements**:
+ - Conference size specifications (A0, 36×48", etc.)
+ - Orientation (portrait vs. landscape)
+ - Submission deadlines and format requirements
+
+2. **Develop content outline**:
+ - Identify 1-3 core messages
+ - Select key figures (typically 3-6 main visuals)
+ - Draft concise text for each section (bullet points preferred)
+ - Aim for 300-800 words total
+
+3. **Choose LaTeX package**:
+ - beamerposter: If familiar with Beamer, need institutional themes
+ - tikzposter: For modern, colorful designs with flexibility
+ - baposter: For structured, professional multi-column layouts
+
+### Stage 2: Design and Layout
+
+1. **Select or create template**:
+ - Start with provided templates in `assets/`
+ - Customize color scheme to match branding
+ - Configure page size and orientation
+
+2. **Design layout structure**:
+ - Plan column structure (2, 3, or 4 columns)
+ - Map content flow (typically left-to-right, top-to-bottom)
+ - Allocate space for title (10-15%), content (70-80%), footer (5-10%)
+
+3. **Set typography**:
+ - Configure font sizes for different hierarchy levels
+ - Ensure minimum 24pt body text
+ - Test readability from 4-6 feet distance
+
+### Stage 3: Content Integration
+
+1. **Create poster header**:
+ - Title (concise, descriptive, 10-15 words)
+ - Authors and affiliations
+ - Institution logos (high-resolution)
+ - Conference logo if required
+
+2. **Populate content sections**:
+ - Keep text minimal and scannable
+ - Use bullet points, not paragraphs
+ - Write in active voice
+ - Integrate figures with clear captions
+
+3. **Add visual elements**:
+ - High-resolution figures (300 DPI minimum)
+ - Consistent styling across all figures
+ - Color-coded elements for emphasis
+ - QR codes for supplementary materials
+
+4. **Include references**:
+ - Cite key papers only (5-10 references typical)
+ - Use abbreviated citation style
+ - Consider QR code to full bibliography
+
+### Stage 4: Refinement and Testing
+
+1. **Review and iterate**:
+ - Check for typos and errors
+ - Verify all figures are high resolution
+ - Ensure consistent formatting
+ - Confirm color scheme works well together
+
+2. **Test readability**:
+ - Print at 25% scale and read from 2-3 feet (simulates poster from 8-12 feet)
+ - Check color on different monitors
+ - Verify QR codes function correctly
+ - Ask colleague to review
+
+3. **Optimize for printing**:
+ - Embed all fonts in PDF
+ - Verify image resolution
+ - Check PDF size requirements
+ - Include bleed area if required
+
+### Stage 5: Compilation and Delivery
+
+1. **Compile final PDF**:
+ ```bash
+ pdflatex poster.tex
+ # Or for better font support:
+ lualatex poster.tex
+ ```
+
+2. **Verify output quality**:
+ - Check all elements are visible and correctly positioned
+ - Zoom to 100% and inspect figure quality
+ - Verify colors match expectations
+ - Confirm PDF opens correctly on different viewers
+
+3. **Prepare for printing**:
+ - Export as PDF/X-1a if required
+ - Save backup copies
+ - Get test print on regular paper first
+ - Order professional printing 2-3 days before deadline
+
+4. **Create supplementary materials**:
+ - Save PNG/JPG version for social media
+ - Create handout version (8.5×11" summary)
+ - Prepare digital version for email sharing
+
+## Integration with Other Skills
+
+This skill works effectively with:
+- **Scientific Writing**: For developing poster content from papers
+- **Figure Creation**: For generating high-quality visualizations
+- **Literature Review**: For contextualizing research
+- **Data Analysis**: For creating result figures and charts
+
+## Common Pitfalls to Avoid
+
+**Design Mistakes**:
+- ❌ Too much text (over 1000 words)
+- ❌ Font sizes too small (under 24pt body text)
+- ❌ Low-contrast color combinations
+- ❌ Cluttered layout with no white space
+- ❌ Inconsistent styling across sections
+- ❌ Poor quality or pixelated images
+
+**Content Mistakes**:
+- ❌ No clear narrative or message
+- ❌ Too many research questions or objectives
+- ❌ Overuse of jargon without definitions
+- ❌ Results without context or interpretation
+- ❌ Missing author contact information
+
+**Technical Mistakes**:
+- ❌ Wrong poster dimensions for conference requirements
+- ❌ RGB colors sent to CMYK printer (color shift)
+- ❌ Fonts not embedded in PDF
+- ❌ File size too large for submission portal
+- ❌ QR codes too small or not tested
+
+**Best Practices**:
+- ✅ Follow conference size specifications exactly
+- ✅ Test print at reduced scale before final printing
+- ✅ Use high-contrast, accessible color schemes
+- ✅ Keep text minimal and highly scannable
+- ✅ Include clear contact information and QR codes
+- ✅ Balance text and visuals (40-50% visual content)
+- ✅ Proofread carefully (errors are magnified on posters!)
+
+## Package Installation
+
+Ensure required LaTeX packages are installed:
+
+```bash
+# For TeX Live (Linux/Mac)
+tlmgr install beamerposter tikzposter baposter
+
+# For MiKTeX (Windows)
+# Packages typically auto-install on first use
+
+# Additional recommended packages
+tlmgr install qrcode graphics xcolor tcolorbox subcaption
+```
+
+## Scripts and Automation
+
+Helper scripts available in `scripts/` directory:
+
+- `compile_poster.sh`: Automated compilation with error handling
+- `generate_template.py`: Interactive template generator
+- `resize_images.py`: Batch image optimization for posters
+- `poster_checklist.py`: Pre-submission validation tool
+
+## References
+
+Comprehensive reference files for detailed guidance:
+
+- `references/latex_poster_packages.md`: Detailed comparison of beamerposter, tikzposter, and baposter with examples
+- `references/poster_layout_design.md`: Layout principles, grid systems, and visual flow
+- `references/poster_design_principles.md`: Typography, color theory, visual hierarchy, and accessibility
+- `references/poster_content_guide.md`: Content organization, writing style, and section-specific guidance
+
+## Templates
+
+Ready-to-use poster templates in `assets/` directory:
+
+- beamerposter templates (classic, modern, colorful)
+- tikzposter templates (default, rays, wave, envelope)
+- baposter templates (portrait, landscape, minimal)
+- Example posters from various scientific disciplines
+- Color scheme definitions and institutional templates
+
+Load these templates and customize for your specific research and conference requirements.
+
diff --git a/scientific-skills/latex-posters/assets/baposter_template.tex b/scientific-skills/latex-posters/assets/baposter_template.tex
new file mode 100644
index 0000000..7c57eac
--- /dev/null
+++ b/scientific-skills/latex-posters/assets/baposter_template.tex
@@ -0,0 +1,257 @@
+% ==============================================================================
+% Research Poster Template - baposter
+% ==============================================================================
+% A structured, professional poster template using baposter
+% Excellent for multi-column layouts with automatic positioning
+% ==============================================================================
+
+\documentclass[a0paper,portrait,fontscale=0.285]{baposter}
+
+% Packages
+\usepackage{graphicx}
+\usepackage{amsmath,amssymb}
+\usepackage{booktabs}
+\usepackage{multicol}
+\usepackage{qrcode}
+\usepackage{hyperref}
+\usepackage{enumitem}
+
+% Set list spacing
+\setlist{nosep}
+
+% ==============================================================================
+% POSTER CONTENT - CUSTOMIZE BELOW
+% ==============================================================================
+
+\begin{document}
+
+\begin{poster}{
+ % ============================================================================
+ % POSTER CONFIGURATION
+ % ============================================================================
+
+ % Grid and columns
+ grid=false, % Set to true for debugging layout
+ columns=3, % Number of columns
+ colspacing=1.5em, % Space between columns
+
+ % Background
+ background=plain, % plain, shadetb, shadelr
+ bgColorOne=white,
+ bgColorTwo=white,
+
+ % Borders
+ borderColor=blue!50!black,
+ linewidth=2pt,
+
+ % Header
+ headerColorOne=blue!70!black,
+ headerColorTwo=blue!60!black,
+ headerFontColor=white,
+ headerheight=0.12\textheight,
+ headershape=roundedright, % rectangle, rounded, roundedright, roundedleft
+ headershade=plain, % plain, shadetb, shadelr
+ headerborder=closed, % open, closed
+ headerfont=\Large\sf\bf,
+
+ % Boxes
+ boxColorOne=white,
+ boxColorTwo=blue!10,
+ boxshade=plain,
+ textborder=roundedleft, % none, rectangle, rounded, roundedleft, roundedright
+
+ % Eye catcher
+ eyecatcher=true
+}
+% ============================================================================
+% HEADER CONTENT
+% ============================================================================
+% Eye Catcher (Left Logo)
+{
+ \includegraphics[height=6em]{logo1.pdf}
+}
+% Title
+{
+ \sf\bf Your Research Title: Concise and Descriptive
+}
+% Authors
+{
+ \vspace{0.3em}
+ Author One\textsuperscript{1}, Author Two\textsuperscript{2}, \underline{Presenting Author}\textsuperscript{1}\\[0.3em]
+ {\small
+ \textsuperscript{1}Department, University Name, City, Country\\
+ \textsuperscript{2}Research Institute Name, City, Country}
+}
+% University Logo (Right)
+{
+ \includegraphics[height=6em]{logo2.pdf}
+}
+
+% ==============================================================================
+% LEFT COLUMN
+% ==============================================================================
+
+\headerbox{Introduction}{name=intro,column=0,row=0}{
+ \textbf{Background}
+
+ Brief context establishing the importance of your research area (1-2 sentences).
+
+ \vspace{0.3cm}
+
+ \textbf{Problem Statement}
+
+ What gap or challenge does your work address? (1-2 sentences)
+
+ \vspace{0.3cm}
+
+ \textbf{Objective}
+
+ Clear statement of your research goal (1 sentence).
+}
+
+\headerbox{Methods}{name=methods,column=0,below=intro}{
+ \textbf{Study Design}
+ \begin{itemize}
+ \item Experimental approach or study type
+ \item Sample: n = X participants/samples
+ \item Key procedures
+ \end{itemize}
+
+ \vspace{0.3cm}
+
+ \textbf{Analysis}
+ \begin{itemize}
+ \item Statistical methods
+ \item Software: R 4.3, Python 3.10
+ \item Significance: p < 0.05
+ \end{itemize}
+
+ \vspace{0.3cm}
+
+ \begin{center}
+ \includegraphics[width=0.9\linewidth]{methods_flowchart.pdf}
+ \end{center}
+}
+
+% ==============================================================================
+% MIDDLE COLUMN (SPANS 2 COLUMNS FOR LARGE RESULT)
+% ==============================================================================
+
+\headerbox{Results: Main Finding}{name=results1,column=1,row=0,span=2}{
+ Brief description of your primary result. What is the key observation?
+
+ \vspace{0.3cm}
+
+ \begin{center}
+ \includegraphics[width=0.95\linewidth]{figure1.pdf}
+ \end{center}
+
+ \textbf{Figure 1:} Descriptive caption explaining the main result. Include statistics (Mean ± SD, n=X, **p<0.01).
+}
+
+% ==============================================================================
+% MIDDLE COLUMN (CONTINUES BELOW)
+% ==============================================================================
+
+\headerbox{Results: Finding 2}{name=results2,column=1,below=results1}{
+ Brief description of second key result.
+
+ \begin{center}
+ \includegraphics[width=0.9\linewidth]{figure2.pdf}
+ \end{center}
+
+ \textbf{Figure 2:} Supporting result or comparison.
+}
+
+% ==============================================================================
+% RIGHT COLUMN
+% ==============================================================================
+
+\headerbox{Results: Finding 3}{name=results3,column=2,below=results1}{
+ Brief description of third result or validation.
+
+ \begin{center}
+ \includegraphics[width=0.9\linewidth]{figure3.pdf}
+ \end{center}
+
+ \textbf{Figure 3:} Additional finding.
+}
+
+% ==============================================================================
+% BOTTOM ROW (SPANS ALL COLUMNS)
+% ==============================================================================
+
+\headerbox{Conclusions}{name=conclusions,column=0,span=2,above=bottom}{
+ \begin{multicols}{2}
+ \textbf{Key Findings}
+ \begin{itemize}
+ \item Main conclusion 1 with significance
+ \item Main conclusion 2 with impact
+ \item Main conclusion 3 with implications
+ \end{itemize}
+
+ \vspace{0.3cm}
+
+ \textbf{Limitations}
+ \begin{itemize}
+ \item Study constraints
+ \item Interpretation context
+ \end{itemize}
+
+ \columnbreak
+
+ \textbf{Future Directions}
+ \begin{itemize}
+ \item Ongoing studies
+ \item Broader applications
+ \item Next research questions
+ \end{itemize}
+
+ \vspace{0.3cm}
+
+ \textbf{Clinical/Practical Implications}
+ \begin{itemize}
+ \item Real-world applications
+ \item Impact on practice
+ \end{itemize}
+ \end{multicols}
+}
+
+\headerbox{Scan for More}{name=qr,column=2,above=bottom}{
+ \begin{center}
+ \qrcode[height=4cm]{https://doi.org/10.1234/your-paper}\\
+ \vspace{0.3cm}
+ \small Full paper, code \& data
+ \end{center}
+}
+
+% ==============================================================================
+% FOOTER (FULL WIDTH AT BOTTOM)
+% ==============================================================================
+
+\headerbox{}{name=footer,column=0,span=3,above=bottom,below=conclusions}{
+ \footnotesize
+ \begin{multicols}{2}
+ \textbf{References}
+ \begin{enumerate}
+ \item Author A et al. (2023). Title. \textit{Journal}, 10(2), 123-145.
+ \item Author B et al. (2024). Title. \textit{Conference}.
+ \item Author C et al. (2022). Title. \textit{Journal}, 15(3), 456-478.
+ \end{enumerate}
+
+ \columnbreak
+
+ \textbf{Acknowledgments}
+
+ Funded by Grant Agency (Grant \#12345). Thanks to collaborators at Institution X.
+
+ \vspace{0.3cm}
+
+ \textbf{Contact:} presenter.email@university.edu | labname.university.edu
+ \end{multicols}
+}
+
+\end{poster}
+
+\end{document}
+
diff --git a/scientific-skills/latex-posters/assets/beamerposter_template.tex b/scientific-skills/latex-posters/assets/beamerposter_template.tex
new file mode 100644
index 0000000..43c9bd7
--- /dev/null
+++ b/scientific-skills/latex-posters/assets/beamerposter_template.tex
@@ -0,0 +1,244 @@
+% ==============================================================================
+% Research Poster Template - beamerposter
+% ==============================================================================
+% A professional academic poster template using beamerposter
+% Customize colors, content, and layout as needed
+% ==============================================================================
+
+\documentclass[final,t]{beamer}
+\usepackage[size=a0,scale=1.4,orientation=portrait]{beamerposter}
+\usetheme{Berlin}
+\usecolortheme{beaver}
+
+% Remove default margins for full page coverage
+\setbeamersize{text margin left=5mm, text margin right=5mm}
+\usepackage[margin=10mm]{geometry}
+
+% Remove navigation symbols
+\setbeamertemplate{navigation symbols}{}
+
+% Packages
+\usepackage{graphicx}
+\usepackage{amsmath,amssymb}
+\usepackage{booktabs}
+\usepackage{multicol}
+\usepackage{qrcode}
+\usepackage{hyperref}
+
+% Font configuration
+\setbeamerfont{title}{size=\VeryHuge,series=\bfseries}
+\setbeamerfont{author}{size=\Large}
+\setbeamerfont{institute}{size=\normalsize}
+\setbeamerfont{block title}{size=\huge,series=\bfseries}
+\setbeamerfont{block body}{size=\LARGE}
+
+% Custom colors (customize to match your institution)
+\definecolor{primarycolor}{RGB}{0,51,102} % Dark blue
+\definecolor{secondarycolor}{RGB}{204,0,0} % Red
+\definecolor{accentcolor}{RGB}{255,204,0} % Gold
+
+\setbeamercolor{structure}{fg=primarycolor}
+\setbeamercolor{block title}{bg=primarycolor,fg=white}
+\setbeamercolor{block body}{bg=primarycolor!10,fg=black}
+
+% ==============================================================================
+% POSTER CONTENT - CUSTOMIZE BELOW
+% ==============================================================================
+
+\title{Your Research Title: Concise and Descriptive}
+\author{Author One\textsuperscript{1}, Author Two\textsuperscript{2}, \underline{Presenting Author}\textsuperscript{1}}
+\institute{
+ \textsuperscript{1}Department, University Name\\
+ \textsuperscript{2}Research Institute Name
+}
+
+\begin{document}
+
+\begin{frame}[t]
+
+ % ============================================================================
+ % HEADER
+ % ============================================================================
+ \begin{block}{}
+ \begin{columns}[T]
+ \begin{column}{.15\linewidth}
+ % Left logo
+ \includegraphics[width=0.9\linewidth]{logo1.pdf}
+ \end{column}
+
+ \begin{column}{.7\linewidth}
+ \centering
+ \usebeamerfont{title}\inserttitle\\[0.5cm]
+ \usebeamerfont{author}\insertauthor\\[0.3cm]
+ \usebeamerfont{institute}\insertinstitute
+ \end{column}
+
+ \begin{column}{.15\linewidth}
+ % Right logo
+ \includegraphics[width=0.9\linewidth]{logo2.pdf}
+ \end{column}
+ \end{columns}
+ \end{block}
+
+ \vspace{1cm}
+
+ % ============================================================================
+ % MAIN CONTENT - 3 COLUMN LAYOUT
+ % ============================================================================
+
+ \begin{columns}[t]
+
+ % ==========================================================================
+ % LEFT COLUMN
+ % ==========================================================================
+ \begin{column}{.3\linewidth}
+
+ \begin{block}{Introduction}
+ \textbf{Background:} Brief context about your research area (1-2 sentences).
+
+ \vspace{0.5cm}
+
+ \textbf{Problem:} What gap or challenge does your work address? (1-2 sentences)
+
+ \vspace{0.5cm}
+
+ \textbf{Objective:} Clear statement of your research goal (1 sentence).
+ \end{block}
+
+ \vspace{1cm}
+
+ \begin{block}{Methods}
+ \textbf{Study Design:}
+ \begin{itemize}
+ \item Experimental approach or design
+ \item Sample size and population
+ \item Key procedures
+ \end{itemize}
+
+ \vspace{0.5cm}
+
+ \textbf{Analysis:}
+ \begin{itemize}
+ \item Statistical methods
+ \item Software/tools used
+ \item Validation approach
+ \end{itemize}
+
+ \vspace{0.5cm}
+
+ % Optional: Methods flowchart
+ \begin{center}
+ \includegraphics[width=0.9\linewidth]{methods_flowchart.pdf}
+ \end{center}
+ \end{block}
+
+ \end{column}
+
+ % ==========================================================================
+ % MIDDLE COLUMN
+ % ==========================================================================
+ \begin{column}{.3\linewidth}
+
+ \begin{block}{Results}
+ \textbf{Finding 1:} Brief description
+
+ \begin{center}
+ \includegraphics[width=0.95\linewidth]{figure1.pdf}
+ \small Figure 1: Descriptive caption with key statistics (n=X, p<0.01).
+ \end{center}
+
+ \vspace{1cm}
+
+ \textbf{Finding 2:} Brief description
+
+ \begin{center}
+ \includegraphics[width=0.95\linewidth]{figure2.pdf}
+ \small Figure 2: Another key result showing comparison or trend.
+ \end{center}
+ \end{block}
+
+ \end{column}
+
+ % ==========================================================================
+ % RIGHT COLUMN
+ % ==========================================================================
+ \begin{column}{.3\linewidth}
+
+ \begin{block}{Results (continued)}
+ \textbf{Finding 3:} Brief description
+
+ \begin{center}
+ \includegraphics[width=0.95\linewidth]{figure3.pdf}
+ \small Figure 3: Additional important result or validation.
+ \end{center}
+ \end{block}
+
+ \vspace{1cm}
+
+ \begin{block}{Conclusions}
+ \textbf{Key Findings:}
+ \begin{itemize}
+ \item Main conclusion 1 with impact
+ \item Main conclusion 2 with significance
+ \item Main conclusion 3 with implications
+ \end{itemize}
+
+ \vspace{0.5cm}
+
+ \textbf{Limitations:}
+ \begin{itemize}
+ \item Brief acknowledgment of constraints
+ \item Context for interpretation
+ \end{itemize}
+
+ \vspace{0.5cm}
+
+ \textbf{Future Directions:}
+ \begin{itemize}
+ \item Next steps or ongoing work
+ \item Broader applications
+ \end{itemize}
+ \end{block}
+
+ \end{column}
+
+ \end{columns}
+
+ \vspace{1cm}
+
+ % ============================================================================
+ % FOOTER
+ % ============================================================================
+
+ \begin{block}{}
+ \footnotesize
+ \begin{columns}[T]
+ \begin{column}{.75\linewidth}
+ \textbf{References}
+ \begin{enumerate}
+ \item Author A et al. (2023). Title. \textit{Journal}, 10(2), 123-145.
+ \item Author B et al. (2024). Title. \textit{Conference Proceedings}.
+ \item Author C et al. (2022). Title. \textit{Journal}, 15(3), 456-478.
+ \end{enumerate}
+
+ \vspace{0.3cm}
+
+ \textbf{Acknowledgments:} Funded by Grant Agency (Grant \#12345). Thanks to collaborators and facility staff.
+
+ \vspace{0.3cm}
+
+ \textbf{Contact:} presenter.email@university.edu | Lab Website: labname.university.edu
+ \end{column}
+
+ \begin{column}{.2\linewidth}
+ \centering
+ \qrcode[height=3.5cm]{https://doi.org/10.1234/your-paper}\\
+ \tiny Scan for full paper
+ \end{column}
+ \end{columns}
+ \end{block}
+
+\end{frame}
+
+\end{document}
+
diff --git a/scientific-skills/latex-posters/assets/poster_quality_checklist.md b/scientific-skills/latex-posters/assets/poster_quality_checklist.md
new file mode 100644
index 0000000..9338688
--- /dev/null
+++ b/scientific-skills/latex-posters/assets/poster_quality_checklist.md
@@ -0,0 +1,358 @@
+# Research Poster Quality Checklist
+
+Use this comprehensive checklist before printing or presenting your research poster.
+
+## Pre-Compilation Checks
+
+### Content Completeness
+- [ ] Title is concise and descriptive (10-15 words)
+- [ ] All author names spelled correctly
+- [ ] Affiliations complete and accurate
+- [ ] Contact email address included
+- [ ] All sections present: Introduction, Methods, Results, Conclusions
+- [ ] References cited (5-10 key citations)
+- [ ] Acknowledgments included (funding, collaborators)
+- [ ] No placeholder text remaining (TODO, Lorem ipsum, etc.)
+
+### Visual Content
+- [ ] All figures prepared and high resolution (300+ DPI)
+- [ ] Figure captions written and descriptive
+- [ ] Logos available (university, funding agencies)
+- [ ] QR codes generated and tested
+- [ ] Icons/graphics sourced (if used)
+
+### LaTeX Configuration
+- [ ] Correct paper size specified (A0, A1, 36×48", etc.)
+- [ ] Correct orientation (portrait/landscape)
+- [ ] Minimal margins configured (5-15mm)
+- [ ] Font sizes appropriate (title 72pt+, body 24pt+)
+- [ ] Color scheme defined
+- [ ] All packages installed and working
+
+## Compilation Checks
+
+### Successful Compilation
+- [ ] PDF compiles without errors
+- [ ] No critical warnings in .log file
+- [ ] All citations resolved (no [?] marks)
+- [ ] All cross-references working
+- [ ] Bibliography generated correctly (if using BibTeX)
+
+### Warning Review
+Run in terminal: `grep -i "warning\|overfull\|underfull" poster.log`
+
+- [ ] No overfull hbox warnings (text too wide)
+- [ ] No underfull hbox warnings (excessive spacing)
+- [ ] No missing figure warnings
+- [ ] No missing font warnings
+- [ ] No undefined reference warnings
+
+## PDF Quality Checks
+
+### Automated Checks
+
+Run: `./scripts/review_poster.sh poster.pdf` or manually verify:
+
+#### Page Specifications
+```bash
+pdfinfo poster.pdf | grep "Page size"
+```
+- [ ] Page size matches requirements exactly
+- [ ] Single page document (not multi-page)
+- [ ] Correct orientation
+
+#### Font Embedding
+```bash
+pdffonts poster.pdf
+```
+- [ ] All fonts show "yes" in "emb" column
+- [ ] No bitmap fonts (should be Type 1 or TrueType)
+
+#### Image Quality
+```bash
+pdfimages -list poster.pdf
+```
+- [ ] All images at least 300 DPI
+- [ ] No JPEG artifacts in figures
+- [ ] Vector graphics used where possible
+
+#### File Size
+```bash
+ls -lh poster.pdf
+```
+- [ ] Reasonable size (2-50 MB typical)
+- [ ] Not too large for email (<50 MB) if sharing digitally
+- [ ] Not suspiciously small (<1 MB - may indicate low quality)
+
+## Visual Inspection (100% Zoom)
+
+### Layout and Spacing
+- [ ] Content fills entire page (no excessive white margins)
+- [ ] Consistent spacing between columns (1-2cm)
+- [ ] Consistent spacing between blocks (1-2cm)
+- [ ] All elements aligned to grid
+- [ ] No overlapping text or figures
+- [ ] White space evenly distributed (30-40% total)
+- [ ] Visual balance across poster (no heavy/empty areas)
+
+### Typography
+- [ ] Title readable and prominent (72-120pt)
+- [ ] Section headers clear (48-72pt)
+- [ ] Body text large enough (24-36pt minimum, 30pt+ recommended)
+- [ ] Captions readable (18-24pt)
+- [ ] No text running off edges
+- [ ] Consistent font usage throughout
+- [ ] Line spacing adequate (1.2-1.5×)
+- [ ] No awkward hyphenation or word breaks
+- [ ] All special characters render correctly (Greek, math symbols)
+
+### Visual Elements
+- [ ] All figures display correctly
+- [ ] No pixelated or blurry images
+- [ ] Figure resolution high (zoom to 200% to verify)
+- [ ] Figure labels large and clear
+- [ ] Graph axes labeled with units
+- [ ] Color schemes consistent across figures
+- [ ] Legends readable and well-positioned
+- [ ] Logos crisp and professional
+- [ ] QR codes sharp and high-contrast (minimum 2×2cm)
+- [ ] No visual artifacts or rendering errors
+
+### Colors
+- [ ] Colors render as intended (not washed out)
+- [ ] High contrast between text and background (≥4.5:1)
+- [ ] Color scheme harmonious
+- [ ] Colors appropriate for printing (not too bright/neon)
+- [ ] Institutional colors used correctly
+- [ ] Color-blind friendly palette (avoid red-green only)
+
+### Content
+- [ ] Title complete and correctly positioned
+- [ ] All author names and affiliations visible
+- [ ] All sections present and labeled
+- [ ] Results section has figures/data
+- [ ] Conclusions clearly stated
+- [ ] References formatted consistently
+- [ ] Contact information clearly visible
+- [ ] No missing content
+
+## Reduced-Scale Print Test (CRITICAL)
+
+### Test Print Preparation
+Print poster at 25% scale:
+- A0 poster → Print on A4 paper
+- 36×48" poster → Print on Letter paper
+- A1 poster → Print on A5 paper
+
+### Readability from Distance
+
+**From 6 feet (2 meters):**
+- [ ] Title clearly readable
+- [ ] Authors identifiable
+- [ ] Main figures visible
+
+**From 4 feet (1.2 meters):**
+- [ ] Section headers readable
+- [ ] Figure captions readable
+- [ ] Key results visible
+
+**From 2 feet (0.6 meters):**
+- [ ] Body text readable
+- [ ] References readable
+- [ ] All details clear
+
+### Print Quality
+- [ ] Colors accurate (match screen expectations)
+- [ ] No banding or color shifts
+- [ ] Sharp edges (not blurry)
+- [ ] Consistent print density
+- [ ] No printer artifacts
+
+## Content Proofreading
+
+### Text Accuracy
+- [ ] Spell-checked all text
+- [ ] Grammar checked
+- [ ] All author names spelled correctly
+- [ ] All affiliations accurate
+- [ ] Email address correct
+- [ ] No typos in title or headers
+
+### Scientific Accuracy
+- [ ] All numbers and statistics verified
+- [ ] Units included and correct
+- [ ] Statistical significance correctly indicated
+- [ ] Sample sizes (n=) reported
+- [ ] Figure numbering consistent
+- [ ] Citations accurate and complete
+- [ ] Methodology accurately described
+- [ ] Results match figures/data
+- [ ] Conclusions supported by data
+
+### Consistency
+- [ ] Terminology consistent throughout
+- [ ] Abbreviations defined at first use
+- [ ] Consistent notation (italics for genes, etc.)
+- [ ] Consistent units (don't mix metric/imperial)
+- [ ] Consistent decimal places
+- [ ] Consistent citation format
+
+## Accessibility Checks
+
+### Color Contrast
+Test at: https://webaim.org/resources/contrastchecker/
+
+- [ ] Title-background contrast ≥ 7:1
+- [ ] Body text-background contrast ≥ 4.5:1
+- [ ] All text meets WCAG AA standard minimum
+
+### Color Blindness
+Test with simulator: https://www.color-blindness.com/coblis-color-blindness-simulator/
+
+- [ ] Information not lost with deuteranopia (red-green)
+- [ ] Key distinctions visible with protanopia
+- [ ] Patterns/shapes used in addition to color
+- [ ] No critical info conveyed by color alone
+
+### Visual Clarity
+- [ ] Clear visual hierarchy (size, weight, position)
+- [ ] Logical reading order
+- [ ] Grouping of related elements obvious
+- [ ] Important info emphasized appropriately
+
+## Peer Review
+
+### 30-Second Test
+Show poster to colleague for 30 seconds, then ask:
+- [ ] They can identify the research topic
+- [ ] They can state the main finding
+- [ ] They remember the key figure
+
+### 5-Minute Review
+Ask colleague to read poster (5 minutes), then ask:
+- [ ] They understand the research question
+- [ ] They can explain the approach
+- [ ] They can summarize the conclusions
+- [ ] They identify what makes it novel/important
+
+### Feedback
+- [ ] Noted any confusing elements
+- [ ] Identified any unclear figures
+- [ ] Checked for jargon that needs definition
+- [ ] Verified logical flow
+
+## Pre-Printing Final Checks
+
+### Technical Specifications
+- [ ] PDF size exactly matches conference requirements
+- [ ] Orientation correct (portrait vs landscape)
+- [ ] All fonts embedded (verified with pdffonts)
+- [ ] Color space correct (RGB for screen, CMYK if printer requires)
+- [ ] Resolution adequate (300+ DPI for all images)
+- [ ] Bleed area added if required (typically 3-5mm)
+- [ ] Crop marks visible if required
+- [ ] File naming convention followed
+
+### Printer Communication
+- [ ] Confirmed paper type (matte vs glossy)
+- [ ] Confirmed poster size
+- [ ] Provided color profile if required
+- [ ] Verified delivery deadline
+- [ ] Confirmed shipping/pickup arrangements
+- [ ] Discussed backup plan if issues arise
+
+### Backup and Storage
+- [ ] PDF saved with clear filename: `LastName_Conference_Poster.pdf`
+- [ ] Source .tex file backed up
+- [ ] All figure files backed up
+- [ ] Copy saved to cloud storage
+- [ ] Copy saved on USB drive for conference
+- [ ] Digital version ready to email if requested
+
+## Digital Presentation Checks
+
+If presenting digitally or sharing online:
+
+### File Optimization
+- [ ] PDF compressed if >10MB (for email)
+- [ ] Test opens in Adobe Reader
+- [ ] Test opens in Preview (Mac)
+- [ ] Test opens in browser PDF viewers
+- [ ] Test on mobile devices
+
+### Interactive Elements
+- [ ] All QR codes tested and functional
+- [ ] QR codes link to correct URLs
+- [ ] Hyperlinks work (if included)
+- [ ] Links open in new tabs/windows appropriately
+
+### Alternative Formats
+- [ ] PNG version created for social media (if needed)
+- [ ] Thumbnail image created
+- [ ] Poster description/abstract prepared
+- [ ] Hashtags and social media text ready
+
+## Conference-Specific
+
+### Requirements Verification
+- [ ] Poster size matches conference specifications exactly
+- [ ] Orientation matches requirements
+- [ ] File format correct (usually PDF)
+- [ ] Submission deadline met
+- [ ] File naming convention followed
+- [ ] Abstract/description submitted if required
+
+### Physical Preparation
+- [ ] Poster printed and inspected
+- [ ] Backup printed copy prepared
+- [ ] Push pins/mounting materials ready
+- [ ] Poster tube or flat portfolio for transport
+- [ ] Business cards/handouts prepared
+- [ ] Digital backup on laptop/phone
+
+### Presentation Preparation
+- [ ] 30-second elevator pitch prepared
+- [ ] 2-minute summary prepared
+- [ ] 5-minute detailed explanation prepared
+- [ ] Anticipated questions considered
+- [ ] Follow-up materials ready (QR code to paper, etc.)
+
+## Final Sign-Off
+
+Date: ________________
+
+Poster Title: _______________________________________________
+
+Conference: _______________________________________________
+
+Reviewed by: _______________________________________________
+
+All critical items checked: [ ]
+
+Ready for printing: [ ]
+
+Ready for presentation: [ ]
+
+Notes/Issues to address:
+_________________________________________________________
+_________________________________________________________
+_________________________________________________________
+
+---
+
+## Quick Reference: Common Issues
+
+| Issue | Quick Fix |
+|-------|-----------|
+| Large white margins | Reduce margin in documentclass: `margin=5mm` |
+| Text too small | Increase scale: `scale=1.5` in beamerposter |
+| Blurry figures | Use vector graphics (PDF) or higher resolution (600+ DPI) |
+| Colors wrong | Check RGB vs CMYK, test print before final |
+| Fonts not embedded | Compile with: `pdflatex -dEmbedAllFonts=true` |
+| Content cut off | Check total width: columns + spacing + margins = pagewidth |
+| QR codes don't scan | Increase size (min 2×2cm), ensure high contrast |
+| File too large | Compress: `gs -sDEVICE=pdfwrite -dPDFSETTINGS=/printer ...` |
+
+## Checklist Version
+Version 1.0 - For use with LaTeX poster packages (beamerposter, tikzposter, baposter)
+
diff --git a/scientific-skills/latex-posters/assets/tikzposter_template.tex b/scientific-skills/latex-posters/assets/tikzposter_template.tex
new file mode 100644
index 0000000..6247188
--- /dev/null
+++ b/scientific-skills/latex-posters/assets/tikzposter_template.tex
@@ -0,0 +1,251 @@
+% ==============================================================================
+% Research Poster Template - tikzposter
+% ==============================================================================
+% A modern, colorful poster template using tikzposter
+% Customize themes, colors, and content as needed
+% ==============================================================================
+
+\documentclass[
+ 25pt, % Font scaling
+ a0paper, % Paper size
+ portrait, % Orientation
+ margin=10mm, % Outer margins (minimal for full page)
+ innermargin=15mm, % Space inside blocks
+ blockverticalspace=15mm, % Space between blocks
+ colspace=15mm, % Space between columns
+ subcolspace=8mm % Space between subcolumns
+]{tikzposter}
+
+% Packages
+\usepackage{graphicx}
+\usepackage{amsmath,amssymb}
+\usepackage{booktabs}
+\usepackage{qrcode}
+\usepackage{hyperref}
+
+% Theme selection (uncomment your choice)
+\usetheme{Rays} % Modern with radiating background
+% \usetheme{Wave} % Clean with decorative wave
+% \usetheme{Board} % Board-style with texture
+% \usetheme{Envelope} % Minimal with envelope corners
+% \usetheme{Default} % Professional with lines
+
+% Color style (uncomment your choice)
+\usecolorstyle{Denmark} % Professional blue
+% \usecolorstyle{Australia} % Warm colors
+% \usecolorstyle{Sweden} % Cool tones
+% \usecolorstyle{Britain} % Earth tones
+
+% Custom color scheme (optional - comment out if using built-in)
+% \definecolorstyle{CustomStyle}{
+% \definecolor{colorOne}{RGB}{0,51,102} % Dark blue
+% \definecolor{colorTwo}{RGB}{255,204,0} % Gold
+% \definecolor{colorThree}{RGB}{204,0,0} % Red
+% }{
+% % Background Colors
+% \colorlet{backgroundcolor}{white}
+% \colorlet{framecolor}{colorOne}
+% % Title Colors
+% \colorlet{titlefgcolor}{white}
+% \colorlet{titlebgcolor}{colorOne}
+% % Block Colors
+% \colorlet{blocktitlebgcolor}{colorOne}
+% \colorlet{blocktitlefgcolor}{white}
+% \colorlet{blockbodybgcolor}{white}
+% \colorlet{blockbodyfgcolor}{black}
+% }
+% \usecolorstyle{CustomStyle}
+
+% ==============================================================================
+% POSTER CONTENT - CUSTOMIZE BELOW
+% ==============================================================================
+
+\title{Your Research Title: Concise and Descriptive}
+\author{Author One\textsuperscript{1}, Author Two\textsuperscript{2}, \underline{Presenting Author}\textsuperscript{1}}
+\institute{
+ \textsuperscript{1}Department, University Name, City, Country\\
+ \textsuperscript{2}Research Institute Name, City, Country
+}
+
+% Title matter (logos)
+\titlegraphic{
+ \includegraphics[width=0.1\textwidth]{logo1.pdf}
+ \hspace{3cm}
+ \includegraphics[width=0.1\textwidth]{logo2.pdf}
+}
+
+\begin{document}
+
+\maketitle
+
+% ==============================================================================
+% MAIN CONTENT - 3 COLUMN LAYOUT
+% ==============================================================================
+
+\begin{columns}
+
+ % ============================================================================
+ % LEFT COLUMN
+ % ============================================================================
+ \column{0.33}
+
+ \block{Introduction}{
+ \textbf{Background}
+
+ Brief context about your research area. One to two sentences establishing the importance of the topic.
+
+ \vspace{0.5cm}
+
+ \textbf{Problem Statement}
+
+ What gap or challenge does your work address? Why is this important? One to two sentences.
+
+ \vspace{0.5cm}
+
+ \textbf{Research Objective}
+
+ Clear, concise statement of what you set out to do in this study.
+ }
+
+ \block{Methods}{
+ \textbf{Study Design}
+ \begin{itemize}
+ \item Experimental approach or study type
+ \item Sample size: n = X participants/samples
+ \item Key inclusion/exclusion criteria
+ \end{itemize}
+
+ \vspace{0.5cm}
+
+ \textbf{Procedures}
+ \begin{itemize}
+ \item Main experimental steps
+ \item Key measurements or interventions
+ \item Data collection approach
+ \end{itemize}
+
+ \vspace{0.5cm}
+
+ \textbf{Analysis}
+ \begin{itemize}
+ \item Statistical methods used
+ \item Software/tools (e.g., R 4.3, Python)
+ \item Significance threshold (p < 0.05)
+ \end{itemize}
+
+ \vspace{0.5cm}
+
+ % Optional: Methods flowchart
+ \begin{tikzfigure}
+ \includegraphics[width=0.9\linewidth]{methods_diagram.pdf}
+ \end{tikzfigure}
+ }
+
+ % ============================================================================
+ % MIDDLE COLUMN
+ % ============================================================================
+ \column{0.33}
+
+ \block{Results: Finding 1}{
+ Brief description of your first main result. What did you observe?
+
+ \begin{tikzfigure}
+ \includegraphics[width=0.95\linewidth]{figure1.pdf}
+ \end{tikzfigure}
+
+ \textbf{Figure 1:} Descriptive caption explaining the figure. Include key statistics (Mean ± SD, n=X, **p<0.01).
+ }
+
+ \block{Results: Finding 2}{
+ Brief description of your second main result.
+
+ \begin{tikzfigure}
+ \includegraphics[width=0.95\linewidth]{figure2.pdf}
+ \end{tikzfigure}
+
+ \textbf{Figure 2:} Another key result showing comparison, trend, or correlation.
+ }
+
+ % ============================================================================
+ % RIGHT COLUMN
+ % ============================================================================
+ \column{0.33}
+
+ \block{Results: Finding 3}{
+ Brief description of your third main result or validation.
+
+ \begin{tikzfigure}
+ \includegraphics[width=0.95\linewidth]{figure3.pdf}
+ \end{tikzfigure}
+
+ \textbf{Figure 3:} Additional important finding or supporting data.
+ }
+
+ \block{Conclusions}{
+ \textbf{Key Findings}
+ \begin{itemize}
+ \item \textbf{Main conclusion 1:} Impact and significance
+ \item \textbf{Main conclusion 2:} Novel contribution
+ \item \textbf{Main conclusion 3:} Practical implications
+ \end{itemize}
+
+ \vspace{0.5cm}
+
+ \textbf{Limitations}
+ \begin{itemize}
+ \item Brief acknowledgment of study constraints
+ \item Context for result interpretation
+ \end{itemize}
+
+ \vspace{0.5cm}
+
+ \textbf{Future Directions}
+ \begin{itemize}
+ \item Ongoing or planned follow-up studies
+ \item Broader applications of findings
+ \end{itemize}
+ }
+
+ \block{Scan for More}{
+ \begin{center}
+ \qrcode[height=5cm]{https://doi.org/10.1234/your-paper}\\
+ \vspace{0.5cm}
+ \large Full paper, code, and data
+ \end{center}
+ }
+
+\end{columns}
+
+% ==============================================================================
+% FOOTER (Full Width)
+% ==============================================================================
+
+\block[width=1.0\linewidth]{}{
+ \footnotesize
+ \begin{minipage}{0.7\textwidth}
+ \textbf{References}
+ \begin{enumerate}
+ \item Author A et al. (2023). Title of paper. \textit{Journal Name}, 10(2), 123-145. doi:10.xxxx/xxxxx
+ \item Author B et al. (2024). Title of paper. \textit{Conference Proceedings}.
+ \item Author C et al. (2022). Title of paper. \textit{Journal Name}, 15(3), 456-478.
+ \end{enumerate}
+
+ \vspace{0.3cm}
+
+ \textbf{Acknowledgments:} This work was supported by Funding Agency (Grant \#12345). We thank collaborators at Institution X and the Core Facility for technical support.
+
+ \vspace{0.3cm}
+
+ \textbf{Contact:} presenter.email@university.edu | Twitter: @labname | Website: labname.university.edu
+ \end{minipage}%
+ \hfill
+ \begin{minipage}{0.25\textwidth}
+ \raggedleft
+ Conference Name 2024\\
+ Location, Dates\\
+ Poster \#XXX
+ \end{minipage}
+}
+
+\end{document}
+
diff --git a/scientific-skills/latex-posters/references/latex_poster_packages.md b/scientific-skills/latex-posters/references/latex_poster_packages.md
new file mode 100644
index 0000000..5a08035
--- /dev/null
+++ b/scientific-skills/latex-posters/references/latex_poster_packages.md
@@ -0,0 +1,745 @@
+# LaTeX Poster Packages: Comprehensive Comparison
+
+## Overview
+
+Three major LaTeX packages dominate research poster creation: beamerposter, tikzposter, and baposter. Each has distinct strengths, syntax, and use cases. This guide provides detailed comparisons and practical examples.
+
+## Package Comparison Matrix
+
+| Feature | beamerposter | tikzposter | baposter |
+|---------|--------------|------------|----------|
+| **Learning Curve** | Easy (if familiar with Beamer) | Moderate | Moderate |
+| **Flexibility** | Moderate | High | Moderate-High |
+| **Default Aesthetics** | Traditional/Academic | Modern/Colorful | Professional/Clean |
+| **Theme Support** | Extensive (Beamer themes) | Built-in + Custom | Limited built-in |
+| **Customization** | Moderate effort | Easy with TikZ | Structured approach |
+| **Layout System** | Frame-based | Block-based | Box-based with grid |
+| **Multi-column** | Manual | Automatic | Automatic |
+| **Graphics Integration** | Standard includegraphics | TikZ + includegraphics | Standard + advanced |
+| **Community Support** | Large (Beamer community) | Growing | Smaller |
+| **Best For** | Traditional academic, institutional branding | Creative designs, custom graphics | Structured multi-column layouts |
+| **File Size** | Small | Medium-Large (TikZ overhead) | Medium |
+| **Compilation Speed** | Fast | Slower (TikZ processing) | Fast-Medium |
+
+## 1. beamerposter
+
+### Overview
+
+beamerposter extends the popular Beamer presentation class for poster-sized documents. It inherits all Beamer functionality, themes, and customization options.
+
+### Advantages
+
+- **Familiar syntax**: If you know Beamer, you know beamerposter
+- **Extensive themes**: Access to all Beamer themes and color schemes
+- **Institutional branding**: Easy to match university templates
+- **Stable and mature**: Well-tested, extensive documentation
+- **Block structure**: Clear organizational units
+- **Good for traditional posters**: Academic conferences, thesis defenses
+
+### Disadvantages
+
+- **Less flexible layouts**: Column-based system can be restrictive
+- **Manual positioning**: Requires careful spacing adjustments
+- **Traditional aesthetics**: Can look dated compared to modern designs
+- **Limited built-in styling**: Requires theme customization for unique looks
+
+### Basic Template
+
+```latex
+\documentclass[final,t]{beamer}
+\usepackage[size=a0,scale=1.4,orientation=portrait]{beamerposter}
+\usetheme{Berlin}
+\usecolortheme{beaver}
+
+% Configure fonts
+\setbeamerfont{title}{size=\VeryHuge,series=\bfseries}
+\setbeamerfont{author}{size=\Large}
+\setbeamerfont{block title}{size=\large,series=\bfseries}
+
+\title{Your Research Title}
+\author{Author Names}
+\institute{Institution}
+
+\begin{document}
+\begin{frame}[t]
+
+ % Title block
+ \begin{block}{}
+ \maketitle
+ \end{block}
+
+ \begin{columns}[t]
+ \begin{column}{.45\linewidth}
+
+ \begin{block}{Introduction}
+ Your introduction text here...
+ \end{block}
+
+ \begin{block}{Methods}
+ Your methods text here...
+ \end{block}
+
+ \end{column}
+
+ \begin{column}{.45\linewidth}
+
+ \begin{block}{Results}
+ Your results text here...
+ \includegraphics[width=\linewidth]{figure.pdf}
+ \end{block}
+
+ \begin{block}{Conclusions}
+ Your conclusions here...
+ \end{block}
+
+ \end{column}
+ \end{columns}
+
+\end{frame}
+\end{document}
+```
+
+### Popular Themes
+
+```latex
+% Traditional academic
+\usetheme{Berlin}
+\usecolortheme{beaver}
+
+% Modern minimal
+\usetheme{Madrid}
+\usecolortheme{whale}
+
+% Blue professional
+\usetheme{Singapore}
+\usecolortheme{dolphin}
+
+% Dark theme
+\usetheme{Warsaw}
+\usecolortheme{seahorse}
+```
+
+### Custom Colors
+
+```latex
+% Define custom colors
+\definecolor{primarycolor}{RGB}{0,51,102} % Dark blue
+\definecolor{secondarycolor}{RGB}{204,0,0} % Red
+\definecolor{accentcolor}{RGB}{255,204,0} % Gold
+
+% Apply to beamer elements
+\setbeamercolor{structure}{fg=primarycolor}
+\setbeamercolor{block title}{bg=primarycolor,fg=white}
+\setbeamercolor{block body}{bg=primarycolor!10,fg=black}
+```
+
+### Advanced Customization
+
+```latex
+% Remove navigation symbols
+\setbeamertemplate{navigation symbols}{}
+
+% Custom title formatting
+\setbeamertemplate{title page}{
+ \begin{center}
+ {\usebeamerfont{title}\usebeamercolor[fg]{title}\inserttitle}\\[1cm]
+ {\usebeamerfont{author}\insertauthor}\\[0.5cm]
+ {\usebeamerfont{institute}\insertinstitute}
+ \end{center}
+}
+
+% Custom block style
+\setbeamertemplate{block begin}{
+ \par\vskip\medskipamount
+ \begin{beamercolorbox}[colsep*=.75ex,rounded=true]{block title}
+ \usebeamerfont*{block title}\insertblocktitle
+ \end{beamercolorbox}
+ {\parskip0pt\par}
+ \usebeamerfont{block body}
+ \begin{beamercolorbox}[colsep*=.75ex,vmode,rounded=true]{block body}
+}
+```
+
+### Three-Column Layout
+
+```latex
+\begin{columns}[t]
+ \begin{column}{.3\linewidth}
+ % Left column content
+ \end{column}
+ \begin{column}{.3\linewidth}
+ % Middle column content
+ \end{column}
+ \begin{column}{.3\linewidth}
+ % Right column content
+ \end{column}
+\end{columns}
+```
+
+## 2. tikzposter
+
+### Overview
+
+tikzposter is built on the powerful TikZ graphics package, offering modern designs with extensive customization through TikZ commands.
+
+### Advantages
+
+- **Modern aesthetics**: Contemporary, colorful designs out-of-the-box
+- **Flexible block placement**: Easy positioning anywhere on poster
+- **Beautiful themes**: Multiple professionally designed themes included
+- **TikZ integration**: Seamless graphics and custom drawings
+- **Color customization**: Easy to create custom color palettes
+- **Automatic spacing**: Intelligent block spacing and alignment
+
+### Disadvantages
+
+- **Compilation time**: TikZ processing can be slow for large posters
+- **File size**: PDFs can be larger due to TikZ elements
+- **Learning curve**: TikZ syntax can be complex for advanced customization
+- **Less institutional theme support**: Requires more work to match branding
+
+### Basic Template
+
+```latex
+\documentclass[25pt, a0paper, portrait, margin=0mm, innermargin=15mm,
+ blockverticalspace=15mm, colspace=15mm, subcolspace=8mm]{tikzposter}
+
+\title{Your Research Title}
+\author{Author Names}
+\institute{Institution}
+
+% Choose theme and color style
+\usetheme{Rays}
+\usecolorstyle{Denmark}
+
+\begin{document}
+
+\maketitle
+
+% First column
+\begin{columns}
+ \column{0.5}
+
+ \block{Introduction}{
+ Your introduction text here...
+ }
+
+ \block{Methods}{
+ Your methods text here...
+ }
+
+ % Second column
+ \column{0.5}
+
+ \block{Results}{
+ Your results text here...
+ \begin{tikzfigure}
+ \includegraphics[width=0.9\linewidth]{figure.pdf}
+ \end{tikzfigure}
+ }
+
+ \block{Conclusions}{
+ Your conclusions here...
+ }
+
+\end{columns}
+
+\end{document}
+```
+
+### Available Themes
+
+```latex
+% Modern with radiating background
+\usetheme{Rays}
+
+% Clean with decorative wave
+\usetheme{Wave}
+
+% Minimal with envelope corners
+\usetheme{Envelope}
+
+% Traditional academic
+\usetheme{Basic}
+
+% Board-style with texture
+\usetheme{Board}
+
+% Clean minimal
+\usetheme{Simple}
+
+% Professional with lines
+\usetheme{Default}
+
+% Autumn color scheme
+\usetheme{Autumn}
+
+% Desert color palette
+\usetheme{Desert}
+```
+
+### Color Styles
+
+```latex
+% Professional blue
+\usecolorstyle{Denmark}
+
+% Warm colors
+\usecolorstyle{Australia}
+
+% Cool tones
+\usecolorstyle{Sweden}
+
+% Earth tones
+\usecolorstyle{Britain}
+
+% Default color scheme
+\usecolorstyle{Default}
+```
+
+### Custom Color Definition
+
+```latex
+\definecolorstyle{CustomStyle}{
+ \definecolor{colorOne}{RGB}{0,51,102} % Dark blue
+ \definecolor{colorTwo}{RGB}{255,204,0} % Gold
+ \definecolor{colorThree}{RGB}{204,0,0} % Red
+}{
+ % Background Colors
+ \colorlet{backgroundcolor}{white}
+ \colorlet{framecolor}{colorOne}
+ % Title Colors
+ \colorlet{titlefgcolor}{white}
+ \colorlet{titlebgcolor}{colorOne}
+ % Block Colors
+ \colorlet{blocktitlebgcolor}{colorOne}
+ \colorlet{blocktitlefgcolor}{white}
+ \colorlet{blockbodybgcolor}{white}
+ \colorlet{blockbodyfgcolor}{black}
+ % Innerblock Colors
+ \colorlet{innerblocktitlebgcolor}{colorTwo}
+ \colorlet{innerblocktitlefgcolor}{black}
+ \colorlet{innerblockbodybgcolor}{colorTwo!10}
+ \colorlet{innerblockbodyfgcolor}{black}
+ % Note colors
+ \colorlet{notefgcolor}{black}
+ \colorlet{notebgcolor}{colorThree!20}
+}
+
+\usecolorstyle{CustomStyle}
+```
+
+### Block Placement and Sizing
+
+```latex
+% Full-width block
+\block{Title}{Content}
+
+% Specify width
+\block[width=0.8\linewidth]{Title}{Content}
+
+% Position manually
+\block[x=10, y=50, width=30]{Title}{Content}
+
+% Inner blocks (nested, different styling)
+\block{Outer Title}{
+ \innerblock{Inner Title}{
+ Highlighted content
+ }
+}
+
+% Note blocks (for emphasis)
+\note[width=0.4\linewidth]{
+ Important note text
+}
+```
+
+### Advanced Features
+
+```latex
+% QR codes with tikzposter styling
+\block{Scan for More}{
+ \begin{center}
+ \qrcode[height=5cm]{https://github.com/project}\\
+ \vspace{0.5cm}
+ Visit our GitHub repository
+ \end{center}
+}
+
+% Multi-column within block
+\block{Results}{
+ \begin{tabular}{cc}
+ \includegraphics[width=0.45\linewidth]{fig1.pdf} &
+ \includegraphics[width=0.45\linewidth]{fig2.pdf}
+ \end{tabular}
+}
+
+% Custom TikZ graphics
+\block{Methodology}{
+ \begin{tikzpicture}
+ \node[draw, rectangle, fill=blue!20] (A) {Step 1};
+ \node[draw, rectangle, fill=green!20, right=of A] (B) {Step 2};
+ \draw[->, thick] (A) -- (B);
+ \end{tikzpicture}
+}
+```
+
+## 3. baposter
+
+### Overview
+
+baposter (Box Area Poster) uses a box-based layout system with automatic positioning and spacing. Excellent for structured, professional multi-column layouts.
+
+### Advantages
+
+- **Automatic layout**: Intelligent box positioning and spacing
+- **Professional defaults**: Clean, polished appearance out-of-the-box
+- **Multi-column excellence**: Best-in-class column-based layouts
+- **Header/footer boxes**: Easy institutional branding
+- **Consistent spacing**: Automatic vertical and horizontal alignment
+- **Print-ready**: Excellent CMYK support
+
+### Disadvantages
+
+- **Less flexible**: Box-based system can be constraining
+- **Fewer themes**: Limited built-in theme options
+- **Learning curve**: Unique syntax requires time to master
+- **Less active development**: Smaller community compared to others
+
+### Basic Template
+
+```latex
+\documentclass[a0paper,portrait]{baposter}
+
+\usepackage{graphicx}
+\usepackage{multicol}
+
+\begin{document}
+
+\begin{poster}{
+ % Options
+ grid=false,
+ columns=3,
+ colspacing=1em,
+ bgColorOne=white,
+ bgColorTwo=white,
+ borderColor=blue!50,
+ headerColorOne=blue!80,
+ headerColorTwo=blue!70,
+ headerFontColor=white,
+ boxColorOne=white,
+ boxColorTwo=blue!10,
+ textborder=roundedleft,
+ eyecatcher=true,
+ headerborder=open,
+ headerheight=0.12\textheight,
+ headershape=roundedright,
+ headershade=plain,
+ headerfont=\Large\sf\bf,
+ linewidth=2pt
+}
+% Eye Catcher (Logo)
+{
+ \includegraphics[height=6em]{logo.pdf}
+}
+% Title
+{
+ Your Research Title
+}
+% Authors
+{
+ Author Names\\
+ Institution Name
+}
+% University Logo
+{
+ \includegraphics[height=6em]{university-logo.pdf}
+}
+
+% First column boxes
+\headerbox{Introduction}{name=intro,column=0,row=0}{
+ Your introduction text here...
+}
+
+\headerbox{Methods}{name=methods,column=0,below=intro}{
+ Your methods text here...
+}
+
+% Second column boxes
+\headerbox{Results}{name=results,column=1,row=0,span=2}{
+ Your results here...
+ \includegraphics[width=0.9\linewidth]{results.pdf}
+}
+
+\headerbox{Analysis}{name=analysis,column=1,below=results}{
+ Analysis details...
+}
+
+\headerbox{Validation}{name=validation,column=2,below=results}{
+ Validation results...
+}
+
+% Bottom spanning box
+\headerbox{Conclusions}{name=conclusions,column=0,span=3,above=bottom}{
+ Your conclusions here...
+}
+
+\end{poster}
+\end{document}
+```
+
+### Box Positioning
+
+```latex
+% Position by column and row
+\headerbox{Title}{name=box1, column=0, row=0}{Content}
+
+% Position relative to other boxes
+\headerbox{Title}{name=box2, column=0, below=box1}{Content}
+
+% Above another box
+\headerbox{Title}{name=box3, column=1, above=bottom}{Content}
+
+% Span multiple columns
+\headerbox{Title}{name=box4, column=0, span=2, row=0}{Content}
+
+% Between two boxes vertically
+\headerbox{Title}{name=box5, column=0, below=box1, above=box3}{Content}
+
+% Aligned with another box
+\headerbox{Title}{name=box6, column=1, aligned=box1}{Content}
+```
+
+### Styling Options
+
+```latex
+\begin{poster}{
+ % Grid and layout
+ grid=false, % Show layout grid (debug)
+ columns=3, % Number of columns
+ colspacing=1em, % Space between columns
+
+ % Background
+ background=plain, % plain, shadetb, shadelr, user
+ bgColorOne=white,
+ bgColorTwo=lightgray,
+
+ % Borders
+ borderColor=blue!50,
+ linewidth=2pt,
+
+ % Header
+ headerColorOne=blue!80,
+ headerColorTwo=blue!70,
+ headerFontColor=white,
+ headerheight=0.12\textheight,
+ headershape=roundedright, % rectangle, rounded, roundedright, roundedleft
+ headershade=plain, % plain, shadetb, shadelr
+ headerborder=open, % open, closed
+
+ % Boxes
+ boxColorOne=white,
+ boxColorTwo=blue!10,
+ boxshade=plain, % plain, shadetb, shadelr
+ textborder=roundedleft, % none, rectangle, rounded, roundedleft, roundedright
+
+ % Eye catcher
+ eyecatcher=true
+}
+```
+
+### Color Schemes
+
+```latex
+% Professional blue
+\begin{poster}{
+ headerColorOne=blue!80,
+ headerColorTwo=blue!70,
+ boxColorTwo=blue!10,
+ borderColor=blue!50
+}
+
+% Academic green
+\begin{poster}{
+ headerColorOne=green!70!black,
+ headerColorTwo=green!60!black,
+ boxColorTwo=green!10,
+ borderColor=green!50
+}
+
+% Corporate gray
+\begin{poster}{
+ headerColorOne=gray!60,
+ headerColorTwo=gray!50,
+ boxColorTwo=gray!10,
+ borderColor=gray!40
+}
+```
+
+## Package Selection Guide
+
+### Choose beamerposter if:
+- ✅ You're already familiar with Beamer
+- ✅ You need to match institutional Beamer themes
+- ✅ You prefer traditional academic aesthetics
+- ✅ You want extensive theme options
+- ✅ You need fast compilation times
+- ✅ You're creating posters for conservative academic conferences
+
+### Choose tikzposter if:
+- ✅ You want modern, colorful designs
+- ✅ You plan to create custom graphics with TikZ
+- ✅ You value aesthetic flexibility
+- ✅ You want built-in professional themes
+- ✅ You don't mind slightly longer compilation
+- ✅ You're presenting at design-conscious or public-facing events
+
+### Choose baposter if:
+- ✅ You need structured multi-column layouts
+- ✅ You want automatic box positioning
+- ✅ You prefer clean, professional defaults
+- ✅ You need precise control over box relationships
+- ✅ You're creating posters with many sections
+- ✅ You value consistent spacing and alignment
+
+## Conversion Between Packages
+
+### From beamerposter to tikzposter
+
+```latex
+% beamerposter
+\begin{block}{Title}
+ Content
+\end{block}
+
+% tikzposter equivalent
+\block{Title}{
+ Content
+}
+```
+
+### From beamerposter to baposter
+
+```latex
+% beamerposter
+\begin{block}{Introduction}
+ Content
+\end{block}
+
+% baposter equivalent
+\headerbox{Introduction}{name=intro, column=0, row=0}{
+ Content
+}
+```
+
+### From tikzposter to baposter
+
+```latex
+% tikzposter
+\block{Methods}{
+ Content
+}
+
+% baposter equivalent
+\headerbox{Methods}{name=methods, column=0, row=0}{
+ Content
+}
+```
+
+## Compilation Tips
+
+### Faster Compilation
+
+```bash
+# Use draft mode for initial edits
+\documentclass[draft]{tikzposter}
+
+# Compile with faster engines when possible
+pdflatex -interaction=nonstopmode poster.tex
+
+# For tikzposter, use externalization to cache TikZ graphics
+\usetikzlibrary{external}
+\tikzexternalize
+```
+
+### Memory Issues
+
+```latex
+% Increase TeX memory for large posters
+% Add to poster preamble:
+\pdfminorversion=7
+\pdfobjcompresslevel=2
+```
+
+### Font Embedding
+
+```bash
+# Ensure fonts are embedded (required for printing)
+pdflatex -dEmbedAllFonts=true poster.tex
+
+# Check font embedding
+pdffonts poster.pdf
+```
+
+## Hybrid Approaches
+
+You can combine strengths of different packages:
+
+### beamerposter with TikZ Graphics
+
+```latex
+\documentclass[final]{beamer}
+\usepackage[size=a0]{beamerposter}
+\usepackage{tikz}
+
+\begin{block}{Flowchart}
+ \begin{tikzpicture}
+ % Custom TikZ graphics within beamerposter
+ \end{tikzpicture}
+\end{block}
+```
+
+### tikzposter with Beamer Themes
+
+```latex
+\documentclass{tikzposter}
+
+% Import specific Beamer color definitions
+\definecolor{beamerblue}{RGB}{0,51,102}
+\colorlet{blocktitlebgcolor}{beamerblue}
+```
+
+## Recommended Packages for All Systems
+
+```latex
+% Essential packages for any poster
+\usepackage{graphicx} % Images
+\usepackage{amsmath,amssymb} % Math symbols
+\usepackage{booktabs} % Professional tables
+\usepackage{multicol} % Multiple columns in text
+\usepackage{qrcode} % QR codes
+\usepackage{hyperref} % Hyperlinks
+\usepackage{caption} % Caption customization
+\usepackage{subcaption} % Subfigures
+```
+
+## Performance Comparison
+
+| Package | Compile Time (A0) | PDF Size | Memory Usage |
+|---------|-------------------|----------|--------------|
+| beamerposter | ~5-10 seconds | 2-5 MB | Low |
+| tikzposter | ~15-30 seconds | 5-15 MB | Medium-High |
+| baposter | ~8-15 seconds | 3-8 MB | Medium |
+
+*Note: Times for poster with 5 figures, typical conference content*
+
+## Conclusion
+
+All three packages are excellent choices for different scenarios:
+
+- **beamerposter**: Best for traditional academic settings and Beamer users
+- **tikzposter**: Best for modern, visually striking presentations
+- **baposter**: Best for structured, professional multi-section posters
+
+Choose based on your specific needs, aesthetic preferences, and time constraints. When in doubt, start with tikzposter for modern conferences or beamerposter for traditional academic venues.
+
diff --git a/scientific-skills/latex-posters/references/poster_content_guide.md b/scientific-skills/latex-posters/references/poster_content_guide.md
new file mode 100644
index 0000000..dd97de4
--- /dev/null
+++ b/scientific-skills/latex-posters/references/poster_content_guide.md
@@ -0,0 +1,748 @@
+# Research Poster Content Guide
+
+## Overview
+
+Content is king in research posters. This guide covers writing strategies, section-specific guidance, visual-text balance, and best practices for communicating research effectively in poster format.
+
+## Core Content Principles
+
+### 1. The 3-5 Minute Rule
+
+**Reality**: Most viewers spend 3-5 minutes at your poster
+- **1 minute**: Scanning from distance (title, figures)
+- **2-4 minutes**: Reading key points up close
+- **5+ minutes**: Engaged conversation (if interested)
+
+**Design Implication**: Poster must work at three levels:
+1. **Distance view** (6-10 feet): Title and main figure visible
+2. **Browse view** (3-6 feet): Section headers and key results readable
+3. **Detail view** (1-3 feet): Full content accessible
+
+### 2. Tell a Story, Not a Paper
+
+**Poster ≠ Condensed Paper**
+
+**Paper approach** (❌):
+- Comprehensive literature review
+- Detailed methodology
+- All results presented
+- Lengthy discussion
+- 50+ references
+
+**Poster approach** (✅):
+- One sentence background
+- Visual methods diagram
+- 3-5 key results
+- 3-4 bullet point conclusions
+- 5-10 key references
+
+**Story Arc for Posters**:
+```
+Hook (Problem) → Approach → Discovery → Impact
+```
+
+**Example**:
+- **Hook**: "Antibiotic resistance threatens millions of lives annually"
+- **Approach**: "We developed an AI system to predict resistance patterns"
+- **Discovery**: "Our model achieves 87% accuracy, 20% better than existing methods"
+- **Impact**: "Could reduce treatment failures by identifying resistance earlier"
+
+### 3. The 800-Word Maximum
+
+**Word Count Guidelines**:
+- **Ideal**: 300-500 words
+- **Maximum**: 800 words
+- **Hard limit**: 1000 words (beyond this, poster is unreadable)
+
+**Word Budget by Section**:
+| Section | Word Count | % of Total |
+|---------|-----------|------------|
+| Introduction/Background | 50-100 | 15% |
+| Methods | 100-150 | 25% |
+| Results (text) | 100-200 | 25% |
+| Discussion/Conclusions | 100-150 | 25% |
+| References/Acknowledgments | 50-100 | 10% |
+
+**Counting Tool**:
+```latex
+% Add word count to poster (remove for final)
+\usepackage{texcount}
+% Compile with: texcount -inc poster.tex
+```
+
+### 4. Visual-to-Text Ratio
+
+**Optimal Balance**: 40-50% visual content, 50-60% text+white space
+
+**Visual Content Includes**:
+- Figures and graphs
+- Photos and images
+- Diagrams and flowcharts
+- Icons and symbols
+- Color blocks and design elements
+
+**Too Text-Heavy** (❌):
+- Wall of text
+- Small figures
+- Intimidating to viewers
+- Low engagement
+
+**Well-Balanced** (✅):
+- Clear figures dominate
+- Text supports visuals
+- Easy to scan
+- Inviting appearance
+
+## Section-Specific Content Guidance
+
+### Title
+
+**Purpose**: Capture attention, convey topic, establish credibility
+
+**Characteristics of Effective Titles**:
+- **Concise**: 10-15 words maximum
+- **Descriptive**: Clearly states research topic
+- **Active**: Uses strong verbs when possible
+- **Specific**: Avoids vague terms
+- **Jargon-aware**: Balances field-specific terms with accessibility
+
+**Title Formulas**:
+
+**1. Descriptive**:
+```
+[Method/Approach] for [Problem/Application]
+
+Example: "Deep Learning for Early Detection of Alzheimer's Disease"
+```
+
+**2. Question**:
+```
+[Research Question]?
+
+Example: "Can Microbiome Diversity Predict Treatment Response?"
+```
+
+**3. Assertion**:
+```
+[Finding] in [Context]
+
+Example: "Novel Mechanism Identified in Drug Resistance Pathways"
+```
+
+**4. Colon Format**:
+```
+[Topic]: [Specific Approach/Finding]
+
+Example: "Urban Heat Islands: A Machine Learning Framework for Mitigation"
+```
+
+**Avoid**:
+- ❌ Generic titles: "A Study of X"
+- ❌ Overly cute or clever wordplay (confuses message)
+- ❌ Excessive jargon: "Utilization of CRISPR-Cas9..."
+- ❌ Unnecessarily long: "Investigation of the potential role of..."
+
+**LaTeX Title Formatting**:
+```latex
+% Emphasize key words with bold
+\title{Deep Learning for \textbf{Early Detection} of Alzheimer's Disease}
+
+% Two-line titles for long names
+\title{Machine Learning Framework for\\Urban Heat Island Mitigation}
+
+% Avoid ALL CAPS (harder to read)
+```
+
+### Authors and Affiliations
+
+**Best Practices**:
+- **Presenting author**: Bold, underline, or asterisk
+- **Corresponding author**: Include email
+- **Affiliations**: Superscript numbers or symbols
+- **Institutional logos**: 2-4 maximum
+
+**Format Examples**:
+```latex
+% Simple format
+\author{\textbf{Jane Smith}\textsuperscript{1}, John Doe\textsuperscript{2}}
+\institute{
+ \textsuperscript{1}University of Example,
+ \textsuperscript{2}Research Institute
+}
+
+% With contact
+\author{Jane Smith\textsuperscript{1,*}}
+\institute{
+ \textsuperscript{1}Department, University\\
+ \textsuperscript{*}jane.smith@university.edu
+}
+```
+
+### Introduction/Background
+
+**Purpose**: Establish context, motivate research, state objective
+
+**Structure** (50-100 words):
+1. **Problem statement** (1-2 sentences): What's the issue?
+2. **Knowledge gap** (1-2 sentences): What's unknown/unsolved?
+3. **Research objective** (1 sentence): What did you do?
+
+**Example** (95 words):
+```
+Antibiotic resistance causes 700,000 deaths annually, projected to reach
+10 million by 2050. Current diagnostic methods require 48-72 hours,
+delaying appropriate treatment. Machine learning offers potential for
+rapid resistance prediction, but existing models lack generalizability
+across bacterial species.
+
+We developed a transformer-based deep learning model to predict antibiotic
+resistance from genomic sequences across multiple pathogen species. Our
+approach integrates evolutionary information and protein structure to
+improve cross-species accuracy.
+```
+
+**Visual Support**:
+- Conceptual diagram showing problem
+- Infographic with statistics
+- Image of application context
+
+**Common Mistakes**:
+- ❌ Extensive literature review
+- ❌ Too much background detail
+- ❌ Undefined acronyms at first use
+- ❌ Missing clear objective statement
+
+### Methods
+
+**Purpose**: Describe approach sufficiently for understanding (not replication)
+
+**Key Question**: "How did you do it?" not "How could someone else replicate it?"
+
+**Content Strategy**:
+- **Prioritize**: Visual methods diagram > text description
+- **Include**: Study design, key procedures, analysis approach
+- **Omit**: Detailed protocols, routine procedures, specific reagent details
+
+**Visual Methods (Highly Recommended)**:
+```latex
+% Flowchart of study design
+\begin{tikzpicture}[node distance=2cm]
+ \node (start) [box] {Data Collection\\n=1,000 samples};
+ \node (process) [box, below of=start] {Preprocessing\\Quality Control};
+ \node (analysis) [box, below of=process] {Statistical Analysis\\Mixed Models};
+ \node (end) [box, below of=analysis] {Validation\\Independent Cohort};
+
+ \draw [arrow] (start) -- (process);
+ \draw [arrow] (process) -- (analysis);
+ \draw [arrow] (analysis) -- (end);
+\end{tikzpicture}
+```
+
+**Text Methods** (50-150 words):
+
+**For Experimental Studies**:
+```
+Methods
+• Study design: Randomized controlled trial (n=200)
+• Participants: Adults aged 18-65 with Type 2 diabetes
+• Intervention: 12-week exercise program vs. standard care
+• Outcomes: HbA1c (primary), insulin sensitivity (secondary)
+• Analysis: Linear mixed models, intention-to-treat
+```
+
+**For Computational Studies**:
+```
+Methods
+• Dataset: 10,000 labeled images from ImageNet
+• Architecture: ResNet-50 with custom attention mechanism
+• Training: 100 epochs, Adam optimizer, learning rate 0.001
+• Validation: 5-fold cross-validation
+• Comparison: Baseline CNN, VGG-16, Inception-v3
+```
+
+**Format Options**:
+- **Bullet points**: Quick scanning (recommended)
+- **Numbered list**: Sequential procedures
+- **Diagram + brief text**: Ideal combination
+- **Table**: Multiple conditions or parameters
+
+### Results
+
+**Purpose**: Present key findings visually and clearly
+
+**Golden Rule**: Show, don't tell
+
+**Content Allocation**:
+- **Figures**: 70-80% of Results section
+- **Text**: 20-30% (brief descriptions, statistics)
+
+**How Many Results**:
+- **Ideal**: 3-5 main findings
+- **Maximum**: 6-7 distinct results
+- **Focus**: Primary outcomes, most impactful findings
+
+**Figure Selection Criteria**:
+1. Does it support the main message?
+2. Is it self-explanatory with caption?
+3. Can it be understood in 10 seconds?
+4. Does it add information beyond text?
+
+**Figure Captions**:
+- **Descriptive**: Explain what is shown
+- **Standalone**: Understandable without reading full poster
+- **Statistical**: Include significance indicators, sample sizes
+- **Concise**: 1-3 sentences
+
+**Example Caption**:
+```latex
+\caption{Treatment significantly improved outcomes.
+Mean±SD shown for control (blue, n=45) and treatment (orange, n=47) groups.
+**p<0.01, ***p<0.001 (two-tailed t-test).}
+```
+
+**Text Support for Results** (100-200 words):
+- State main finding per figure
+- Include key statistics
+- Note trends or patterns
+- Avoid detailed interpretation (save for Discussion)
+
+**Example Results Text**:
+```
+Key Findings
+• Model achieved 87% accuracy on test set (vs. 73% baseline)
+• Performance consistent across 5 bacterial species (p<0.001)
+• Prediction speed: <30 seconds per isolate
+• Feature importance: protein structure (42%), sequence (35%),
+ evolutionary conservation (23%)
+```
+
+**Data Presentation Formats**:
+
+**1. Bar Charts**: Comparing categories
+```latex
+\begin{tikzpicture}
+ \begin{axis}[
+ ybar,
+ ylabel=Accuracy (\%),
+ symbolic x coords={Baseline, Model A, Our Method},
+ xtick=data,
+ nodes near coords
+ ]
+ \addplot coordinates {(Baseline,73) (Model A,81) (Our Method,87)};
+ \end{axis}
+\end{tikzpicture}
+```
+
+**2. Line Graphs**: Trends over time
+**3. Scatter Plots**: Correlations
+**4. Heatmaps**: Matrix data, clustering
+**5. Box Plots**: Distributions, comparisons
+**6. ROC Curves**: Classification performance
+
+### Discussion/Conclusions
+
+**Purpose**: Interpret findings, state implications, acknowledge limitations
+
+**Structure** (100-150 words):
+
+**1. Main Conclusions** (50-75 words):
+- 3-5 bullet points
+- Clear, specific takeaways
+- Linked to research objectives
+
+**Example**:
+```
+Conclusions
+• First cross-species model for antibiotic resistance prediction
+ achieving >85% accuracy
+• Protein structure integration critical for generalizability
+ (improved accuracy by 14%)
+• Prediction speed enables clinical decision support within
+ consultation timeframe
+• Potential to reduce inappropriate antibiotic use by 20-30%
+```
+
+**2. Limitations** (25-50 words, optional but recommended):
+- Acknowledge key constraints
+- Brief, honest
+- Shows scientific rigor
+
+**Example**:
+```
+Limitations
+• Training data limited to 5 bacterial species
+• Requires genomic sequencing (not widely available)
+• Validation needed in prospective clinical trials
+```
+
+**3. Future Directions** (25-50 words, optional):
+- Next steps
+- Broader implications
+- Call to action
+
+**Example**:
+```
+Next Steps
+• Expand to 20+ additional species
+• Develop point-of-care sequencing integration
+• Launch multi-center clinical validation study (2025)
+```
+
+**Avoid**:
+- ❌ Overstating findings: "This revolutionary breakthrough..."
+- ❌ Extensive comparison to other work
+- ❌ New results in Discussion
+- ❌ Vague conclusions: "Further research is needed"
+
+### References
+
+**How Many**: 5-10 key citations
+
+**Selection Criteria**:
+- Include seminal work in the field
+- Recent relevant studies (last 5 years)
+- Methods cited in your poster
+- Controversial claims that need support
+
+**Format**: Abbreviated, consistent style
+
+**Examples**:
+
+**Numbered (Vancouver)**:
+```
+References
+1. Smith et al. (2023). Nature. 615:234-240.
+2. Jones & Lee (2024). Science. 383:112-118.
+3. Chen et al. (2022). Cell. 185:456-470.
+```
+
+**Author-Year (APA)**:
+```
+References
+Smith, J. et al. (2023). Title. Nature, 615, 234-240.
+Jones, A., & Lee, B. (2024). Title. Science, 383, 112-118.
+```
+
+**Minimal (For Space Constraints)**:
+```
+Key References: Smith (Nature 2023), Jones (Science 2024),
+Chen (Cell 2022). Full bibliography: [QR Code]
+```
+
+**Alternative**: QR code linking to full reference list
+
+### Acknowledgments
+
+**Include**:
+- Funding sources (with grant numbers)
+- Major collaborators
+- Core facilities used
+- Dataset sources
+
+**Format** (25-50 words):
+```
+Acknowledgments
+Funded by NIH Grant R01-123456 and NSF Award 7890123.
+We thank Dr. X for data access, the Y Core Facility for
+sequencing, and Z for helpful discussions.
+```
+
+### Contact Information
+
+**Essential Elements**:
+- Name of presenting/corresponding author
+- Email address
+- Optional: Lab website, Twitter/X, LinkedIn, ORCID
+
+**Format**:
+```
+Contact: Jane Smith, jane.smith@university.edu
+Lab: smithlab.university.edu | Twitter: @smithlab
+```
+
+**QR Code Alternative**:
+- Link to personal/lab website
+- Link to paper preprint/publication
+- Link to code repository (GitHub)
+- Link to supplementary materials
+
+## Writing Style for Posters
+
+### Active vs. Passive Voice
+
+**Prefer Active Voice** (more engaging, clearer):
+- ✅ "We developed a model..."
+- ✅ "The treatment reduced symptoms..."
+
+**Passive Voice** (when appropriate):
+- ✅ "Samples were collected from..."
+- ✅ "Data were analyzed using..."
+
+### Sentence Length
+
+**Keep Sentences Short**:
+- **Ideal**: 10-15 words per sentence
+- **Maximum**: 20-25 words
+- **Avoid**: >30 words (hard to follow)
+
+**Example Revision**:
+- ❌ Long: "We performed a comprehensive analysis of gene expression data from 500 patients with colorectal cancer using RNA sequencing and identified 47 differentially expressed genes associated with treatment response." (31 words)
+- ✅ Short: "We analyzed RNA sequencing data from 500 colorectal cancer patients. We identified 47 genes associated with treatment response." (19 words total, two sentences)
+
+### Bullet Points vs. Paragraphs
+
+**Use Bullet Points For**:
+- ✅ Lists of items or findings
+- ✅ Key conclusions
+- ✅ Methods steps
+- ✅ Study characteristics
+
+**Use Short Paragraphs For**:
+- ✅ Narrative flow (Introduction)
+- ✅ Complex explanations
+- ✅ Connected ideas
+
+**Bullet Point Best Practices**:
+- Start with action verbs or nouns
+- Parallel structure throughout list
+- 3-7 bullets per list (not too many)
+- Brief (1-2 lines each)
+
+**Example**:
+```
+Methods
+• Participants: 200 adults (18-65 years)
+• Design: Double-blind RCT (12 weeks)
+• Intervention: Daily 30-min exercise
+• Control: Standard care
+• Analysis: Mixed models (SPSS v.28)
+```
+
+### Acronyms and Jargon
+
+**First Use Rule**: Define at first appearance
+```
+We used machine learning (ML) to analyze... Later, ML predicted...
+```
+
+**Common Acronyms**: May not need definition if universal to field
+- DNA, RNA, MRI, CT, PCR (in biomedical context)
+- AI, ML, CNN (in computer science context)
+
+**Avoid Excessive Jargon**:
+- ❌ "Utilized" → ✅ "Used"
+- ❌ "Implement utilization of" → ✅ "Use"
+- ❌ "A majority of" → ✅ "Most"
+
+### Numbers and Statistics
+
+**Present Statistics Clearly**:
+- Always include measure of variability (SD, SE, CI)
+- Report sample sizes: n=50
+- Indicate significance: p<0.05, p<0.01, p<0.001
+- Use symbols consistently: * for p<0.05, ** for p<0.01
+
+**Format Numbers**:
+- Round appropriately (avoid false precision)
+- Use consistent decimal places
+- Include units: 25 mg/dL, 37°C
+- Large numbers: 1,000 or 1000 (be consistent)
+
+**Example**:
+```
+Treatment increased response by 23.5% (95% CI: 18.2-28.8%, p<0.001, n=150)
+```
+
+## Visual-Text Integration
+
+### Figure-Text Relationship
+
+**Figure First, Text Second**:
+1. Design poster around key figures
+2. Add text to support and explain visuals
+3. Ensure figures can stand alone
+
+**Text Placement Relative to Figures**:
+- **Above**: Context, "What you're about to see"
+- **Below**: Explanation, statistics, caption
+- **Beside**: Comparison, interpretation
+
+### Callouts and Annotations
+
+**On-Figure Annotations**:
+```latex
+\begin{tikzpicture}
+ \node[inner sep=0] (img) {\includegraphics[width=10cm]{figure.pdf}};
+ \draw[->, thick, red] (8,5) -- (6,3) node[left] {Key region};
+ \draw[red, thick] (3,2) circle (1cm) node[above=1.2cm] {Anomaly};
+\end{tikzpicture}
+```
+
+**Callout Boxes**:
+```latex
+\begin{tcolorbox}[colback=yellow!10, colframe=orange!80,
+ title=Key Finding]
+Our method reduces errors by 34\% compared to state-of-the-art.
+\end{tcolorbox}
+```
+
+### Icons for Section Headers
+
+**Visual Section Markers**:
+```latex
+\usepackage{fontawesome5}
+
+\block{\faFlask~Introduction}{...}
+\block{\faCog~Methods}{...}
+\block{\faChartBar~Results}{...}
+\block{\faLightbulb~Conclusions}{...}
+```
+
+## Content Adaptation Strategies
+
+### From Paper to Poster
+
+**Condensation Process**:
+
+**1. Identify Core Message** (The Elevator Pitch):
+- What's the one thing you want people to remember?
+- If you had 30 seconds, what would you say?
+
+**2. Select Key Results**:
+- Choose 3-5 most impactful findings
+- Omit supporting/secondary results
+- Focus on figures with strong visual impact
+
+**3. Simplify Methods**:
+- Visual flowchart > text description
+- Omit routine procedures
+- Include only essential parameters
+
+**4. Trim Literature Review**:
+- One sentence background
+- One sentence gap/motivation
+- One sentence your contribution
+
+**5. Condense Discussion**:
+- Main conclusions only
+- Brief limitations
+- One sentence future direction
+
+### For Different Audiences
+
+**Specialist Audience** (Same Field):
+- Can use field-specific jargon
+- Less background needed
+- Focus on novel methodology
+- Emphasize nuanced findings
+
+**General Scientific Audience**:
+- Define key terms
+- More context/background
+- Broader implications
+- Visual metaphors helpful
+
+**Public/Lay Audience**:
+- Minimal jargon, all defined
+- Extensive context
+- Real-world applications
+- Analogies and simple language
+
+**Example Adaptation**:
+
+**Specialist**: "CRISPR-Cas9 knockout of BRCA1 induced synthetic lethality with PARP inhibitors"
+
+**General**: "We used gene editing to make cancer cells vulnerable to existing drugs"
+
+**Public**: "We found a way to make cancer treatments work better by targeting specific genetic weaknesses"
+
+## Quality Control Checklist
+
+### Content Review
+
+**Clarity**:
+- [ ] Main message immediately clear
+- [ ] All acronyms defined
+- [ ] Sentences short and direct
+- [ ] No unnecessary jargon
+
+**Completeness**:
+- [ ] Research question/objective stated
+- [ ] Methods sufficiently described
+- [ ] Key results presented
+- [ ] Conclusions drawn
+- [ ] Limitations acknowledged
+
+**Accuracy**:
+- [ ] All statistics correct
+- [ ] Figure captions accurate
+- [ ] References properly cited
+- [ ] No overstated claims
+
+**Engagement**:
+- [ ] Compelling title
+- [ ] Visual interest
+- [ ] Clear take-home message
+- [ ] Conversation starters
+
+### Readability Testing
+
+**Distance Test**:
+- Print at 25% scale
+- View from 2-3 feet (simulates 8-12 feet for full poster)
+- Can you read: Title? Section headers? Body text?
+
+**Scan Test**:
+- Give poster to colleague for 30 seconds
+- Ask: "What is this poster about?"
+- They should identify: Topic, approach, main finding
+
+**Detail Test**:
+- Ask colleague to read poster thoroughly (5 min)
+- Ask: "What are the key conclusions?"
+- Verify understanding matches your intent
+
+## Common Content Mistakes
+
+**1. Too Much Text**
+- ❌ >1000 words
+- ❌ Long paragraphs
+- ❌ Full paper condensed
+- ✅ 300-800 words, bullet points, key findings only
+
+**2. Unclear Message**
+- ❌ Multiple unrelated findings
+- ❌ No clear conclusion
+- ❌ Vague implications
+- ✅ 1-3 main points, explicit conclusions
+
+**3. Methods Overkill**
+- ❌ Detailed protocols
+- ❌ All parameters listed
+- ❌ Routine procedures described
+- ✅ Visual flowchart, key details only
+
+**4. Poor Figure Integration**
+- ❌ Figures without context
+- ❌ Unclear captions
+- ❌ Text doesn't reference figures
+- ✅ Figures central, well-captioned, text integrated
+
+**5. Missing Context**
+- ❌ No background
+- ❌ Undefined acronyms
+- ❌ Assumes expert knowledge
+- ✅ Brief context, definitions, accessible to broader audience
+
+## Conclusion
+
+Effective poster content:
+- **Concise**: 300-800 words maximum
+- **Visual**: 40-50% figures and graphics
+- **Clear**: One main message, 3-5 key findings
+- **Engaging**: Compelling story, not just facts
+- **Accessible**: Appropriate for target audience
+- **Actionable**: Clear implications and next steps
+
+Remember: Your poster is a conversation starter, not a comprehensive treatise. Design content to intrigue, engage, and invite discussion.
+
diff --git a/scientific-skills/latex-posters/references/poster_design_principles.md b/scientific-skills/latex-posters/references/poster_design_principles.md
new file mode 100644
index 0000000..2454bff
--- /dev/null
+++ b/scientific-skills/latex-posters/references/poster_design_principles.md
@@ -0,0 +1,806 @@
+# Research Poster Design Principles
+
+## Overview
+
+Effective poster design balances visual appeal, readability, and scientific content. This guide covers typography, color theory, visual hierarchy, accessibility, and evidence-based design principles for research posters.
+
+## Core Design Principles
+
+### 1. Visual Hierarchy
+
+Guide viewers through content in logical order using size, color, position, and contrast.
+
+**Hierarchy Levels**:
+
+1. **Primary (Title)**: Largest, most prominent
+ - Size: 72-120pt
+ - Position: Top center or top spanning
+ - Weight: Bold
+ - Purpose: Capture attention from 20+ feet
+
+2. **Secondary (Section Headers)**: Organize content
+ - Size: 48-72pt
+ - Weight: Bold or semi-bold
+ - Purpose: Section navigation, readable from 10 feet
+
+3. **Tertiary (Body Text)**: Main content
+ - Size: 24-36pt minimum
+ - Weight: Regular
+ - Purpose: Detailed information, readable from 4-6 feet
+
+4. **Quaternary (Captions, References)**: Supporting info
+ - Size: 18-24pt
+ - Weight: Regular or light
+ - Purpose: Context and attribution
+
+**Implementation**:
+```latex
+% Define hierarchy in LaTeX
+\setbeamerfont{title}{size=\VeryHuge,series=\bfseries} % 90pt+
+\setbeamerfont{block title}{size=\Huge,series=\bfseries} % 60pt
+\setbeamerfont{block body}{size=\LARGE} % 30pt
+\setbeamerfont{caption}{size=\large} % 24pt
+```
+
+### 2. White Space (Negative Space)
+
+Empty space is not wasted space—it enhances readability and guides attention.
+
+**White Space Functions**:
+- **Breathing room**: Prevents overwhelming viewers
+- **Grouping**: Shows which elements belong together
+- **Focus**: Draws attention to important elements
+- **Flow**: Creates visual pathways through content
+
+**Guidelines**:
+- Minimum 5-10% margins on all sides
+- Consistent spacing between blocks (1-2cm)
+- Space around figures equal to or greater than border width
+- Group related items closely, separate unrelated items
+- Don't fill every inch—aim for 40-60% text coverage
+
+**LaTeX Implementation**:
+```latex
+% beamerposter spacing
+\setbeamertemplate{block begin}{
+ \vskip2ex % Space before block
+ ...
+}
+
+% tikzposter spacing
+\documentclass[..., blockverticalspace=15mm, colspace=15mm]{tikzposter}
+
+% Manual spacing
+\vspace{2cm} % Vertical space
+\hspace{1cm} % Horizontal space
+```
+
+### 3. Alignment and Grid Systems
+
+Proper alignment creates professional, organized appearance.
+
+**Alignment Types**:
+- **Left-aligned text**: Most readable for body text (Western audiences)
+- **Center-aligned**: Headers, titles, symmetric layouts
+- **Right-aligned**: Rarely used, special cases only
+- **Justified**: Avoid (creates uneven spacing)
+
+**Grid Systems**:
+- **2-column**: Simple, traditional, good for narrative flow
+- **3-column**: Most common, balanced, versatile
+- **4-column**: Complex, information-dense, requires careful design
+- **Asymmetric**: Creative, modern, requires expertise
+
+**Best Practices**:
+- Align block edges to invisible grid lines
+- Keep consistent column widths (unless intentionally asymmetric)
+- Align similar elements (all figures, all text blocks)
+- Use consistent margins throughout
+
+### 4. Visual Flow and Reading Patterns
+
+Design for natural eye movement and logical content progression.
+
+**Common Reading Patterns**:
+
+**Z-Pattern (Landscape posters)**:
+```
+Start → → → Top Right
+ ↓
+Middle Left → → Middle
+ ↓
+Bottom Left → → → End
+```
+
+**F-Pattern (Portrait posters)**:
+```
+Title → → → →
+↓
+Section 1 → →
+↓
+Section 2 → →
+↓
+Section 3 → →
+↓
+Conclusion → →
+```
+
+**Gutenberg Diagram**:
+```
+Primary Area Strong Fallow
+(top-left) (top-right)
+ ↓ ↓
+Weak Fallow Terminal Area
+(bottom-left) (bottom-right)
+```
+
+**Implementation Strategy**:
+1. Place most important content in "hot zones" (top-left, center)
+2. Create visual paths with arrows, lines, or color
+3. Use numbering for sequential information (Methods steps)
+4. Design left-to-right, top-to-bottom flow (Western audiences)
+5. Position conclusions prominently (bottom-right is natural endpoint)
+
+## Typography
+
+### Font Selection
+
+**Recommended Fonts**:
+
+**Sans-Serif (Recommended for posters)**:
+- **Helvetica**: Clean, professional, widely available
+- **Arial**: Similar to Helvetica, universal compatibility
+- **Calibri**: Modern, friendly, good readability
+- **Open Sans**: Contemporary, excellent web and print
+- **Roboto**: Modern, Google design, highly readable
+- **Lato**: Warm, professional, works at all sizes
+
+**Serif (Use sparingly)**:
+- **Times New Roman**: Traditional, formal
+- **Garamond**: Elegant, good for humanities
+- **Georgia**: Designed for screens, readable
+
+**Avoid**:
+- ❌ Comic Sans (unprofessional)
+- ❌ Decorative or script fonts (illegible from distance)
+- ❌ Mixing more than 2-3 font families
+
+**LaTeX Implementation**:
+```latex
+% Helvetica (sans-serif)
+\usepackage{helvet}
+\renewcommand{\familydefault}{\sfdefault}
+
+% Arial-like
+\usepackage{avant}
+\renewcommand{\familydefault}{\sfdefault}
+
+% Modern fonts with fontspec (requires LuaLaTeX/XeLaTeX)
+\usepackage{fontspec}
+\setmainfont{Helvetica Neue}
+\setsansfont{Open Sans}
+```
+
+### Font Sizing
+
+**Absolute Minimum Sizes** (readable from 4-6 feet):
+- Title: 72pt+ (85-120pt recommended)
+- Section headers: 48-72pt
+- Body text: 24-36pt (30pt+ recommended)
+- Captions/small text: 18-24pt
+- References: 16-20pt minimum
+
+**Testing Readability**:
+- Print at 25% scale
+- Read from 2-3 feet distance
+- If legible, full-scale poster will be readable from 8-12 feet
+
+**Size Conversion**:
+| LaTeX Command | Approximate Size | Use Case |
+|---------------|------------------|----------|
+| `\tiny` | 10pt | Avoid on posters |
+| `\small` | 16pt | Minimal use only |
+| `\normalsize` | 20pt | References (scaled up) |
+| `\large` | 24pt | Captions, small text |
+| `\Large` | 28pt | Body text (minimum) |
+| `\LARGE` | 32pt | Body text (recommended) |
+| `\huge` | 36pt | Subheadings |
+| `\Huge` | 48pt | Section headers |
+| `\VeryHuge` | 72pt+ | Title |
+
+### Text Formatting Best Practices
+
+**Use**:
+- ✅ **Bold** for emphasis and headers
+- ✅ Short paragraphs (3-5 lines maximum)
+- ✅ Bullet points for lists
+- ✅ Adequate line spacing (1.2-1.5)
+- ✅ High contrast (dark text on light background)
+
+**Avoid**:
+- ❌ Italics from distance (hard to read)
+- ❌ ALL CAPS FOR LONG TEXT (SLOW TO READ)
+- ❌ Underlines (old-fashioned, interferes with descenders)
+- ❌ Long paragraphs (> 6 lines)
+- ❌ Light text on light backgrounds
+
+**Line Spacing**:
+```latex
+% Increase line spacing for readability
+\usepackage{setspace}
+\setstretch{1.3} % 1.3x normal spacing
+
+% Or in specific blocks
+\begin{spacing}{1.5}
+ Your text here with extra spacing
+\end{spacing}
+```
+
+## Color Theory for Posters
+
+### Color Psychology and Meaning
+
+Colors convey meaning and affect viewer perception:
+
+| Color | Associations | Use Cases |
+|-------|--------------|-----------|
+| **Blue** | Trust, professionalism, science | Academic, medical, technology |
+| **Green** | Nature, health, growth | Environmental, biology, health |
+| **Red** | Energy, urgency, passion | Attention, warnings, bold statements |
+| **Orange** | Creativity, enthusiasm | Innovative research, friendly approach |
+| **Purple** | Wisdom, creativity, luxury | Humanities, arts, premium research |
+| **Gray** | Neutral, professional, modern | Technology, minimal designs |
+| **Yellow** | Optimism, attention, caution | Highlights, energy, caution areas |
+
+### Color Scheme Types
+
+**1. Monochromatic**: Variations of single hue
+- **Pros**: Harmonious, professional, easy to execute
+- **Cons**: Can be boring, less visual interest
+- **Use**: Conservative conferences, institutional branding
+
+```latex
+% Monochromatic blue scheme
+\definecolor{darkblue}{RGB}{0,51,102}
+\definecolor{medblue}{RGB}{51,102,153}
+\definecolor{lightblue}{RGB}{204,229,255}
+```
+
+**2. Analogous**: Adjacent colors on color wheel
+- **Pros**: Harmonious, visually comfortable
+- **Cons**: Low contrast, may lack excitement
+- **Use**: Nature/biology topics, smooth gradients
+
+```latex
+% Analogous blue-green scheme
+\definecolor{blue}{RGB}{0,102,204}
+\definecolor{teal}{RGB}{0,153,153}
+\definecolor{green}{RGB}{51,153,102}
+```
+
+**3. Complementary**: Opposite colors on wheel
+- **Pros**: High contrast, vibrant, energetic
+- **Cons**: Can be overwhelming if intense
+- **Use**: Drawing attention, modern designs
+
+```latex
+% Complementary blue-orange scheme
+\definecolor{primary}{RGB}{0,71,171} % Blue
+\definecolor{accent}{RGB}{255,127,0} % Orange
+```
+
+**4. Triadic**: Three evenly spaced colors
+- **Pros**: Balanced, vibrant, visually rich
+- **Cons**: Can appear busy if not balanced
+- **Use**: Multi-topic posters, creative fields
+
+```latex
+% Triadic scheme
+\definecolor{blue}{RGB}{0,102,204}
+\definecolor{red}{RGB}{204,0,51}
+\definecolor{yellow}{RGB}{255,204,0}
+```
+
+**5. Split-Complementary**: Base + two adjacent to complement
+- **Pros**: High contrast but less tense than complementary
+- **Cons**: Complex to balance
+- **Use**: Sophisticated designs, experienced designers
+
+### High-Contrast Combinations
+
+Ensure readability with sufficient contrast:
+
+**Excellent Contrast (Use these)**:
+- Dark blue on white
+- Black on white
+- White on dark blue/green/purple
+- Dark gray on light yellow
+- Black on light cyan
+
+**Poor Contrast (Avoid)**:
+- ❌ Red on green (color-blind issue)
+- ❌ Yellow on white
+- ❌ Light gray on white
+- ❌ Blue on black (hard to read)
+- ❌ Any pure colors on each other
+
+**Contrast Ratio Standards**:
+- Minimum: 4.5:1 (WCAG AA)
+- Recommended: 7:1 (WCAG AAA)
+- Test at: https://webaim.org/resources/contrastchecker/
+
+**LaTeX Color Contrast**:
+```latex
+% High contrast header
+\setbeamercolor{block title}{bg=black, fg=white}
+
+% Medium contrast body
+\setbeamercolor{block body}{bg=gray!10, fg=black}
+
+% Check contrast manually or use online tools
+```
+
+### Color-Blind Friendly Palettes
+
+~8% of males and ~0.5% of females have color vision deficiency.
+
+**Safe Color Combinations**:
+- Blue + Orange (most universally distinguishable)
+- Blue + Yellow
+- Blue + Red
+- Purple + Green (use with caution)
+
+**Avoid**:
+- ❌ Red + Green (indistinguishable to most common color blindness)
+- ❌ Green + Brown
+- ❌ Blue + Purple (can be problematic)
+- ❌ Light green + Yellow
+
+**Recommended Palettes**:
+
+**IBM Color Blind Safe** (excellent accessibility):
+```latex
+\definecolor{ibmblue}{RGB}{100,143,255}
+\definecolor{ibmmagenta}{RGB}{254,97,0}
+\definecolor{ibmpurple}{RGB}{220,38,127}
+\definecolor{ibmcyan}{RGB}{33,191,115}
+```
+
+**Okabe-Ito Palette** (scientifically tested):
+```latex
+\definecolor{okorange}{RGB}{230,159,0}
+\definecolor{okskyblue}{RGB}{86,180,233}
+\definecolor{okgreen}{RGB}{0,158,115}
+\definecolor{okyellow}{RGB}{240,228,66}
+\definecolor{okblue}{RGB}{0,114,178}
+\definecolor{okvermillion}{RGB}{213,94,0}
+\definecolor{okpurple}{RGB}{204,121,167}
+```
+
+**Paul Tol's Bright Palette**:
+```latex
+\definecolor{tolblue}{RGB}{68,119,170}
+\definecolor{tolred}{RGB}{204,102,119}
+\definecolor{tolgreen}{RGB}{34,136,51}
+\definecolor{tolyellow}{RGB}{238,221,136}
+\definecolor{tolcyan}{RGB}{102,204,238}
+```
+
+### Institutional Branding
+
+Match university or department colors:
+
+```latex
+% Example: Stanford colors
+\definecolor{stanford-red}{RGB}{140,21,21}
+\definecolor{stanford-gray}{RGB}{83,86,90}
+
+% Example: MIT colors
+\definecolor{mit-red}{RGB}{163,31,52}
+\definecolor{mit-gray}{RGB}{138,139,140}
+
+% Example: Cambridge colors
+\definecolor{cambridge-blue}{RGB}{163,193,173}
+\definecolor{cambridge-lblue}{RGB}{212,239,223}
+```
+
+## Accessibility Considerations
+
+### Universal Design Principles
+
+Design posters usable by the widest range of people:
+
+**1. Visual Accessibility**:
+- High contrast text (minimum 4.5:1 ratio)
+- Large font sizes (24pt+ body text)
+- Color-blind safe palettes
+- Clear visual hierarchy
+- Avoid relying solely on color to convey information
+
+**2. Cognitive Accessibility**:
+- Clear, simple language
+- Logical organization
+- Consistent layout
+- Visual cues for navigation (arrows, numbers)
+- Avoid clutter and information overload
+
+**3. Physical Accessibility**:
+- Position critical content at wheelchair-accessible height (3-5 feet)
+- Include QR codes to digital versions
+- Provide printed handouts for detail viewing
+- Consider lighting and reflection in poster material choice
+
+### Alternative Text and Descriptions
+
+Make posters accessible to screen readers (for digital versions):
+
+```latex
+% Add alt text to figures
+\includegraphics[width=\linewidth]{figure.pdf}
+% Alternative: Include detailed caption
+\caption{Bar graph showing mean±SD of treatment outcomes.
+Control group (blue): 45±5\%; Treatment group (orange): 78±6\%.
+Asterisks indicate significance: *p<0.05, **p<0.01.}
+```
+
+### Multi-Modal Information
+
+Don't rely on single sensory channel:
+
+**Use Redundant Encoding**:
+- Color + Shape (not just color for categories)
+- Color + Pattern (hatching, stippling)
+- Color + Label (text labels on graph elements)
+- Text + Icons (visual + verbal)
+
+**Example**:
+```latex
+% Good: Color + shape + label
+\begin{tikzpicture}
+ \draw[fill=blue, circle] (0,0) circle (0.3) node[right] {Male: 45\%};
+ \draw[fill=red, rectangle] (0,-1) rectangle (0.6,-0.4) node[right] {Female: 55\%};
+\end{tikzpicture}
+```
+
+## Layout Composition
+
+### Rule of Thirds
+
+Divide poster into 3×3 grid; place key elements at intersections:
+
+```
++-----+-----+-----+
+| × | | × | ← Top third (title, logos)
++-----+-----+-----+
+| | × | | ← Middle third (main content)
++-----+-----+-----+
+| × | | × | ← Bottom third (conclusions)
++-----+-----+-----+
+ ↑ ↑
+Left Right
+```
+
+**Power Points** (intersections):
+- Top-left: Primary section start
+- Top-right: Logos, QR codes
+- Center: Key figure or main result
+- Bottom-right: Conclusions, contact
+
+### Balance and Symmetry
+
+**Symmetric Layouts**:
+- Formal, traditional, stable
+- Easy to design
+- Can appear static or boring
+- Good for conservative audiences
+
+**Asymmetric Layouts**:
+- Dynamic, modern, interesting
+- Harder to execute well
+- More visually engaging
+- Good for creative fields
+
+**Visual Weight Balance**:
+- Large elements = heavy weight
+- Dark colors = heavy weight
+- Dense text = heavy weight
+- Distribute weight evenly across poster
+
+### Proximity and Grouping
+
+**Gestalt Principles**:
+
+**Proximity**: Items close together are perceived as related
+```
+[Introduction] [Methods]
+
+[Results] [Discussion]
+```
+
+**Similarity**: Similar items are perceived as grouped
+- Use consistent colors for related sections
+- Same border styles for similar content types
+
+**Continuity**: Eyes follow lines and paths
+- Use arrows to guide through methods
+- Align elements to create invisible lines
+
+**Closure**: Mind completes incomplete shapes
+- Use partial borders to group without boxing in
+
+## Visual Elements
+
+### Icons and Graphics
+
+Strategic use of icons enhances comprehension:
+
+**Benefits**:
+- Universal language (crosses linguistic barriers)
+- Faster processing than text
+- Adds visual interest
+- Clarifies concepts
+
+**Best Practices**:
+- Use consistent style (all line, all filled, all flat)
+- Appropriate size (1-3cm typical)
+- Label ambiguous icons
+- Source: Font Awesome, Noun Project, academic icon sets
+
+**LaTeX Implementation**:
+```latex
+% Font Awesome icons
+\usepackage{fontawesome5}
+\faFlask{} Methods \quad \faChartBar{} Results
+
+% Custom icons with TikZ
+\begin{tikzpicture}
+ \node[circle, draw, thick, minimum size=1cm] {\Huge \faAtom};
+\end{tikzpicture}
+```
+
+### Borders and Dividers
+
+**Use Borders To**:
+- Define sections
+- Group related content
+- Add visual interest
+- Match institutional branding
+
+**Border Styles**:
+- Solid lines: Traditional, formal
+- Dashed lines: Informal, secondary info
+- Rounded corners: Friendly, modern
+- Drop shadows: Depth, modern (use sparingly)
+
+**Guidelines**:
+- Keep consistent width (2-5pt typical)
+- Use sparingly (not every element needs a border)
+- Match border color to content or theme
+- Ensure sufficient padding inside borders
+
+```latex
+% tikzposter borders
+\usecolorstyle{Denmark}
+\tikzposterlatexaffectionproofoff % Remove bottom-right logo
+
+% Custom border style
+\defineblockstyle{CustomBlock}{
+ titlewidthscale=1, bodywidthscale=1, titleleft,
+ titleoffsetx=0pt, titleoffsety=0pt, bodyoffsetx=0pt, bodyoffsety=0pt,
+ bodyverticalshift=0pt, roundedcorners=10, linewidth=2pt,
+ titleinnersep=8mm, bodyinnersep=8mm
+}{
+ \draw[draw=blocktitlebgcolor, fill=blockbodybgcolor,
+ rounded corners=\blockroundedcorners, line width=\blocklinewidth]
+ (blockbody.south west) rectangle (blocktitle.north east);
+}
+```
+
+### Background and Texture
+
+**Background Options**:
+
+**Plain (Recommended)**:
+- White or very light color
+- Maximum readability
+- Professional
+- Print-friendly
+
+**Gradient**:
+- Subtle gradients acceptable
+- Top-to-bottom or radial
+- Avoid strong contrasts that interfere with text
+
+**Textured**:
+- Very subtle textures only
+- Watermarks of logos/molecules (5-10% opacity)
+- Avoid patterns that create visual noise
+
+**Avoid**:
+- ❌ Busy backgrounds
+- ❌ Images behind text
+- ❌ High contrast backgrounds
+- ❌ Repeating patterns that cause visual artifacts
+
+```latex
+% Gradient background in tikzposter
+\documentclass{tikzposter}
+\definecolorstyle{GradientStyle}{
+ % ...color definitions...
+}{
+ \colorlet{backgroundcolor}{white!90!blue}
+ \colorlet{framecolor}{white!70!blue}
+}
+
+% Watermark
+\usepackage{tikz}
+\AddToShipoutPictureBG{
+ \AtPageCenter{
+ \includegraphics[width=0.5\paperwidth,opacity=0.05]{university-seal.pdf}
+ }
+}
+```
+
+## Common Design Mistakes
+
+### Critical Errors
+
+**1. Too Much Text** (Most common mistake)
+- ❌ More than 1000 words
+- ❌ Long paragraphs (>5 lines)
+- ❌ Small font sizes to fit more content
+- ✅ Solution: Cut ruthlessly, use bullet points, focus on key messages
+
+**2. Poor Contrast**
+- ❌ Light text on light background
+- ❌ Colored text on colored background
+- ✅ Solution: Dark on light or light on dark, test contrast ratio
+
+**3. Font Size Too Small**
+- ❌ Body text under 24pt
+- ❌ Trying to fit full paper content
+- ✅ Solution: 30pt+ body text, prioritize key findings
+
+**4. Cluttered Layout**
+- ❌ No white space
+- ❌ Elements touching edges
+- ❌ Random placement
+- ✅ Solution: Generous margins, grid alignment, intentional white space
+
+**5. Inconsistent Styling**
+- ❌ Multiple font families
+- ❌ Varying header styles
+- ❌ Misaligned elements
+- ✅ Solution: Define style guide, use templates, align to grid
+
+### Moderate Issues
+
+**6. Poor Figure Quality**
+- ❌ Pixelated images (<300 DPI)
+- ❌ Tiny axis labels
+- ❌ Unreadable legends
+- ✅ Solution: Vector graphics (PDF/SVG), large labels, clear legends
+
+**7. Color Overload**
+- ❌ Too many colors (>5 distinct hues)
+- ❌ Neon or overly saturated colors
+- ✅ Solution: Limit to 2-3 main colors, use tints/shades for variation
+
+**8. Ignoring Visual Hierarchy**
+- ❌ All text same size
+- ❌ No clear entry point
+- ✅ Solution: Vary sizes significantly, clear title, visual flow
+
+**9. Information Overload**
+- ❌ Trying to show everything
+- ❌ Too many figures
+- ✅ Solution: Show 3-5 key results, link to full paper via QR code
+
+**10. Poor Typography**
+- ❌ Justified text (uneven spacing)
+- ❌ All caps body text
+- ❌ Mixing serif and sans-serif randomly
+- ✅ Solution: Left-align body, sentence case, consistent fonts
+
+## Design Checklist
+
+### Before Printing
+
+- [ ] Title visible and readable from 20+ feet
+- [ ] Body text minimum 24pt, ideally 30pt+
+- [ ] High contrast (4.5:1 minimum) throughout
+- [ ] Color-blind friendly palette
+- [ ] Less than 800 words total
+- [ ] White space around all elements
+- [ ] Consistent alignment and spacing
+- [ ] All figures high resolution (300+ DPI)
+- [ ] Figure labels readable (18pt+ minimum)
+- [ ] No orphaned text or awkward breaks
+- [ ] Contact information included
+- [ ] QR codes tested and functional
+- [ ] Consistent font usage (2-3 families max)
+- [ ] All acronyms defined
+- [ ] Proper institutional branding/logos
+- [ ] Print test at 25% scale for readability check
+
+### Content Review
+
+- [ ] Clear narrative arc (problem → approach → findings → impact)
+- [ ] 1-3 main messages clearly communicated
+- [ ] Methods concise but reproducible
+- [ ] Results visually presented (not just text)
+- [ ] Conclusions actionable and clear
+- [ ] References cited appropriately
+- [ ] No typos or grammatical errors
+- [ ] Figures have descriptive captions
+- [ ] Data visualizations are clear and honest
+- [ ] Statistical significance properly indicated
+
+## Evidence-Based Design Recommendations
+
+Research on poster effectiveness shows:
+
+**Findings from Studies**:
+1. **Viewers spend 3-5 minutes average** on posters
+ - Design for scanning, not deep reading
+ - Most important info must be visible immediately
+
+2. **Visual content processed 60,000× faster** than text
+ - Use figures, not paragraphs, to convey key findings
+ - Images attract attention first
+
+3. **High contrast improves recall** by 40%
+ - Dark on light > light on dark for comprehension
+ - Color contrast aids memory retention
+
+4. **White space increases comprehension** by 20%
+ - Don't fear empty space
+ - Margins and padding are essential
+
+5. **Three-column layouts most effective** for portrait posters
+ - Balanced visual weight
+ - Natural reading flow
+
+6. **QR codes increase engagement** by 30%
+ - Provide digital access to full paper
+ - Link to videos, code repositories, data
+
+## Resources and Tools
+
+### Color Tools
+- **Coolors.co**: Generate color palettes
+- **Adobe Color**: Color wheel and accessibility checker
+- **ColorBrewer**: Scientific visualization palettes
+- **WebAIM Contrast Checker**: Test contrast ratios
+
+### Design Resources
+- **Canva**: Poster mockups and inspiration
+- **Figma**: Design prototypes before LaTeX
+- **Noun Project**: Icons and graphics
+- **Font Awesome**: Icon fonts for LaTeX
+
+### Testing Tools
+- **Coblis**: Color blindness simulator
+- **Vischeck**: Another color blindness checker
+- **Accessibility Checker**: WCAG compliance
+
+### LaTeX Packages
+- `xcolor`: Extended color support
+- `tcolorbox`: Colored boxes and frames
+- `fontawesome5`: Icon fonts
+- `qrcode`: QR code generation
+- `tikz`: Custom graphics
+
+## Conclusion
+
+Effective poster design requires balancing aesthetics, readability, and scientific content. Follow these core principles:
+
+1. **Less is more**: Prioritize key messages over comprehensive detail
+2. **Size matters**: Make text large enough to read from distance
+3. **Contrast is critical**: Ensure all text is highly readable
+4. **Accessibility first**: Design for diverse audiences
+5. **Visual hierarchy**: Guide viewers through content logically
+6. **Test early**: Print at reduced scale and gather feedback
+
+Remember: A poster is an advertisement for your research and a conversation starter—not a substitute for reading the full paper.
+
diff --git a/scientific-skills/latex-posters/references/poster_layout_design.md b/scientific-skills/latex-posters/references/poster_layout_design.md
new file mode 100644
index 0000000..b00a584
--- /dev/null
+++ b/scientific-skills/latex-posters/references/poster_layout_design.md
@@ -0,0 +1,900 @@
+# Poster Layout and Design Guide
+
+## Overview
+
+Effective poster layout organizes content for maximum impact and comprehension. This guide covers grid systems, spatial organization, visual flow, and layout patterns for research posters.
+
+## Grid Systems and Column Layouts
+
+### Common Grid Patterns
+
+#### 1. Two-Column Layout
+
+**Characteristics**:
+- Simple, traditional structure
+- Easy to design and execute
+- Clear narrative flow
+- Good for text-heavy content
+- Best for A1 size or smaller
+
+**Content Organization**:
+```
++-------------------------+
+| Title/Header |
++-------------------------+
+| Column 1 | Column 2 |
+| | |
+| Intro | Results |
+| | |
+| Methods | Discussion |
+| | |
+| | Conclusions |
++-------------------------+
+| References/Contact |
++-------------------------+
+```
+
+**LaTeX Implementation (beamerposter)**:
+```latex
+\begin{columns}[t]
+ \begin{column}{.48\linewidth}
+ \begin{block}{Introduction}
+ % Content
+ \end{block}
+ \begin{block}{Methods}
+ % Content
+ \end{block}
+ \end{column}
+
+ \begin{column}{.48\linewidth}
+ \begin{block}{Results}
+ % Content
+ \end{block}
+ \begin{block}{Conclusions}
+ % Content
+ \end{block}
+ \end{column}
+\end{columns}
+```
+
+**Best For**:
+- Small posters (A1, A2)
+- Narrative-heavy content
+- Simple comparisons (before/after, control/treatment)
+- Linear storytelling
+
+**Limitations**:
+- Limited space for multiple results
+- Can appear basic or dated
+- Less visual variety
+
+#### 2. Three-Column Layout (Most Popular)
+
+**Characteristics**:
+- Balanced, professional appearance
+- Optimal for A0 posters
+- Versatile content distribution
+- Natural visual rhythm
+- Industry standard
+
+**Content Organization**:
+```
++--------------------------------+
+| Title/Header |
++--------------------------------+
+| Column 1 | Column 2 | Column 3|
+| | | |
+| Intro | Results | Results |
+| | (Fig 1) | (Fig 2) |
+| Methods | | |
+| | Results | Discuss |
+| Methods | (Fig 3) | |
+| (cont.) | | Concl. |
++--------------------------------+
+| Acknowledgments/Refs |
++--------------------------------+
+```
+
+**LaTeX Implementation (tikzposter)**:
+```latex
+\begin{columns}
+ \column{0.33}
+ \block{Introduction}{...}
+ \block{Methods}{...}
+
+ \column{0.33}
+ \block{Results Part 1}{...}
+ \block{Results Part 2}{...}
+
+ \column{0.33}
+ \block{Results Part 3}{...}
+ \block{Discussion}{...}
+ \block{Conclusions}{...}
+\end{columns}
+```
+
+**Best For**:
+- Standard A0 conference posters
+- Multiple results/figures (4-6)
+- Balanced content distribution
+- Professional academic presentations
+
+**Strengths**:
+- Visual balance and symmetry
+- Adequate space for text and figures
+- Clear section delineation
+- Easy to scan left-to-right
+
+#### 3. Four-Column Layout
+
+**Characteristics**:
+- Information-dense
+- Modern, structured appearance
+- Best for large posters (>A0)
+- Requires careful design
+- More complex to balance
+
+**Content Organization**:
+```
++----------------------------------------+
+| Title/Header |
++----------------------------------------+
+| Col 1 | Col 2 | Col 3 | Col 4 |
+| | | | |
+| Intro | Method | Results | Results |
+| | (Flow) | (Fig 1) | (Fig 3) |
+| Motiv. | | | |
+| | Method | Results | Discuss. |
+| Hypoth.| (Stats)| (Fig 2) | |
+| | | | Concl. |
++----------------------------------------+
+| References/Contact |
++----------------------------------------+
+```
+
+**LaTeX Implementation (baposter)**:
+```latex
+\begin{poster}{columns=4, colspacing=1em, ...}
+
+ \headerbox{Intro}{name=intro, column=0, row=0}{...}
+ \headerbox{Methods}{name=methods, column=1, row=0}{...}
+ \headerbox{Results 1}{name=res1, column=2, row=0}{...}
+ \headerbox{Results 2}{name=res2, column=3, row=0}{...}
+
+ % Continue with below=... for stacking
+
+\end{poster}
+```
+
+**Best For**:
+- Large format posters (48×72")
+- Data-heavy presentations
+- Comparison studies (multiple conditions)
+- Engineering/technical posters
+
+**Challenges**:
+- Can appear crowded
+- Requires more white space management
+- Harder to achieve visual balance
+- Risk of overwhelming viewers
+
+#### 4. Asymmetric Layouts
+
+**Characteristics**:
+- Dynamic, modern appearance
+- Flexible content arrangement
+- Emphasizes hierarchy
+- Requires design expertise
+- Best for creative fields
+
+**Example Pattern**:
+```
++--------------------------------+
+| Title/Header |
++--------------------------------+
+| Wide Column | Narrow Column |
+| (66%) | (33%) |
+| | |
+| Intro + | Key |
+| Methods | Figure |
+| (narrative) | (emphasized) |
+| | |
++--------------------------------+
+| Results (spanning full width) |
++--------------------------------+
+| Discussion | Conclusions |
+| (50%) | (50%) |
++--------------------------------+
+```
+
+**LaTeX Implementation (tikzposter)**:
+```latex
+\begin{columns}
+ \column{0.65}
+ \block{Introduction and Methods}{
+ % Combined narrative section
+ }
+
+ \column{0.35}
+ \block{}{
+ % Key figure with minimal text
+ \includegraphics[width=\linewidth]{key-figure.pdf}
+ }
+\end{columns}
+
+\block[width=1.0\linewidth]{Results}{
+ % Full-width results section
+}
+```
+
+**Best For**:
+- Design-oriented conferences
+- Single key finding with supporting content
+- Modern, non-traditional fields
+- Experienced poster designers
+
+### Grid Alignment Principles
+
+**Baseline Grid**:
+- Establish invisible horizontal lines
+- Align all text blocks to grid
+- Typical spacing: 5mm or 10mm increments
+- Creates visual rhythm and professionalism
+
+**Column Grid**:
+- Divide width into equal units (12, 16, or 24 units common)
+- Elements span multiple units
+- Allows flexible but structured layouts
+
+**Example 12-Column Grid**:
+```
+| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |10 |11 |12 |
+|-------|-------|-------|-------|-------|-------|
+| Block spanning 6 units| Block spanning 6 units|
+| Block spanning 12 units |
+| 4 units | 8 units (emphasized) |
+```
+
+**LaTeX Grid Helper**:
+```latex
+% Debug grid overlay (remove for final version)
+\usepackage{tikz}
+\AddToShipoutPictureBG{
+ \begin{tikzpicture}[remember picture, overlay]
+ \draw[help lines, step=5cm, very thin, gray!30]
+ (current page.south west) grid (current page.north east);
+ \end{tikzpicture}
+}
+```
+
+## Visual Flow and Reading Patterns
+
+### Z-Pattern (Landscape Posters)
+
+Viewers' eyes naturally follow a Z-shape on landscape layouts:
+
+```
+START → → → → → → → → → → → → → → TOP RIGHT
+ ↓ ↓
+ ↓ ↓
+MIDDLE LEFT → → → → → → → → → MIDDLE RIGHT
+ ↓ ↓
+ ↓ ↓
+BOTTOM LEFT → → → → → → → → → → → → END
+```
+
+**Design Strategy**:
+1. **Top-left**: Title and introduction (entry point)
+2. **Top-right**: Institution logo, QR code
+3. **Center**: Key result or main figure
+4. **Bottom-right**: Conclusions and contact (exit point)
+
+**Content Placement**:
+- Critical information at corners and center
+- Support information along diagonal paths
+- Use arrows or visual cues to reinforce flow
+
+### F-Pattern (Portrait Posters)
+
+Portrait posters follow F-shaped eye movement:
+
+```
+TITLE → → → → → → → → → → → →
+ ↓
+INTRO → → → →
+ ↓
+METHODS
+ ↓
+RESULTS → → →
+ ↓
+RESULTS (cont.)
+ ↓
+DISCUSSION
+ ↓
+CONCLUSIONS → → → → → → → → →
+```
+
+**Design Strategy**:
+1. Place engaging content at top-left
+2. Use section headers to create horizontal scan points
+3. Most important figures in upper-middle area
+4. Conclusions visible without scrolling (if digital) or from distance
+
+### Gutenberg Diagram
+
+Classic newspaper layout principle:
+
+```
++------------------+------------------+
+| PRIMARY AREA | STRONG FALLOW |
+| (most attention) | (moderate attn) |
+| ↓ | ↓ |
++------------------+------------------+
+| WEAK FALLOW | TERMINAL AREA |
+| (least attention)| (final resting) |
+| | ↑ |
++------------------+------------------+
+```
+
+**Optimization**:
+- **Primary Area** (top-left): Introduction, problem statement
+- **Strong Fallow** (top-right): Supporting figure, logo
+- **Weak Fallow** (bottom-left): Methods details, references
+- **Terminal Area** (bottom-right): Conclusions, take-home message
+
+### Directional Cues
+
+Guide viewers explicitly through content:
+
+**Numerical Ordering**:
+```latex
+\block{❶ Introduction}{...}
+\block{❷ Methods}{...}
+\block{❸ Results}{...}
+\block{❹ Conclusions}{...}
+```
+
+**Arrows and Lines**:
+```latex
+\begin{tikzpicture}
+ \node[block] (intro) {Introduction};
+ \node[block, right=of intro] (methods) {Methods};
+ \node[block, right=of methods] (results) {Results};
+ \draw[->, thick, blue] (intro) -- (methods);
+ \draw[->, thick, blue] (methods) -- (results);
+\end{tikzpicture}
+```
+
+**Color Progression**:
+- Light to dark shades indicating progression
+- Cool to warm colors showing importance increase
+- Consistent color for related sections
+
+## Spatial Organization Strategies
+
+### Header/Title Area
+
+**Typical Size**: 10-15% of total poster height
+
+**Essential Elements**:
+- **Title**: Concise, descriptive (10-15 words max)
+- **Authors**: Full names, presenting author emphasized
+- **Affiliations**: Institutions, departments
+- **Logos**: University, funding agencies (2-4 max)
+- **Conference info** (optional): Name, date, location
+
+**Layout Options**:
+
+**Centered**:
+```
++----------------------------------------+
+| [Logo] POSTER TITLE HERE [Logo]|
+| Authors and Affiliations |
+| email@university.edu |
++----------------------------------------+
+```
+
+**Left-aligned**:
+```
++----------------------------------------+
+| POSTER TITLE HERE [Logo] |
+| Authors and Affiliations [Logo] |
++----------------------------------------+
+```
+
+**Split**:
+```
++----------------------------------------+
+| [Logo] | Authors & Affil. |
+| POSTER TITLE | email@edu |
+| | [QR Code] |
++----------------------------------------+
+```
+
+**LaTeX Header (beamerposter)**:
+```latex
+\begin{columns}[T]
+ \begin{column}{.15\linewidth}
+ \includegraphics[width=\linewidth]{logo1.pdf}
+ \end{column}
+
+ \begin{column}{.7\linewidth}
+ \centering
+ {\VeryHuge\textbf{Your Research Title Here}}\\[0.5cm]
+ {\Large Author One\textsuperscript{1}, Author Two\textsuperscript{2}}\\[0.3cm]
+ {\normalsize \textsuperscript{1}University A, \textsuperscript{2}University B}
+ \end{column}
+
+ \begin{column}{.15\linewidth}
+ \includegraphics[width=\linewidth]{logo2.pdf}
+ \end{column}
+\end{columns}
+```
+
+### Main Content Area
+
+**Typical Size**: 70-80% of total poster
+
+**Organization Principles**:
+
+**1. Top-to-Bottom Flow**:
+```
+Introduction/Background
+ ↓
+Methods/Approach
+ ↓
+Results (Multiple panels)
+ ↓
+Discussion/Conclusions
+```
+
+**2. Left-to-Right, Top-to-Bottom**:
+```
+[Intro] [Results 1] [Results 3]
+[Methods] [Results 2] [Discussion]
+```
+
+**3. Centralized Main Figure**:
+```
+[Intro] [Main Figure] [Discussion]
+[Methods] (center) [Conclusions]
+```
+
+**Section Sizing**:
+- Introduction: 10-15% of content area
+- Methods: 15-20%
+- Results: 40-50% (largest section)
+- Discussion/Conclusions: 15-20%
+
+### Footer Area
+
+**Typical Size**: 5-10% of total poster height
+
+**Common Elements**:
+- References (abbreviated, 5-10 key citations)
+- Acknowledgments (funding, collaborators)
+- Contact information
+- QR codes (paper, code, data)
+- Social media handles (optional)
+- Conference hashtags
+
+**Layout**:
+```
++----------------------------------------+
+| References: 1. Author (2023) ... | 📱 |
+| Acknowledgments: Funded by ... | QR |
+| Contact: name@email.edu | Code |
++----------------------------------------+
+```
+
+**LaTeX Footer**:
+```latex
+\begin{block}{}
+ \footnotesize
+ \begin{columns}[T]
+ \begin{column}{0.7\linewidth}
+ \textbf{References}
+ \begin{enumerate}
+ \item Author A et al. (2023). Journal. doi:...
+ \item Author B et al. (2024). Conference.
+ \end{enumerate}
+
+ \textbf{Acknowledgments}
+ This work was supported by Grant XYZ.
+
+ \textbf{Contact}: firstname.lastname@university.edu
+ \end{column}
+
+ \begin{column}{0.25\linewidth}
+ \centering
+ \qrcode[height=3cm]{https://doi.org/10.1234/paper}\\
+ \tiny Scan for full paper
+ \end{column}
+ \end{columns}
+\end{block}
+```
+
+## White Space Management
+
+### Margins and Padding
+
+**Outer Margins**:
+- Minimum: 2-3cm (0.75-1 inch)
+- Recommended: 3-5cm (1-2 inches)
+- Prevents edge trimming issues in printing
+- Provides visual breathing room
+
+**Inner Spacing**:
+- Between columns: 1-2cm
+- Between blocks: 1-2cm
+- Inside blocks (padding): 0.5-1.5cm
+- Around figures: 0.5-1cm
+
+**LaTeX Margin Control**:
+```latex
+% beamerposter
+\usepackage[size=a0, scale=1.4]{beamerposter}
+\setbeamersize{text margin left=3cm, text margin right=3cm}
+
+% tikzposter
+\documentclass[..., margin=30mm, innermargin=15mm]{tikzposter}
+
+% baposter
+\begin{poster}{
+ colspacing=1.5em, % Horizontal spacing
+ ...
+}
+```
+
+### Active White Space vs. Passive White Space
+
+**Active White Space**: Intentionally placed for specific purpose
+- Around key figures (draws attention)
+- Between major sections (creates clear separation)
+- Above/below titles (emphasizes hierarchy)
+
+**Passive White Space**: Natural result of layout
+- Margins and borders
+- Line spacing
+- Gaps between elements
+
+**Balance**: Aim for 30-40% white space overall
+
+### Visual Breathing Room
+
+**Avoid**:
+- ❌ Elements touching edges
+- ❌ Text blocks directly adjacent
+- ❌ Figures without surrounding space
+- ❌ Cramped, claustrophobic feel
+
+**Implement**:
+- ✅ Clear separation between sections
+- ✅ Space around focal points
+- ✅ Generous padding inside boxes
+- ✅ Balanced distribution of content
+
+## Block and Box Design
+
+### Block Types and Functions
+
+**Title Block**: Poster header
+- Full width, top position
+- High visual weight
+- Contains identifying information
+
+**Content Blocks**: Main sections
+- Column-based or free-floating
+- Hierarchical sizing (larger = more important)
+- Clear headers and structure
+
+**Callout Blocks**: Emphasized information
+- Key findings or quotes
+- Different color or style
+- Visually distinct
+
+**Reference Blocks**: Supporting info
+- Footer position
+- Smaller, less prominent
+- Informational, not critical
+
+### Block Styling Options
+
+**Border Styles**:
+```latex
+% Rounded corners (friendly, modern)
+\begin{block}{Title}
+ % beamerposter with rounded
+ \setbeamertemplate{block begin}[rounded]
+
+% Sharp corners (formal, traditional)
+ \setbeamertemplate{block begin}[default]
+
+% No border (minimal, clean)
+ \setbeamercolor{block title}{bg=white, fg=black}
+ \setbeamercolor{block body}{bg=white, fg=black}
+```
+
+**Shadow and Depth**:
+```latex
+% tikzposter shadow
+\tikzset{
+ block/.append style={
+ drop shadow={shadow xshift=2mm, shadow yshift=-2mm}
+ }
+}
+
+% tcolorbox drop shadow
+\usepackage{tcolorbox}
+\begin{tcolorbox}[enhanced, drop shadow]
+ Content with shadow
+\end{tcolorbox}
+```
+
+**Background Shading**:
+- **Solid**: Clean, professional
+- **Gradient**: Modern, dynamic
+- **Transparent**: Layered, sophisticated
+
+### Relationship and Grouping
+
+**Visual Grouping Techniques**:
+
+**1. Proximity**: Place related items close
+```
+[Intro Text]
+[Related Figure]
+ ↓ grouped
+[Methods Text]
+[Methods Diagram]
+```
+
+**2. Color Coding**: Use color to show relationships
+- All "Methods" blocks in blue
+- All "Results" blocks in green
+- Conclusions in orange
+
+**3. Borders**: Enclose related elements
+```latex
+\begin{tcolorbox}[title=Experimental Pipeline]
+ \begin{enumerate}
+ \item Sample preparation
+ \item Data collection
+ \item Analysis
+ \end{enumerate}
+\end{tcolorbox}
+```
+
+**4. Alignment**: Aligned elements appear related
+```
+[Block A Left-aligned]
+[Block B Left-aligned]
+ vs.
+[Block C Centered]
+```
+
+## Responsive and Adaptive Layouts
+
+### Designing for Different Poster Sizes
+
+**Scaling Strategy**:
+- Design for target size (e.g., A0)
+- Test at other common sizes (A1, 36×48")
+- Use relative sizing (percentages, not absolute)
+
+**Font Scaling**:
+```latex
+% Scale fonts proportionally
+\usepackage[size=a0, scale=1.4]{beamerposter} % A0 at 140%
+\usepackage[size=a1, scale=1.0]{beamerposter} % A1 at 100%
+
+% Or define sizes relatively
+\newcommand{\titlesize}{\fontsize{96}{110}\selectfont}
+\newcommand{\headersize}{\fontsize{60}{72}\selectfont}
+```
+
+**Content Adaptation**:
+- **A0 (full)**: All content, 5-6 figures
+- **A1 (reduced)**: Condense to 3-4 main figures
+- **A2 (compact)**: Key finding only, 1-2 figures
+
+### Portrait vs. Landscape Orientation
+
+**Portrait (Vertical)**:
+- **Pros**: Traditional, more common stands, natural reading flow
+- **Cons**: Less width for figures, can feel cramped
+- **Best for**: Text-heavy posters, multi-section flow, conferences
+
+**Landscape (Horizontal)**:
+- **Pros**: Wide figures, natural for timelines, modern feel
+- **Cons**: Harder to read from distance, less common
+- **Best for**: Timelines, wide data visualizations, non-traditional venues
+
+**LaTeX Orientation**:
+```latex
+% Portrait
+\usepackage[size=a0, orientation=portrait]{beamerposter}
+\documentclass[..., portrait]{tikzposter}
+
+% Landscape
+\usepackage[size=a0, orientation=landscape]{beamerposter}
+\documentclass[..., landscape]{tikzposter}
+```
+
+## Layout Patterns by Research Type
+
+### Experimental Research
+
+**Typical Flow**:
+```
+[Title and Authors]
++---------------------------+
+| Background | Methods |
+| Problem | (Diagram) |
++---------------------------+
+| Results (Figure 1) |
+| Results (Figure 2) |
++---------------------------+
+| Discussion | Conclusions |
+| Limitations| Future Work |
++---------------------------+
+[References and Contact]
+```
+
+**Emphasis**: Visual results, clear methodology
+
+### Computational/Modeling
+
+**Typical Flow**:
+```
+[Title and Authors]
++---------------------------+
+| Motivation | Algorithm |
+| | (Flowchart) |
++---------------------------+
+| Implementation Details |
++---------------------------+
+| Results | Results |
+| (Benchmark)| (Comparison) |
++---------------------------+
+| Conclusions| Code QR |
++---------------------------+
+[GitHub, Docker, Documentation]
+```
+
+**Emphasis**: Algorithm clarity, reproducibility
+
+### Clinical/Medical
+
+**Typical Flow**:
+```
+[Title and Authors]
++---------------------------+
+| Background | Methods |
+| Clinical | - Design |
+| Need | - Population |
+| | - Outcomes |
++---------------------------+
+| Results | |
+| (Primary Outcome) | Key|
+| | Fig|
++---------------------------+
+| Discussion | Clinical |
+| | Implications |
++---------------------------+
+[Trial Registration, Ethics, Funding]
+```
+
+**Emphasis**: Patient outcomes, clinical relevance
+
+### Review/Meta-Analysis
+
+**Typical Flow**:
+```
+[Title and Authors]
++---------------------------+
+| Research | Search |
+| Question | Strategy |
+| | (PRISMA Flow) |
++---------------------------+
+| Included Studies Overview |
++---------------------------+
+| Findings | Findings |
+| (Theme 1) | (Theme 2) |
++---------------------------+
+| Synthesis | Gaps & |
+| | Future Needs |
++---------------------------+
+[Systematic Review Registration]
+```
+
+**Emphasis**: Comprehensive coverage, synthesis
+
+## Layout Testing and Iteration
+
+### Design Iteration Process
+
+**1. Sketch Phase**:
+- Hand-draw rough layout
+- Experiment with different arrangements
+- Mark primary, secondary, tertiary content
+
+**2. Digital Mockup**:
+- Create low-fidelity version in LaTeX
+- Use placeholder text/figures
+- Test different grid systems
+
+**3. Content Integration**:
+- Replace placeholders with actual content
+- Adjust spacing and sizing
+- Refine visual hierarchy
+
+**4. Refinement**:
+- Fine-tune alignment
+- Balance visual weight
+- Optimize white space
+
+**5. Testing**:
+- Print at reduced scale (25%)
+- View from distance
+- Get colleague feedback
+
+### Feedback Checklist
+
+**Visual Balance**:
+- [ ] No single area feels too heavy or too light
+- [ ] Color distributed evenly across poster
+- [ ] Text and figures balanced
+- [ ] White space well-distributed
+
+**Hierarchy and Flow**:
+- [ ] Clear entry point (title visible)
+- [ ] Logical reading path
+- [ ] Section relationships clear
+- [ ] Conclusions easy to find
+
+**Technical Execution**:
+- [ ] Consistent alignment
+- [ ] Uniform spacing
+- [ ] Professional appearance
+- [ ] No awkward breaks or orphans
+
+## Common Layout Mistakes
+
+**1. Unbalanced Visual Weight**
+- ❌ All content on left, empty right side
+- ❌ Large figure dominating, tiny text elsewhere
+- ✅ Distribute content evenly across poster
+
+**2. Inconsistent Spacing**
+- ❌ Random gaps between blocks
+- ❌ Elements touching in some places, spaced in others
+- ✅ Use consistent spacing values throughout
+
+**3. Poor Column Width**
+- ❌ Extremely narrow columns (hard to read)
+- ❌ Very wide columns (eye tracking difficult)
+- ✅ Optimal: 40-80 characters per line
+
+**4. Ignoring Grid**
+- ❌ Random placement of elements
+- ❌ Misaligned blocks
+- ✅ Align to invisible grid, consistent positioning
+
+**5. Overcrowding**
+- ❌ No white space, cramped feel
+- ❌ Trying to fit too much content
+- ✅ Generous margins, clear separation
+
+## Conclusion
+
+Effective layout design:
+- Uses appropriate grid systems (2, 3, or 4 columns)
+- Follows natural eye movement patterns
+- Maintains visual balance and hierarchy
+- Provides adequate white space
+- Groups related content clearly
+- Adapts to different poster sizes and orientations
+
+Remember: Layout should support content, not compete with it. When viewers focus on your research rather than your design, you've succeeded.
+
diff --git a/scientific-skills/latex-posters/scripts/review_poster.sh b/scientific-skills/latex-posters/scripts/review_poster.sh
new file mode 100755
index 0000000..1081be6
--- /dev/null
+++ b/scientific-skills/latex-posters/scripts/review_poster.sh
@@ -0,0 +1,214 @@
+#!/bin/bash
+
+# Poster PDF Quality Check Script
+# Usage: ./review_poster.sh poster.pdf
+
+# Colors for output
+RED='\033[0;31m'
+GREEN='\033[0;32m'
+YELLOW='\033[1;33m'
+BLUE='\033[0;34m'
+NC='\033[0m' # No Color
+
+# Check if file argument provided
+if [ $# -eq 0 ]; then
+ echo -e "${RED}Error: No file specified${NC}"
+ echo "Usage: $0 "
+ exit 1
+fi
+
+POSTER_FILE="$1"
+
+# Check if file exists
+if [ ! -f "$POSTER_FILE" ]; then
+ echo -e "${RED}Error: File '$POSTER_FILE' not found${NC}"
+ exit 1
+fi
+
+echo -e "${BLUE}═══════════════════════════════════════════════${NC}"
+echo -e "${BLUE} Poster PDF Quality Check${NC}"
+echo -e "${BLUE}═══════════════════════════════════════════════${NC}"
+echo ""
+echo -e "${GREEN}File:${NC} $POSTER_FILE"
+echo ""
+
+# Function to check if command exists
+command_exists() {
+ command -v "$1" >/dev/null 2>&1
+}
+
+# 1. Page Size Check
+echo -e "${YELLOW}[1] Page Dimensions:${NC}"
+if command_exists pdfinfo; then
+ PAGE_SIZE=$(pdfinfo "$POSTER_FILE" 2>/dev/null | grep "Page size")
+ if [ -n "$PAGE_SIZE" ]; then
+ echo " $PAGE_SIZE"
+
+ # Extract dimensions and check common sizes
+ WIDTH=$(echo "$PAGE_SIZE" | awk '{print $3}')
+ HEIGHT=$(echo "$PAGE_SIZE" | awk '{print $5}')
+
+ # Check against common poster sizes (approximate)
+ if [ "$WIDTH" = "2384" ] && [ "$HEIGHT" = "3370" ]; then
+ echo -e " ${GREEN}✓ Detected: A0 Portrait${NC}"
+ elif [ "$WIDTH" = "3370" ] && [ "$HEIGHT" = "2384" ]; then
+ echo -e " ${GREEN}✓ Detected: A0 Landscape${NC}"
+ elif [ "$WIDTH" = "1684" ] && [ "$HEIGHT" = "2384" ]; then
+ echo -e " ${GREEN}✓ Detected: A1 Portrait${NC}"
+ elif [ "$WIDTH" = "2592" ] && [ "$HEIGHT" = "3456" ]; then
+ echo -e " ${GREEN}✓ Detected: 36×48 inches Portrait${NC}"
+ else
+ echo -e " ${YELLOW}⚠ Non-standard size detected${NC}"
+ fi
+ else
+ echo -e " ${RED}✗ Could not extract page size${NC}"
+ fi
+else
+ echo -e " ${YELLOW}⚠ pdfinfo not installed (install: brew install poppler or apt-get install poppler-utils)${NC}"
+fi
+echo ""
+
+# 2. Page Count
+echo -e "${YELLOW}[2] Page Count:${NC}"
+if command_exists pdfinfo; then
+ PAGE_COUNT=$(pdfinfo "$POSTER_FILE" 2>/dev/null | grep "Pages" | awk '{print $2}')
+ if [ "$PAGE_COUNT" = "1" ]; then
+ echo -e " ${GREEN}✓ Single page (correct for poster)${NC}"
+ else
+ echo -e " ${RED}✗ Multiple pages detected: $PAGE_COUNT${NC}"
+ echo -e " ${YELLOW} Posters should be single page${NC}"
+ fi
+else
+ echo -e " ${YELLOW}⚠ pdfinfo not installed${NC}"
+fi
+echo ""
+
+# 3. File Size
+echo -e "${YELLOW}[3] File Size:${NC}"
+if command_exists ls; then
+ FILE_SIZE=$(ls -lh "$POSTER_FILE" | awk '{print $5}')
+ FILE_SIZE_BYTES=$(ls -l "$POSTER_FILE" | awk '{print $5}')
+ echo " Size: $FILE_SIZE"
+
+ # Check if file is too large for email
+ if [ "$FILE_SIZE_BYTES" -gt 52428800 ]; then # 50MB
+ echo -e " ${YELLOW}⚠ Large file (>50MB) - may need compression for email${NC}"
+ echo -e " ${BLUE} Compress with: gs -sDEVICE=pdfwrite -dPDFSETTINGS=/printer -dNOPAUSE -dQUIET -dBATCH -sOutputFile=compressed.pdf $POSTER_FILE${NC}"
+ elif [ "$FILE_SIZE_BYTES" -lt 1048576 ]; then # 1MB
+ echo -e " ${YELLOW}⚠ Small file - check image quality${NC}"
+ else
+ echo -e " ${GREEN}✓ Reasonable file size${NC}"
+ fi
+fi
+echo ""
+
+# 4. Font Embedding Check
+echo -e "${YELLOW}[4] Font Embedding:${NC}"
+if command_exists pdffonts; then
+ echo " Checking first 20 fonts..."
+ FONT_OUTPUT=$(pdffonts "$POSTER_FILE" 2>/dev/null | head -21)
+ echo "$FONT_OUTPUT" | tail -20 | while IFS= read -r line; do
+ echo " $line"
+ done
+
+ # Check for non-embedded fonts
+ NON_EMBEDDED=$(echo "$FONT_OUTPUT" | tail -n +3 | awk '{if ($4 == "no") print $0}')
+ if [ -n "$NON_EMBEDDED" ]; then
+ echo -e " ${RED}✗ Some fonts are NOT embedded (printing may fail)${NC}"
+ echo -e " ${BLUE} Fix: Recompile with 'pdflatex -dEmbedAllFonts=true poster.tex'${NC}"
+ else
+ echo -e " ${GREEN}✓ All fonts appear to be embedded${NC}"
+ fi
+else
+ echo -e " ${YELLOW}⚠ pdffonts not installed (install: brew install poppler or apt-get install poppler-utils)${NC}"
+fi
+echo ""
+
+# 5. Image Quality Check
+echo -e "${YELLOW}[5] Image Quality:${NC}"
+if command_exists pdfimages; then
+ IMAGE_COUNT=$(pdfimages -list "$POSTER_FILE" 2>/dev/null | tail -n +3 | wc -l | tr -d ' ')
+ if [ "$IMAGE_COUNT" -gt 0 ]; then
+ echo " Found $IMAGE_COUNT image(s)"
+ echo " Image details:"
+ pdfimages -list "$POSTER_FILE" 2>/dev/null | head -20
+
+ # Note: DPI calculation would require page size knowledge
+ echo -e " ${BLUE} Verify images are at least 300 DPI for printing${NC}"
+ echo -e " ${BLUE} Formula: DPI = pixels / (inches in poster)${NC}"
+ else
+ echo -e " ${YELLOW}⚠ No images found${NC}"
+ fi
+else
+ echo -e " ${YELLOW}⚠ pdfimages not installed (install: brew install poppler or apt-get install poppler-utils)${NC}"
+fi
+echo ""
+
+# 6. Manual Checks Required
+echo -e "${YELLOW}[6] Manual Visual Inspection Required:${NC}"
+echo ""
+echo -e "${BLUE}Layout and Spacing:${NC}"
+echo " [ ] Content fills entire page (no large white margins)"
+echo " [ ] Consistent spacing between columns"
+echo " [ ] Consistent spacing between blocks/sections"
+echo " [ ] All elements aligned properly"
+echo " [ ] No overlapping text or figures"
+echo ""
+
+echo -e "${BLUE}Typography:${NC}"
+echo " [ ] Title visible and large (72pt+)"
+echo " [ ] Section headers readable (48-72pt)"
+echo " [ ] Body text readable (24-36pt minimum)"
+echo " [ ] No text cutoff or running off edges"
+echo " [ ] Consistent font usage"
+echo ""
+
+echo -e "${BLUE}Visual Elements:${NC}"
+echo " [ ] All figures display correctly"
+echo " [ ] No pixelated or blurry images"
+echo " [ ] Figure captions present and readable"
+echo " [ ] Colors render as expected"
+echo " [ ] Logos display clearly"
+echo " [ ] QR codes visible and scannable"
+echo ""
+
+echo -e "${BLUE}Content:${NC}"
+echo " [ ] All sections present (Intro, Methods, Results, Conclusions)"
+echo " [ ] References included"
+echo " [ ] Contact information visible"
+echo " [ ] No placeholder text (Lorem ipsum, TODO, etc.)"
+echo ""
+
+# 7. Recommended Tests
+echo -e "${YELLOW}[7] Recommended Next Steps:${NC}"
+echo ""
+echo -e "${BLUE}Test Print:${NC}"
+echo " • Print at 25% scale (A0→A4, 36×48→Letter)"
+echo " • Check readability from 2-3 feet"
+echo " • Verify colors printed accurately"
+echo ""
+
+echo -e "${BLUE}Digital Checks:${NC}"
+echo " • View at 100% zoom in PDF viewer"
+echo " • Test on different screens/devices"
+echo " • Verify QR codes work with scanner app"
+echo ""
+
+echo -e "${BLUE}Proofreading:${NC}"
+echo " • Spell-check all text"
+echo " • Verify author names and affiliations"
+echo " • Confirm all statistics and numbers"
+echo " • Ask colleague to review"
+echo ""
+
+# 8. Summary
+echo -e "${BLUE}═══════════════════════════════════════════════${NC}"
+echo -e "${BLUE} Quality Check Complete${NC}"
+echo -e "${BLUE}═══════════════════════════════════════════════${NC}"
+echo ""
+echo -e "Review the checks above and complete manual verification."
+echo -e "For full checklist, see: ${BLUE}assets/poster_quality_checklist.md${NC}"
+echo ""
+
+exit 0
+
diff --git a/scientific-skills/literature-review/SKILL.md b/scientific-skills/literature-review/SKILL.md
new file mode 100644
index 0000000..9a55eea
--- /dev/null
+++ b/scientific-skills/literature-review/SKILL.md
@@ -0,0 +1,584 @@
+---
+name: literature-review
+description: Conduct comprehensive, systematic literature reviews using multiple academic databases (PubMed, arXiv, bioRxiv, Semantic Scholar, etc.). This skill should be used when conducting systematic literature reviews, meta-analyses, research synthesis, or comprehensive literature searches across biomedical, scientific, and technical domains. Creates professionally formatted markdown documents and PDFs with verified citations in multiple citation styles (APA, Nature, Vancouver, etc.).
+allowed-tools: [Read, Write, Edit, Bash]
+---
+
+# Literature Review
+
+## Overview
+
+Conduct systematic, comprehensive literature reviews following rigorous academic methodology. Search multiple literature databases, synthesize findings thematically, verify all citations for accuracy, and generate professional output documents in markdown and PDF formats.
+
+This skill integrates with multiple scientific skills for database access (gget, bioservices, datacommons-client) and provides specialized tools for citation verification, result aggregation, and document generation.
+
+## When to Use This Skill
+
+Use this skill when:
+- Conducting a systematic literature review for research or publication
+- Synthesizing current knowledge on a specific topic across multiple sources
+- Performing meta-analysis or scoping reviews
+- Writing the literature review section of a research paper or thesis
+- Investigating the state of the art in a research domain
+- Identifying research gaps and future directions
+- Requiring verified citations and professional formatting
+
+## Visual Enhancement with Scientific Schematics
+
+**⚠️ MANDATORY: Every literature review MUST include at least 1-2 AI-generated figures using the scientific-schematics skill.**
+
+This is not optional. Literature reviews without visual elements are incomplete. Before finalizing any document:
+1. Generate at minimum ONE schematic or diagram (e.g., PRISMA flow diagram for systematic reviews)
+2. Prefer 2-3 figures for comprehensive reviews (search strategy flowchart, thematic synthesis diagram, conceptual framework)
+
+**How to generate figures:**
+- Use the **scientific-schematics** skill to generate AI-powered publication-quality diagrams
+- Simply describe your desired diagram in natural language
+- Nano Banana Pro will automatically generate, review, and refine the schematic
+
+**How to generate schematics:**
+```bash
+python scripts/generate_schematic.py "your diagram description" -o figures/output.png
+```
+
+The AI will automatically:
+- Create publication-quality images with proper formatting
+- Review and refine through multiple iterations
+- Ensure accessibility (colorblind-friendly, high contrast)
+- Save outputs in the figures/ directory
+
+**When to add schematics:**
+- PRISMA flow diagrams for systematic reviews
+- Literature search strategy flowcharts
+- Thematic synthesis diagrams
+- Research gap visualization maps
+- Citation network diagrams
+- Conceptual framework illustrations
+- Any complex concept that benefits from visualization
+
+For detailed guidance on creating schematics, refer to the scientific-schematics skill documentation.
+
+---
+
+## Core Workflow
+
+Literature reviews follow a structured, multi-phase workflow:
+
+### Phase 1: Planning and Scoping
+
+1. **Define Research Question**: Use PICO framework (Population, Intervention, Comparison, Outcome) for clinical/biomedical reviews
+ - Example: "What is the efficacy of CRISPR-Cas9 (I) for treating sickle cell disease (P) compared to standard care (C)?"
+
+2. **Establish Scope and Objectives**:
+ - Define clear, specific research questions
+ - Determine review type (narrative, systematic, scoping, meta-analysis)
+ - Set boundaries (time period, geographic scope, study types)
+
+3. **Develop Search Strategy**:
+ - Identify 2-4 main concepts from research question
+ - List synonyms, abbreviations, and related terms for each concept
+ - Plan Boolean operators (AND, OR, NOT) to combine terms
+ - Select minimum 3 complementary databases
+
+4. **Set Inclusion/Exclusion Criteria**:
+ - Date range (e.g., last 10 years: 2015-2024)
+ - Language (typically English, or specify multilingual)
+ - Publication types (peer-reviewed, preprints, reviews)
+ - Study designs (RCTs, observational, in vitro, etc.)
+ - Document all criteria clearly
+
+### Phase 2: Systematic Literature Search
+
+1. **Multi-Database Search**:
+
+ Select databases appropriate for the domain:
+
+ **Biomedical & Life Sciences:**
+ - Use `gget` skill: `gget search pubmed "search terms"` for PubMed/PMC
+ - Use `gget` skill: `gget search biorxiv "search terms"` for preprints
+ - Use `bioservices` skill for ChEMBL, KEGG, UniProt, etc.
+
+ **General Scientific Literature:**
+ - Search arXiv via direct API (preprints in physics, math, CS, q-bio)
+ - Search Semantic Scholar via API (200M+ papers, cross-disciplinary)
+ - Use Google Scholar for comprehensive coverage (manual or careful scraping)
+
+ **Specialized Databases:**
+ - Use `gget alphafold` for protein structures
+ - Use `gget cosmic` for cancer genomics
+ - Use `datacommons-client` for demographic/statistical data
+ - Use specialized databases as appropriate for the domain
+
+2. **Document Search Parameters**:
+ ```markdown
+ ## Search Strategy
+
+ ### Database: PubMed
+ - **Date searched**: 2024-10-25
+ - **Date range**: 2015-01-01 to 2024-10-25
+ - **Search string**:
+ ```
+ ("CRISPR"[Title] OR "Cas9"[Title])
+ AND ("sickle cell"[MeSH] OR "SCD"[Title/Abstract])
+ AND 2015:2024[Publication Date]
+ ```
+ - **Results**: 247 articles
+ ```
+
+ Repeat for each database searched.
+
+3. **Export and Aggregate Results**:
+ - Export results in JSON format from each database
+ - Combine all results into a single file
+ - Use `scripts/search_databases.py` for post-processing:
+ ```bash
+ python search_databases.py combined_results.json \
+ --deduplicate \
+ --format markdown \
+ --output aggregated_results.md
+ ```
+
+### Phase 3: Screening and Selection
+
+1. **Deduplication**:
+ ```bash
+ python search_databases.py results.json --deduplicate --output unique_results.json
+ ```
+ - Removes duplicates by DOI (primary) or title (fallback)
+ - Document number of duplicates removed
+
+2. **Title Screening**:
+ - Review all titles against inclusion/exclusion criteria
+ - Exclude obviously irrelevant studies
+ - Document number excluded at this stage
+
+3. **Abstract Screening**:
+ - Read abstracts of remaining studies
+ - Apply inclusion/exclusion criteria rigorously
+ - Document reasons for exclusion
+
+4. **Full-Text Screening**:
+ - Obtain full texts of remaining studies
+ - Conduct detailed review against all criteria
+ - Document specific reasons for exclusion
+ - Record final number of included studies
+
+5. **Create PRISMA Flow Diagram**:
+ ```
+ Initial search: n = X
+ ├─ After deduplication: n = Y
+ ├─ After title screening: n = Z
+ ├─ After abstract screening: n = A
+ └─ Included in review: n = B
+ ```
+
+### Phase 4: Data Extraction and Quality Assessment
+
+1. **Extract Key Data** from each included study:
+ - Study metadata (authors, year, journal, DOI)
+ - Study design and methods
+ - Sample size and population characteristics
+ - Key findings and results
+ - Limitations noted by authors
+ - Funding sources and conflicts of interest
+
+2. **Assess Study Quality**:
+ - **For RCTs**: Use Cochrane Risk of Bias tool
+ - **For observational studies**: Use Newcastle-Ottawa Scale
+ - **For systematic reviews**: Use AMSTAR 2
+ - Rate each study: High, Moderate, Low, or Very Low quality
+ - Consider excluding very low-quality studies
+
+3. **Organize by Themes**:
+ - Identify 3-5 major themes across studies
+ - Group studies by theme (studies may appear in multiple themes)
+ - Note patterns, consensus, and controversies
+
+### Phase 5: Synthesis and Analysis
+
+1. **Create Review Document** from template:
+ ```bash
+ cp assets/review_template.md my_literature_review.md
+ ```
+
+2. **Write Thematic Synthesis** (NOT study-by-study summaries):
+ - Organize Results section by themes or research questions
+ - Synthesize findings across multiple studies within each theme
+ - Compare and contrast different approaches and results
+ - Identify consensus areas and points of controversy
+ - Highlight the strongest evidence
+
+ Example structure:
+ ```markdown
+ #### 3.3.1 Theme: CRISPR Delivery Methods
+
+ Multiple delivery approaches have been investigated for therapeutic
+ gene editing. Viral vectors (AAV) were used in 15 studies^1-15^ and
+ showed high transduction efficiency (65-85%) but raised immunogenicity
+ concerns^3,7,12^. In contrast, lipid nanoparticles demonstrated lower
+ efficiency (40-60%) but improved safety profiles^16-23^.
+ ```
+
+3. **Critical Analysis**:
+ - Evaluate methodological strengths and limitations across studies
+ - Assess quality and consistency of evidence
+ - Identify knowledge gaps and methodological gaps
+ - Note areas requiring future research
+
+4. **Write Discussion**:
+ - Interpret findings in broader context
+ - Discuss clinical, practical, or research implications
+ - Acknowledge limitations of the review itself
+ - Compare with previous reviews if applicable
+ - Propose specific future research directions
+
+### Phase 6: Citation Verification
+
+**CRITICAL**: All citations must be verified for accuracy before final submission.
+
+1. **Verify All DOIs**:
+ ```bash
+ python scripts/verify_citations.py my_literature_review.md
+ ```
+
+ This script:
+ - Extracts all DOIs from the document
+ - Verifies each DOI resolves correctly
+ - Retrieves metadata from CrossRef
+ - Generates verification report
+ - Outputs properly formatted citations
+
+2. **Review Verification Report**:
+ - Check for any failed DOIs
+ - Verify author names, titles, and publication details match
+ - Correct any errors in the original document
+ - Re-run verification until all citations pass
+
+3. **Format Citations Consistently**:
+ - Choose one citation style and use throughout (see `references/citation_styles.md`)
+ - Common styles: APA, Nature, Vancouver, Chicago, IEEE
+ - Use verification script output to format citations correctly
+ - Ensure in-text citations match reference list format
+
+### Phase 7: Document Generation
+
+1. **Generate PDF**:
+ ```bash
+ python scripts/generate_pdf.py my_literature_review.md \
+ --citation-style apa \
+ --output my_review.pdf
+ ```
+
+ Options:
+ - `--citation-style`: apa, nature, chicago, vancouver, ieee
+ - `--no-toc`: Disable table of contents
+ - `--no-numbers`: Disable section numbering
+ - `--check-deps`: Check if pandoc/xelatex are installed
+
+2. **Review Final Output**:
+ - Check PDF formatting and layout
+ - Verify all sections are present
+ - Ensure citations render correctly
+ - Check that figures/tables appear properly
+ - Verify table of contents is accurate
+
+3. **Quality Checklist**:
+ - [ ] All DOIs verified with verify_citations.py
+ - [ ] Citations formatted consistently
+ - [ ] PRISMA flow diagram included (for systematic reviews)
+ - [ ] Search methodology fully documented
+ - [ ] Inclusion/exclusion criteria clearly stated
+ - [ ] Results organized thematically (not study-by-study)
+ - [ ] Quality assessment completed
+ - [ ] Limitations acknowledged
+ - [ ] References complete and accurate
+ - [ ] PDF generates without errors
+
+## Database-Specific Search Guidance
+
+### PubMed / PubMed Central
+
+Access via `gget` skill:
+```bash
+# Search PubMed
+gget search pubmed "CRISPR gene editing" -l 100
+
+# Search with filters
+# Use PubMed Advanced Search Builder to construct complex queries
+# Then execute via gget or direct Entrez API
+```
+
+**Search tips**:
+- Use MeSH terms: `"sickle cell disease"[MeSH]`
+- Field tags: `[Title]`, `[Title/Abstract]`, `[Author]`
+- Date filters: `2020:2024[Publication Date]`
+- Boolean operators: AND, OR, NOT
+- See MeSH browser: https://meshb.nlm.nih.gov/search
+
+### bioRxiv / medRxiv
+
+Access via `gget` skill:
+```bash
+gget search biorxiv "CRISPR sickle cell" -l 50
+```
+
+**Important considerations**:
+- Preprints are not peer-reviewed
+- Verify findings with caution
+- Check if preprint has been published (CrossRef)
+- Note preprint version and date
+
+### arXiv
+
+Access via direct API or WebFetch:
+```python
+# Example search categories:
+# q-bio.QM (Quantitative Methods)
+# q-bio.GN (Genomics)
+# q-bio.MN (Molecular Networks)
+# cs.LG (Machine Learning)
+# stat.ML (Machine Learning Statistics)
+
+# Search format: category AND terms
+search_query = "cat:q-bio.QM AND ti:\"single cell sequencing\""
+```
+
+### Semantic Scholar
+
+Access via direct API (requires API key, or use free tier):
+- 200M+ papers across all fields
+- Excellent for cross-disciplinary searches
+- Provides citation graphs and paper recommendations
+- Use for finding highly influential papers
+
+### Specialized Biomedical Databases
+
+Use appropriate skills:
+- **ChEMBL**: `bioservices` skill for chemical bioactivity
+- **UniProt**: `gget` or `bioservices` skill for protein information
+- **KEGG**: `bioservices` skill for pathways and genes
+- **COSMIC**: `gget` skill for cancer mutations
+- **AlphaFold**: `gget alphafold` for protein structures
+- **PDB**: `gget` or direct API for experimental structures
+
+### Citation Chaining
+
+Expand search via citation networks:
+
+1. **Forward citations** (papers citing key papers):
+ - Use Google Scholar "Cited by"
+ - Use Semantic Scholar or OpenAlex APIs
+ - Identifies newer research building on seminal work
+
+2. **Backward citations** (references from key papers):
+ - Extract references from included papers
+ - Identify highly cited foundational work
+ - Find papers cited by multiple included studies
+
+## Citation Style Guide
+
+Detailed formatting guidelines are in `references/citation_styles.md`. Quick reference:
+
+### APA (7th Edition)
+- In-text: (Smith et al., 2023)
+- Reference: Smith, J. D., Johnson, M. L., & Williams, K. R. (2023). Title. *Journal*, *22*(4), 301-318. https://doi.org/10.xxx/yyy
+
+### Nature
+- In-text: Superscript numbers^1,2^
+- Reference: Smith, J. D., Johnson, M. L. & Williams, K. R. Title. *Nat. Rev. Drug Discov.* **22**, 301-318 (2023).
+
+### Vancouver
+- In-text: Superscript numbers^1,2^
+- Reference: Smith JD, Johnson ML, Williams KR. Title. Nat Rev Drug Discov. 2023;22(4):301-18.
+
+**Always verify citations** with verify_citations.py before finalizing.
+
+## Best Practices
+
+### Search Strategy
+1. **Use multiple databases** (minimum 3): Ensures comprehensive coverage
+2. **Include preprint servers**: Captures latest unpublished findings
+3. **Document everything**: Search strings, dates, result counts for reproducibility
+4. **Test and refine**: Run pilot searches, review results, adjust search terms
+
+### Screening and Selection
+1. **Use clear criteria**: Document inclusion/exclusion criteria before screening
+2. **Screen systematically**: Title → Abstract → Full text
+3. **Document exclusions**: Record reasons for excluding studies
+4. **Consider dual screening**: For systematic reviews, have two reviewers screen independently
+
+### Synthesis
+1. **Organize thematically**: Group by themes, NOT by individual studies
+2. **Synthesize across studies**: Compare, contrast, identify patterns
+3. **Be critical**: Evaluate quality and consistency of evidence
+4. **Identify gaps**: Note what's missing or understudied
+
+### Quality and Reproducibility
+1. **Assess study quality**: Use appropriate quality assessment tools
+2. **Verify all citations**: Run verify_citations.py script
+3. **Document methodology**: Provide enough detail for others to reproduce
+4. **Follow guidelines**: Use PRISMA for systematic reviews
+
+### Writing
+1. **Be objective**: Present evidence fairly, acknowledge limitations
+2. **Be systematic**: Follow structured template
+3. **Be specific**: Include numbers, statistics, effect sizes where available
+4. **Be clear**: Use clear headings, logical flow, thematic organization
+
+## Common Pitfalls to Avoid
+
+1. **Single database search**: Misses relevant papers; always search multiple databases
+2. **No search documentation**: Makes review irreproducible; document all searches
+3. **Study-by-study summary**: Lacks synthesis; organize thematically instead
+4. **Unverified citations**: Leads to errors; always run verify_citations.py
+5. **Too broad search**: Yields thousands of irrelevant results; refine with specific terms
+6. **Too narrow search**: Misses relevant papers; include synonyms and related terms
+7. **Ignoring preprints**: Misses latest findings; include bioRxiv, medRxiv, arXiv
+8. **No quality assessment**: Treats all evidence equally; assess and report quality
+9. **Publication bias**: Only positive results published; note potential bias
+10. **Outdated search**: Field evolves rapidly; clearly state search date
+
+## Example Workflow
+
+Complete workflow for a biomedical literature review:
+
+```bash
+# 1. Create review document from template
+cp assets/review_template.md crispr_sickle_cell_review.md
+
+# 2. Search multiple databases using appropriate skills
+# - Use gget skill for PubMed, bioRxiv
+# - Use direct API access for arXiv, Semantic Scholar
+# - Export results in JSON format
+
+# 3. Aggregate and process results
+python scripts/search_databases.py combined_results.json \
+ --deduplicate \
+ --rank citations \
+ --year-start 2015 \
+ --year-end 2024 \
+ --format markdown \
+ --output search_results.md \
+ --summary
+
+# 4. Screen results and extract data
+# - Manually screen titles, abstracts, full texts
+# - Extract key data into the review document
+# - Organize by themes
+
+# 5. Write the review following template structure
+# - Introduction with clear objectives
+# - Detailed methodology section
+# - Results organized thematically
+# - Critical discussion
+# - Clear conclusions
+
+# 6. Verify all citations
+python scripts/verify_citations.py crispr_sickle_cell_review.md
+
+# Review the citation report
+cat crispr_sickle_cell_review_citation_report.json
+
+# Fix any failed citations and re-verify
+python scripts/verify_citations.py crispr_sickle_cell_review.md
+
+# 7. Generate professional PDF
+python scripts/generate_pdf.py crispr_sickle_cell_review.md \
+ --citation-style nature \
+ --output crispr_sickle_cell_review.pdf
+
+# 8. Review final PDF and markdown outputs
+```
+
+## Integration with Other Skills
+
+This skill works seamlessly with other scientific skills:
+
+### Database Access Skills
+- **gget**: PubMed, bioRxiv, COSMIC, AlphaFold, Ensembl, UniProt
+- **bioservices**: ChEMBL, KEGG, Reactome, UniProt, PubChem
+- **datacommons-client**: Demographics, economics, health statistics
+
+### Analysis Skills
+- **pydeseq2**: RNA-seq differential expression (for methods sections)
+- **scanpy**: Single-cell analysis (for methods sections)
+- **anndata**: Single-cell data (for methods sections)
+- **biopython**: Sequence analysis (for background sections)
+
+### Visualization Skills
+- **matplotlib**: Generate figures and plots for review
+- **seaborn**: Statistical visualizations
+
+### Writing Skills
+- **brand-guidelines**: Apply institutional branding to PDF
+- **internal-comms**: Adapt review for different audiences
+
+## Resources
+
+### Bundled Resources
+
+**Scripts:**
+- `scripts/verify_citations.py`: Verify DOIs and generate formatted citations
+- `scripts/generate_pdf.py`: Convert markdown to professional PDF
+- `scripts/search_databases.py`: Process, deduplicate, and format search results
+
+**References:**
+- `references/citation_styles.md`: Detailed citation formatting guide (APA, Nature, Vancouver, Chicago, IEEE)
+- `references/database_strategies.md`: Comprehensive database search strategies
+
+**Assets:**
+- `assets/review_template.md`: Complete literature review template with all sections
+
+### External Resources
+
+**Guidelines:**
+- PRISMA (Systematic Reviews): http://www.prisma-statement.org/
+- Cochrane Handbook: https://training.cochrane.org/handbook
+- AMSTAR 2 (Review Quality): https://amstar.ca/
+
+**Tools:**
+- MeSH Browser: https://meshb.nlm.nih.gov/search
+- PubMed Advanced Search: https://pubmed.ncbi.nlm.nih.gov/advanced/
+- Boolean Search Guide: https://www.ncbi.nlm.nih.gov/books/NBK3827/
+
+**Citation Styles:**
+- APA Style: https://apastyle.apa.org/
+- Nature Portfolio: https://www.nature.com/nature-portfolio/editorial-policies/reporting-standards
+- NLM/Vancouver: https://www.nlm.nih.gov/bsd/uniform_requirements.html
+
+## Dependencies
+
+### Required Python Packages
+```bash
+pip install requests # For citation verification
+```
+
+### Required System Tools
+```bash
+# For PDF generation
+brew install pandoc # macOS
+apt-get install pandoc # Linux
+
+# For LaTeX (PDF generation)
+brew install --cask mactex # macOS
+apt-get install texlive-xetex # Linux
+```
+
+Check dependencies:
+```bash
+python scripts/generate_pdf.py --check-deps
+```
+
+## Summary
+
+This literature-review skill provides:
+
+1. **Systematic methodology** following academic best practices
+2. **Multi-database integration** via existing scientific skills
+3. **Citation verification** ensuring accuracy and credibility
+4. **Professional output** in markdown and PDF formats
+5. **Comprehensive guidance** covering the entire review process
+6. **Quality assurance** with verification and validation tools
+7. **Reproducibility** through detailed documentation requirements
+
+Conduct thorough, rigorous literature reviews that meet academic standards and provide comprehensive synthesis of current knowledge in any domain.
diff --git a/scientific-skills/literature-review/assets/review_template.md b/scientific-skills/literature-review/assets/review_template.md
new file mode 100644
index 0000000..601325b
--- /dev/null
+++ b/scientific-skills/literature-review/assets/review_template.md
@@ -0,0 +1,412 @@
+# [Literature Review Title]
+
+**Authors**: [Author Names and Affiliations]
+**Date**: [Date]
+**Review Type**: [Narrative / Systematic / Scoping / Meta-Analysis / Umbrella Review]
+**Review Protocol**: [PROSPERO ID if registered, or state "Not registered"]
+**PRISMA Compliance**: [Yes/No/Partial - specify which guidelines]
+
+---
+
+## Abstract
+
+**Background**: [Context and rationale]
+**Objectives**: [Primary and secondary objectives]
+**Methods**: [Databases, dates, selection criteria, quality assessment]
+**Results**: [n studies included; key findings by theme]
+**Conclusions**: [Main conclusions and implications]
+**Registration**: [PROSPERO ID or "Not registered"]
+**Keywords**: [5-8 keywords]
+
+---
+
+## 1. Introduction
+
+### 1.1 Background and Context
+
+[Provide background information on the topic. Establish why this literature review is important and timely. Discuss the broader context and current state of knowledge.]
+
+### 1.2 Scope and Objectives
+
+[Clearly define the scope of the review and state the specific objectives. What questions will this review address?]
+
+**Primary Research Questions:**
+1. [Research question 1]
+2. [Research question 2]
+3. [Research question 3]
+
+### 1.3 Significance
+
+[Explain the significance of this review. Why is it important to synthesize this literature now? What gaps does it fill?]
+
+---
+
+## 2. Methodology
+
+### 2.1 Protocol and Registration
+
+**Protocol**: [PROSPERO ID / OSF link / Not registered]
+**Deviations**: [Document any protocol deviations]
+**PRISMA**: [Checklist in Appendix B]
+
+### 2.2 Search Strategy
+
+**Databases:** [PubMed, Scopus, Web of Science, bioRxiv, etc.]
+**Supplementary:** [Citation chaining, grey literature, trial registries]
+
+**Search String Example:**
+```
+("CRISPR"[Title/Abstract] OR "Cas9"[Title/Abstract]) AND
+("disease"[MeSH Terms]) AND ("2015/01/01"[Date] : "2024/12/31"[Date])
+```
+
+**Dates:** [YYYY-MM-DD to YYYY-MM-DD] | **Executed:** [Date]
+**Validation:** [Key papers used to test search strategy]
+
+### 2.3 Tools and Software
+
+**Screening:** [Rayyan, Covidence, ASReview]
+**Analysis:** [VOSviewer, R, Python]
+**Citation Management:** [Zotero, Mendeley, EndNote]
+**AI Tools:** [Any AI-assisted tools used; document validation approach]
+
+### 2.4 Inclusion and Exclusion Criteria
+
+**Inclusion Criteria:**
+- [Criterion 1: e.g., Published between 2015-2024]
+- [Criterion 2: e.g., Peer-reviewed articles and preprints]
+- [Criterion 3: e.g., English language]
+- [Criterion 4: e.g., Human or animal studies]
+- [Criterion 5: e.g., Original research or systematic reviews]
+
+**Exclusion Criteria:**
+- [Criterion 1: e.g., Case reports with n<5]
+- [Criterion 2: e.g., Conference abstracts without full text]
+- [Criterion 3: e.g., Editorials and commentaries]
+- [Criterion 4: e.g., Duplicate publications]
+- [Criterion 5: e.g., Retracted articles]
+- [Criterion 6: e.g., Studies with unavailable full text after author contact]
+
+### 2.5 Study Selection
+
+**Reviewers:** [n independent reviewers] | **Conflict resolution:** [Method]
+**Inter-rater reliability:** [Cohen's kappa = X]
+
+**PRISMA Flow:**
+```
+Records identified: n=[X] → Deduplicated: n=[Y] →
+Title/abstract screened: n=[Y] → Full-text assessed: n=[Z] → Included: n=[N]
+```
+
+**Exclusion reasons:** [List with counts]
+
+### 2.6 Data Extraction
+
+**Method:** [Standardized form (Appendix E); pilot-tested on n studies]
+**Extractors:** [n independent] | **Verification:** [Double-checked]
+
+**Items:** Study ID, design, population, interventions/exposures, outcomes, statistics, funding, COI, bias domains
+
+**Missing data:** [Author contact protocol]
+
+### 2.7 Quality Assessment
+
+**Tool:** [Cochrane RoB 2.0 / ROBINS-I / Newcastle-Ottawa / AMSTAR 2 / JBI]
+**Method:** [2 independent reviewers; third for conflicts]
+**Rating:** [Low/Moderate/High risk of bias]
+**Publication bias:** [Funnel plots, Egger's test - if meta-analysis]
+
+### 2.8 Synthesis and Analysis
+
+**Approach:** [Narrative / Meta-analysis / Both]
+**Statistics** (if meta-analysis): Effect measures, heterogeneity (I², τ²), sensitivity analyses, subgroups
+**Software:** [RevMan, R, Stata]
+**Certainty:** [GRADE framework; factors: bias, inconsistency, indirectness, imprecision]
+
+---
+
+## 3. Results
+
+### 3.1 Study Selection
+
+**Summary:** [X records → Y deduplicated → Z full-text → N included (M in meta-analysis)]
+**Study types:** [RCTs: n=X, Observational: n=Y, Reviews: n=Z]
+**Years:** [Range; peak year]
+**Geography:** [Countries represented]
+**Source:** [Peer-reviewed: n=X, Preprints: n=Y]
+
+### 3.2 Bibliometric Overview
+
+[Optional: Trends, journal distribution, author networks, citations, keywords - if analyzed with VOSviewer or similar]
+
+### 3.3 Study Characteristics
+
+| Study | Year | Design | Sample Size | Key Methods | Main Findings | Quality |
+|-------|------|--------|-------------|-------------|---------------|---------|
+| First Author et al. | 2023 | [Type] | n=[X] | [Methods] | [Brief findings] | [Low/Mod/High RoB] |
+
+**Quality:** Low RoB: n=X ([%]); Moderate: n=Y ([%]); High: n=Z ([%])
+
+### 3.4 Thematic Synthesis
+
+[Organize by themes, NOT study-by-study. Synthesize across studies to identify consensus, controversies, and gaps.]
+
+#### 3.4.1 Theme 1: [Title]
+
+**Findings:** [Synthesis of key findings from multiple studies]
+**Supporting studies:** [X, Y, Z]
+**Contradictory evidence:** [If any]
+**Certainty:** [GRADE rating if applicable]
+
+### 3.5 Methodological Approaches
+
+**Common methods:** [Method 1 (n studies), Method 2 (n studies)]
+**Emerging techniques:** [New approaches observed]
+**Methodological quality:** [Overall assessment]
+
+### 3.6 Meta-Analysis Results
+
+[Include only if conducting meta-analysis]
+
+**Effect estimates:** [Primary/secondary outcomes with 95% CI, p-values]
+**Heterogeneity:** [I²=X%, τ²=Y, interpretation]
+**Subgroups & sensitivity:** [Key findings from analyses]
+**Publication bias:** [Funnel plot, Egger's p=X]
+**Forest plots:** [Include for primary outcomes]
+
+### 3.7 Knowledge Gaps
+
+**Knowledge:** [Unanswered research questions]
+**Methodological:** [Study design/measurement issues]
+**Translational:** [Research-to-practice gaps]
+**Populations:** [Underrepresented groups/contexts]
+
+---
+
+## 4. Discussion
+
+### 4.1 Main Findings
+
+[Synthesize key findings by research question]
+
+**Principal findings:** [Top 3-5 takeaways]
+**Consensus:** [Where studies agree]
+**Controversy:** [Conflicting results]
+
+### 4.2 Interpretation and Implications
+
+**Context:** [How findings advance/challenge current understanding]
+**Mechanisms:** [Potential explanations for observed patterns]
+
+**Implications for:**
+- **Practice:** [Actionable recommendations]
+- **Policy:** [If relevant]
+- **Research:** [Theoretical, methodological, priority directions]
+
+### 4.3 Strengths and Limitations
+
+**Strengths:** [Comprehensive search, rigorous methods, large evidence base, transparency]
+
+**Limitations:**
+- Search/selection: [Language bias, database coverage, grey literature, publication bias]
+- Methodological: [Heterogeneity, study quality]
+- Temporal: [Rapid evolution, search cutoff date]
+
+**Impact:** [How limitations affect conclusions]
+
+### 4.4 Comparison with Previous Reviews
+
+[If relevant: How does this review update/differ from prior reviews?]
+
+### 4.5 Future Research
+
+**Priority questions:**
+1. [Question] - Rationale, suggested approach, expected impact
+2. [Question] - Rationale, suggested approach, expected impact
+3. [Question] - Rationale, suggested approach, expected impact
+
+**Recommendations:** [Methodological improvements, understudied populations, emerging technologies]
+
+---
+
+## 5. Conclusions
+
+[Concise conclusions addressing research questions]
+
+1. [Conclusion directly addressing primary research question]
+2. [Key finding conclusion]
+3. [Gap/future direction conclusion]
+
+**Evidence certainty:** [High/Moderate/Low/Very Low]
+**Translation readiness:** [Ready / Needs more research / Preliminary]
+
+---
+
+## 6. Declarations
+
+### Author Contributions
+[CRediT taxonomy: Author 1 - Conceptualization, Methodology, Writing; Author 2 - Analysis, Review; etc.]
+
+### Funding
+[Grant details with numbers] OR [No funding received]
+
+### Conflicts of Interest
+[Author-specific declarations] OR [None]
+
+### Data Availability
+**Protocol:** [PROSPERO/OSF ID or "Not registered"]
+**Data/Code:** [Repository URL/DOI or "Available upon request"]
+**Materials:** [Search strategies (Appendix A), PRISMA checklist (Appendix B), extraction form (Appendix E)]
+
+### Acknowledgments
+[Contributors not meeting authorship criteria, librarians, patient involvement]
+
+---
+
+## 7. References
+
+[Use consistent style: APA / Nature / Vancouver]
+
+**Format examples:**
+
+APA: Author, A. A., & Author, B. B. (Year). Title. *Journal*, *volume*(issue), pages. https://doi.org/xx.xxxx
+
+Nature: Author, A. A. & Author, B. B. Title. *J. Name* **volume**, pages (year).
+
+Vancouver: Author AA, Author BB. Title. J Abbrev. Year;volume(issue):pages. doi:xx.xxxx
+
+1. [First reference]
+2. [Second reference]
+3. [Continue...]
+
+---
+
+## 8. Appendices
+
+### Appendix A: Search Strings
+
+**PubMed** (Date: YYYY-MM-DD; Results: n)
+```
+[Complete search string with operators and MeSH terms]
+```
+
+[Repeat for each database: Scopus, Web of Science, bioRxiv, etc.]
+
+### Appendix B: PRISMA Checklist
+
+| Section | Item | Reported? | Page |
+|---------|------|-----------|------|
+| Title | Identify as systematic review | Yes/No | # |
+| Abstract | Structured summary | Yes/No | # |
+| Methods | Eligibility, sources, search, selection, data, quality | Yes/No | # |
+| Results | Selection, characteristics, risk of bias, syntheses | Yes/No | # |
+| Discussion | Interpretation, limitations, conclusions | Yes/No | # |
+| Other | Registration, support, conflicts, availability | Yes/No | # |
+
+### Appendix C: Excluded Studies
+
+| Study | Year | Reason | Category |
+|-------|------|--------|----------|
+| Author et al. | Year | [Reason] | [Wrong population/outcome/design/etc.] |
+
+**Summary:** Wrong population (n=X), Wrong outcome (n=Y), etc.
+
+### Appendix D: Quality Assessment
+
+**Tool:** [Cochrane RoB 2.0 / ROBINS-I / Newcastle-Ottawa / etc.]
+
+| Study | Domain 1 | Domain 2 | Domain 3 | Overall |
+|-------|----------|----------|----------|---------|
+| Study 1 | Low | Low | Some concerns | Low |
+| Study 2 | [Score] | [Score] | [Score] | [Overall] |
+
+### Appendix E: Data Extraction Form
+
+```
+STUDY: Author______ Year______ DOI______
+DESIGN: □RCT □Cohort □Case-Control □Cross-sectional □Other______
+POPULATION: n=_____ Age_____ Setting_____
+INTERVENTION/EXPOSURE: _____
+OUTCOMES: Primary_____ Secondary_____
+RESULTS: Effect size_____ 95%CI_____ p=_____
+QUALITY: □Low □Moderate □High RoB
+FUNDING/COI: _____
+```
+
+### Appendix F: Meta-Analysis Details
+
+[Only if meta-analysis performed]
+
+**Software:** [R 4.x.x with meta/metafor packages / RevMan / Stata]
+**Model:** [Random-effects; justification]
+**Code:** [Link to repository]
+**Sensitivity analyses:** [Details]
+
+### Appendix G: Author Contacts
+
+| Study | Contact Date | Response | Data Received |
+|-------|--------------|----------|---------------|
+| Author et al. | YYYY-MM-DD | Yes/No | Yes/No/Partial |
+
+---
+
+## 9. Supplementary Materials
+
+[If applicable]
+
+**Tables:** S1 (Full study characteristics), S2 (Quality scores), S3 (Subgroups), S4 (Sensitivity)
+**Figures:** S1 (PRISMA diagram), S2 (Risk of bias), S3 (Funnel plot), S4 (Forest plots), S5 (Networks)
+**Data:** S1 (Extraction file), S2 (Search results), S3 (Analysis code), S4 (PRISMA checklist)
+**Repository:** [OSF/GitHub/Zenodo URL with DOI]
+
+---
+
+## Review Metadata
+
+**Registration:** [Registry] ID: [Number] (Date: YYYY-MM-DD)
+**Search dates:** Initial: [Date]; Updated: [Date]
+**Version:** [1.0] | **Last updated:** [Date]
+
+**Quality checks:**
+- [ ] Citations verified with verify_citations.py
+- [ ] PRISMA checklist completed
+- [ ] Search reproducible
+- [ ] Independent data verification
+- [ ] Code peer-reviewed
+- [ ] All authors approved
+
+---
+
+## Usage Notes
+
+**Review type adaptations:**
+- Systematic Review: Use all sections
+- Meta-Analysis: Include sections 3.6, Appendix F
+- Narrative Review: May omit some methodology detail
+- Scoping Review: Follow PRISMA-ScR, may omit quality assessment
+
+**Key principles:**
+1. Remove all [bracketed placeholders]
+2. Follow PRISMA 2020 guidelines
+3. Pre-register when feasible (PROSPERO/OSF)
+4. Use thematic synthesis, not study-by-study
+5. Be transparent and reproducible
+6. Verify all DOIs before submission
+7. Make data/code openly available
+
+**Common pitfalls to avoid:**
+- Don't list studies - synthesize them
+- Don't cherry-pick results
+- Don't ignore limitations
+- Don't overstate conclusions
+- Don't skip publication bias assessment
+
+**Resources:**
+- PRISMA 2020: http://prisma-statement.org/
+- PROSPERO: https://www.crd.york.ac.uk/prospero/
+- Cochrane Handbook: https://training.cochrane.org/handbook
+- GRADE: https://www.gradeworkinggroup.org/
+
+**DELETE THIS SECTION FROM YOUR FINAL REVIEW**
+
+---
diff --git a/scientific-skills/literature-review/references/citation_styles.md b/scientific-skills/literature-review/references/citation_styles.md
new file mode 100644
index 0000000..0a72cab
--- /dev/null
+++ b/scientific-skills/literature-review/references/citation_styles.md
@@ -0,0 +1,166 @@
+# Citation Styles Reference
+
+This document provides detailed guidelines for formatting citations in various academic styles commonly used in literature reviews.
+
+## APA Style (7th Edition)
+
+### Journal Articles
+
+**Format**: Author, A. A., Author, B. B., & Author, C. C. (Year). Title of article. *Title of Periodical*, *volume*(issue), page range. https://doi.org/xx.xxx/yyyy
+
+**Example**: Smith, J. D., Johnson, M. L., & Williams, K. R. (2023). Machine learning approaches in drug discovery. *Nature Reviews Drug Discovery*, *22*(4), 301-318. https://doi.org/10.1038/nrd.2023.001
+
+### Books
+
+**Format**: Author, A. A. (Year). *Title of work: Capital letter also for subtitle*. Publisher Name. https://doi.org/xxxx
+
+**Example**: Kumar, V., Abbas, A. K., & Aster, J. C. (2021). *Robbins and Cotran pathologic basis of disease* (10th ed.). Elsevier.
+
+### Book Chapters
+
+**Format**: Author, A. A., & Author, B. B. (Year). Title of chapter. In E. E. Editor & F. F. Editor (Eds.), *Title of book* (pp. xx-xx). Publisher.
+
+**Example**: Brown, P. O., & Botstein, D. (2020). Exploring the new world of the genome with DNA microarrays. In M. B. Eisen & P. O. Brown (Eds.), *DNA microarrays: A molecular cloning manual* (pp. 1-45). Cold Spring Harbor Laboratory Press.
+
+### Preprints
+
+**Format**: Author, A. A., & Author, B. B. (Year). Title of preprint. *Repository Name*. https://doi.org/xxxx
+
+**Example**: Zhang, Y., Chen, L., & Wang, H. (2024). Novel therapeutic targets in Alzheimer's disease. *bioRxiv*. https://doi.org/10.1101/2024.01.001
+
+### Conference Papers
+
+**Format**: Author, A. A. (Year, Month day-day). Title of paper. In E. E. Editor (Ed.), *Title of conference proceedings* (pp. xx-xx). Publisher. https://doi.org/xxxx
+
+---
+
+## Nature Style
+
+### Journal Articles
+
+**Format**: Author, A. A., Author, B. B. & Author, C. C. Title of article. *J. Name* **volume**, page range (year).
+
+**Example**: Smith, J. D., Johnson, M. L. & Williams, K. R. Machine learning approaches in drug discovery. *Nat. Rev. Drug Discov.* **22**, 301-318 (2023).
+
+### Books
+
+**Format**: Author, A. A. & Author, B. B. *Book Title* (Publisher, Year).
+
+**Example**: Kumar, V., Abbas, A. K. & Aster, J. C. *Robbins and Cotran Pathologic Basis of Disease* 10th edn (Elsevier, 2021).
+
+### Multiple Authors
+
+- 1-2 authors: List all
+- 3+ authors: List first author followed by "et al."
+
+**Example**: Zhang, Y. et al. Novel therapeutic targets in Alzheimer's disease. *bioRxiv* https://doi.org/10.1101/2024.01.001 (2024).
+
+---
+
+## Chicago Style (Author-Date)
+
+### Journal Articles
+
+**Format**: Author, First Name Middle Initial. Year. "Article Title." *Journal Title* volume, no. issue (Month): page range. https://doi.org/xxxx.
+
+**Example**: Smith, John D., Mary L. Johnson, and Karen R. Williams. 2023. "Machine Learning Approaches in Drug Discovery." *Nature Reviews Drug Discovery* 22, no. 4 (April): 301-318. https://doi.org/10.1038/nrd.2023.001.
+
+### Books
+
+**Format**: Author, First Name Middle Initial. Year. *Book Title: Subtitle*. Edition. Place: Publisher.
+
+**Example**: Kumar, Vinay, Abul K. Abbas, and Jon C. Aster. 2021. *Robbins and Cotran Pathologic Basis of Disease*. 10th ed. Philadelphia: Elsevier.
+
+---
+
+## Vancouver Style (Numbered)
+
+### Journal Articles
+
+**Format**: Author AA, Author BB, Author CC. Title of article. Abbreviated Journal Name. Year;volume(issue):page range.
+
+**Example**: Smith JD, Johnson ML, Williams KR. Machine learning approaches in drug discovery. Nat Rev Drug Discov. 2023;22(4):301-18.
+
+### Books
+
+**Format**: Author AA, Author BB. Title of book. Edition. Place: Publisher; Year.
+
+**Example**: Kumar V, Abbas AK, Aster JC. Robbins and Cotran pathologic basis of disease. 10th ed. Philadelphia: Elsevier; 2021.
+
+### Citation in Text
+
+Use superscript numbers in order of appearance: "Recent studies^1,2^ have shown..."
+
+---
+
+## IEEE Style
+
+### Journal Articles
+
+**Format**: [#] A. A. Author, B. B. Author, and C. C. Author, "Title of article," *Abbreviated Journal Name*, vol. x, no. x, pp. xxx-xxx, Month Year.
+
+**Example**: [1] J. D. Smith, M. L. Johnson, and K. R. Williams, "Machine learning approaches in drug discovery," *Nat. Rev. Drug Discov.*, vol. 22, no. 4, pp. 301-318, Apr. 2023.
+
+### Books
+
+**Format**: [#] A. A. Author, *Title of Book*, xth ed. City, State: Publisher, Year.
+
+**Example**: [2] V. Kumar, A. K. Abbas, and J. C. Aster, *Robbins and Cotran Pathologic Basis of Disease*, 10th ed. Philadelphia, PA: Elsevier, 2021.
+
+---
+
+## Common Abbreviations for Journal Names
+
+- Nature: Nat.
+- Science: Science
+- Cell: Cell
+- Nature Reviews Drug Discovery: Nat. Rev. Drug Discov.
+- Journal of the American Chemical Society: J. Am. Chem. Soc.
+- Proceedings of the National Academy of Sciences: Proc. Natl. Acad. Sci. U.S.A.
+- PLOS ONE: PLoS ONE
+- Bioinformatics: Bioinformatics
+- Nucleic Acids Research: Nucleic Acids Res.
+
+---
+
+## DOI Best Practices
+
+1. **Always verify DOIs**: Use the verify_citations.py script to check all DOIs
+2. **Format as URLs**: https://doi.org/10.xxxx/yyyy (preferred over doi:10.xxxx/yyyy)
+3. **No period after DOI**: DOI should be the last element without trailing punctuation
+4. **Resolve redirects**: Check that DOIs resolve to the correct article
+
+---
+
+## In-Text Citation Guidelines
+
+### APA Style
+- (Smith et al., 2023)
+- Smith et al. (2023) demonstrated...
+- Multiple citations: (Brown, 2022; Smith et al., 2023; Zhang, 2024)
+
+### Nature Style
+- Superscript numbers: Recent studies^1,2^ have shown...
+- Or: Recent studies (refs 1,2) have shown...
+
+### Chicago Style
+- (Smith, Johnson, and Williams 2023)
+- Smith, Johnson, and Williams (2023) found...
+
+---
+
+## Reference List Organization
+
+### By Citation Style
+- **APA, Chicago**: Alphabetical by first author's last name
+- **Nature, Vancouver, IEEE**: Numerical order of first appearance in text
+
+### Hanging Indents
+Most styles use hanging indents where the first line is flush left and subsequent lines are indented.
+
+### Consistency
+Maintain consistent formatting throughout:
+- Capitalization (title case vs. sentence case)
+- Journal name abbreviations
+- DOI presentation
+- Author name format
diff --git a/scientific-skills/literature-review/references/database_strategies.md b/scientific-skills/literature-review/references/database_strategies.md
new file mode 100644
index 0000000..e4c327a
--- /dev/null
+++ b/scientific-skills/literature-review/references/database_strategies.md
@@ -0,0 +1,381 @@
+# Literature Database Search Strategies
+
+This document provides comprehensive guidance for searching multiple literature databases systematically and effectively.
+
+## Available Databases and Skills
+
+### Biomedical & Life Sciences
+
+#### PubMed / PubMed Central
+- **Access**: Use `gget` skill or WebFetch tool
+- **Coverage**: 35M+ citations in biomedical literature
+- **Best for**: Clinical studies, biomedical research, genetics, molecular biology
+- **Search tips**: Use MeSH terms, Boolean operators (AND, OR, NOT), field tags [Title], [Author]
+- **Example**: `"CRISPR"[Title] AND "gene editing"[Title/Abstract] AND 2020:2024[Publication Date]`
+
+#### bioRxiv / medRxiv
+- **Access**: Use `gget` skill or direct API
+- **Coverage**: Preprints in biology and medicine
+- **Best for**: Latest unpublished research, cutting-edge findings
+- **Note**: Not peer-reviewed; verify findings with caution
+- **Search tips**: Search by category (bioinformatics, genomics, etc.)
+
+### General Scientific Literature
+
+#### arXiv
+- **Access**: Direct API access
+- **Coverage**: Preprints in physics, mathematics, computer science, quantitative biology
+- **Best for**: Computational methods, bioinformatics algorithms, theoretical work
+- **Categories**: q-bio (Quantitative Biology), cs.LG (Machine Learning), stat.ML (Statistics)
+- **Search format**: `cat:q-bio.QM AND title:"single cell"`
+
+#### Semantic Scholar
+- **Access**: Direct API (requires API key)
+- **Coverage**: 200M+ papers across all fields
+- **Best for**: Cross-disciplinary searches, citation graphs, paper recommendations
+- **Features**: Influential citations, paper summaries, related papers
+- **Rate limits**: 100 requests/5 minutes with API key
+
+#### Google Scholar
+- **Access**: Web scraping (use cautiously) or manual search
+- **Coverage**: Comprehensive across all fields
+- **Best for**: Finding highly cited papers, conference proceedings, theses
+- **Limitations**: No official API, rate limiting
+- **Export**: Use "Cite" feature for formatted citations
+
+### Specialized Databases
+
+#### ChEMBL / PubChem
+- **Access**: Use `gget` skill or `bioservices` skill
+- **Coverage**: Chemical compounds, bioactivity data, drug molecules
+- **Best for**: Drug discovery, chemical biology, medicinal chemistry
+- **ChEMBL**: 2M+ compounds, bioactivity data
+- **PubChem**: 110M+ compounds, assay data
+
+#### UniProt
+- **Access**: Use `gget` skill or `bioservices` skill
+- **Coverage**: Protein sequence and functional information
+- **Best for**: Protein research, sequence analysis, functional annotations
+- **Search by**: Protein name, gene name, organism, function
+
+#### KEGG (Kyoto Encyclopedia of Genes and Genomes)
+- **Access**: Use `bioservices` skill
+- **Coverage**: Pathways, diseases, drugs, genes
+- **Best for**: Pathway analysis, systems biology, metabolic research
+
+#### COSMIC (Catalogue of Somatic Mutations in Cancer)
+- **Access**: Use `gget` skill or direct download
+- **Coverage**: Cancer genomics, somatic mutations
+- **Best for**: Cancer research, mutation analysis
+
+#### AlphaFold Database
+- **Access**: Use `gget` skill with `alphafold` command
+- **Coverage**: 200M+ protein structure predictions
+- **Best for**: Structural biology, protein modeling
+
+#### PDB (Protein Data Bank)
+- **Access**: Use `gget` or direct API
+- **Coverage**: Experimental 3D structures of proteins, nucleic acids
+- **Best for**: Structural biology, drug design, molecular modeling
+
+### Citation & Reference Management
+
+#### OpenAlex
+- **Access**: Direct API (free, no key required)
+- **Coverage**: 250M+ works, comprehensive metadata
+- **Best for**: Citation analysis, author disambiguation, institutional research
+- **Features**: Open access, excellent for bibliometrics
+
+#### Dimensions
+- **Access**: Free tier available
+- **Coverage**: Publications, grants, patents, clinical trials
+- **Best for**: Research impact, funding analysis, translational research
+
+---
+
+## Search Strategy Framework
+
+### 1. Define Research Question (PICO Framework)
+
+For clinical/biomedical reviews:
+- **P**opulation: Who is the study about?
+- **I**ntervention: What is being tested?
+- **C**omparison: What is it compared to?
+- **O**utcome: What are the results?
+
+**Example**: "What is the efficacy of CRISPR-Cas9 gene therapy (I) for treating sickle cell disease (P) compared to standard care (C) in improving patient outcomes (O)?"
+
+### 2. Develop Search Terms
+
+#### Primary Concepts
+Identify 2-4 main concepts from your research question.
+
+**Example**:
+- Concept 1: CRISPR, Cas9, gene editing
+- Concept 2: sickle cell disease, SCD, hemoglobin disorders
+- Concept 3: gene therapy, therapeutic editing
+
+#### Synonyms & Related Terms
+List alternative terms, abbreviations, and related concepts.
+
+**Tool**: Use MeSH (Medical Subject Headings) browser for standardized terms
+
+#### Boolean Operators
+- **AND**: Narrows search (must include both terms)
+- **OR**: Broadens search (includes either term)
+- **NOT**: Excludes terms
+
+**Example**: `(CRISPR OR Cas9 OR "gene editing") AND ("sickle cell" OR SCD) AND therapy`
+
+#### Wildcards & Truncation
+- `*` or `%`: Matches any characters
+- `?`: Matches single character
+
+**Example**: `genom*` matches genomic, genomics, genome
+
+### 3. Set Inclusion/Exclusion Criteria
+
+#### Inclusion Criteria
+- **Date range**: e.g., 2015-2024 (last 10 years)
+- **Language**: English (or specify multilingual)
+- **Publication type**: Peer-reviewed articles, reviews, preprints
+- **Study design**: RCTs, cohort studies, meta-analyses
+- **Population**: Human, animal models, in vitro
+
+#### Exclusion Criteria
+- Case reports (n<5)
+- Conference abstracts without full text
+- Non-original research (editorials, commentaries)
+- Duplicate publications
+- Retracted articles
+
+### 4. Database Selection Strategy
+
+#### Multi-Database Approach
+Search at least 3 complementary databases:
+
+1. **Primary database**: PubMed (biomedical) or arXiv (computational)
+2. **Preprint server**: bioRxiv/medRxiv or arXiv
+3. **Comprehensive database**: Semantic Scholar or Google Scholar
+4. **Specialized database**: ChEMBL, UniProt, or field-specific
+
+#### Database-Specific Syntax
+
+| Database | Field Tags | Example |
+|----------|-----------|---------|
+| PubMed | [Title], [Author], [MeSH] | "CRISPR"[Title] AND 2020:2024[DP] |
+| arXiv | ti:, au:, cat: | ti:"machine learning" AND cat:q-bio.QM |
+| Semantic Scholar | title:, author:, year: | title:"deep learning" year:2020-2024 |
+
+---
+
+## Search Execution Workflow
+
+### Phase 1: Pilot Search
+1. Run initial search with broad terms
+2. Review first 50 results for relevance
+3. Note common keywords and MeSH terms
+4. Refine search strategy
+
+### Phase 2: Comprehensive Search
+1. Execute refined searches across all selected databases
+2. Export results in standard format (RIS, BibTeX, JSON)
+3. Document search strings and date for each database
+4. Record number of results per database
+
+### Phase 3: Deduplication
+1. Import all results into a single file
+2. Use `search_databases.py --deduplicate` to remove duplicates
+3. Identify duplicates by DOI (primary) or title (fallback)
+4. Keep the version with most complete metadata
+
+### Phase 4: Screening
+1. **Title screening**: Review titles, exclude obviously irrelevant
+2. **Abstract screening**: Read abstracts, apply inclusion/exclusion criteria
+3. **Full-text screening**: Obtain and review full texts
+4. Document reasons for exclusion at each stage
+
+### Phase 5: Quality Assessment
+1. Assess study quality using appropriate tools:
+ - **RCTs**: Cochrane Risk of Bias tool
+ - **Observational**: Newcastle-Ottawa Scale
+ - **Systematic reviews**: AMSTAR 2
+2. Grade quality of evidence (high, moderate, low, very low)
+3. Consider excluding very low-quality studies
+
+---
+
+## Search Documentation Template
+
+### Required Documentation
+All searches must be documented for reproducibility:
+
+```markdown
+## Search Strategy
+
+### Database: PubMed
+- **Date searched**: 2024-10-25
+- **Date range**: 2015-01-01 to 2024-10-25
+- **Search string**:
+ ```
+ ("CRISPR"[Title] OR "Cas9"[Title] OR "gene editing"[Title/Abstract])
+ AND ("sickle cell disease"[MeSH] OR "SCD"[Title/Abstract])
+ AND ("gene therapy"[MeSH] OR "therapeutic editing"[Title/Abstract])
+ AND 2015:2024[Publication Date]
+ AND English[Language]
+ ```
+- **Results**: 247 articles
+- **After deduplication**: 189 articles
+
+### Database: bioRxiv
+- **Date searched**: 2024-10-25
+- **Date range**: 2015-01-01 to 2024-10-25
+- **Search string**: "CRISPR" AND "sickle cell" (in title/abstract)
+- **Results**: 34 preprints
+- **After deduplication**: 28 preprints
+
+### Total Unique Articles
+- **Combined results**: 217 unique articles
+- **After title screening**: 156 articles
+- **After abstract screening**: 89 articles
+- **After full-text screening**: 52 articles included in review
+```
+
+---
+
+## Advanced Search Techniques
+
+### Citation Chaining
+
+#### Forward Citation Search
+Find papers that cite a key paper:
+- Use Google Scholar "Cited by" feature
+- Use OpenAlex or Semantic Scholar APIs
+- Identifies newer research building on seminal work
+
+#### Backward Citation Search
+Review references in key papers:
+- Extract references from included papers
+- Search for highly cited references
+- Identifies foundational research
+
+### Snowball Sampling
+1. Start with 3-5 highly relevant papers
+2. Extract all their references
+3. Check which references are cited by multiple papers
+4. Review those high-overlap references
+5. Repeat for newly identified key papers
+
+### Author Search
+Follow prolific authors in the field:
+- Search by author name across databases
+- Check author profiles (ORCID, Google Scholar)
+- Review recent publications and preprints
+
+### Related Article Features
+Many databases suggest related articles:
+- PubMed "Similar articles"
+- Semantic Scholar "Recommended papers"
+- Use to discover papers missed by keyword search
+
+---
+
+## Quality Control Checklist
+
+### Before Searching
+- [ ] Research question clearly defined
+- [ ] PICO criteria established (if applicable)
+- [ ] Search terms and synonyms listed
+- [ ] Inclusion/exclusion criteria documented
+- [ ] Target databases selected (minimum 3)
+- [ ] Date range determined
+
+### During Searching
+- [ ] Search string tested and refined
+- [ ] Results exported with complete metadata
+- [ ] Search parameters documented
+- [ ] Number of results recorded per database
+- [ ] Search date recorded
+
+### After Searching
+- [ ] Duplicates removed
+- [ ] Screening protocol followed
+- [ ] Reasons for exclusion documented
+- [ ] Quality assessment completed
+- [ ] All citations verified with verify_citations.py
+- [ ] Search methodology documented in review
+
+---
+
+## Common Pitfalls to Avoid
+
+1. **Too narrow search**: Missing relevant papers
+ - Solution: Include synonyms, related terms, broader concepts
+
+2. **Too broad search**: Thousands of irrelevant results
+ - Solution: Add specific concepts with AND, use field tags
+
+3. **Single database**: Incomplete coverage
+ - Solution: Search minimum 3 complementary databases
+
+4. **Ignoring preprints**: Missing latest findings
+ - Solution: Include bioRxiv, medRxiv, or arXiv
+
+5. **No documentation**: Irreproducible search
+ - Solution: Document every search string, date, and result count
+
+6. **Manual deduplication**: Time-consuming and error-prone
+ - Solution: Use search_databases.py script
+
+7. **Unverified citations**: Broken DOIs, incorrect metadata
+ - Solution: Run verify_citations.py on final reference list
+
+8. **Publication bias**: Only including published positive results
+ - Solution: Search trial registries, contact authors for unpublished data
+
+---
+
+## Example Multi-Database Search Workflow
+
+```python
+# Example workflow using available skills
+
+# 1. Search PubMed via gget
+search_term = "CRISPR AND sickle cell disease"
+# Use gget search pubmed search_term
+
+# 2. Search bioRxiv
+# Use gget search biorxiv search_term
+
+# 3. Search arXiv for computational papers
+# Search arXiv with: cat:q-bio AND "CRISPR" AND "sickle cell"
+
+# 4. Search Semantic Scholar via API
+# Use semantic scholar API with search query
+
+# 5. Aggregate and deduplicate results
+# python search_databases.py combined_results.json --deduplicate --format markdown --output review_papers.md
+
+# 6. Verify all citations
+# python verify_citations.py review_papers.md
+
+# 7. Generate final PDF
+# python generate_pdf.py review_papers.md --citation-style nature
+```
+
+---
+
+## Resources
+
+### MeSH Browser
+https://meshb.nlm.nih.gov/search
+
+### Boolean Search Tutorial
+https://www.ncbi.nlm.nih.gov/books/NBK3827/
+
+### Citation Style Guides
+See references/citation_styles.md in this skill
+
+### PRISMA Guidelines
+Preferred Reporting Items for Systematic Reviews and Meta-Analyses:
+http://www.prisma-statement.org/
diff --git a/scientific-skills/literature-review/scripts/generate_pdf.py b/scientific-skills/literature-review/scripts/generate_pdf.py
new file mode 100644
index 0000000..b9cc7dd
--- /dev/null
+++ b/scientific-skills/literature-review/scripts/generate_pdf.py
@@ -0,0 +1,176 @@
+#!/usr/bin/env python3
+"""
+PDF Generation Script for Literature Reviews
+Converts markdown files to professionally formatted PDFs with proper styling.
+"""
+
+import subprocess
+import sys
+import os
+from pathlib import Path
+
+def generate_pdf(
+ markdown_file: str,
+ output_pdf: str = None,
+ citation_style: str = "apa",
+ template: str = None,
+ toc: bool = True,
+ number_sections: bool = True
+) -> bool:
+ """
+ Generate a PDF from a markdown file using pandoc.
+
+ Args:
+ markdown_file: Path to the markdown file
+ output_pdf: Path for output PDF (defaults to same name as markdown)
+ citation_style: Citation style (apa, nature, chicago, etc.)
+ template: Path to custom LaTeX template
+ toc: Include table of contents
+ number_sections: Number the sections
+
+ Returns:
+ True if successful, False otherwise
+ """
+
+ # Verify markdown file exists
+ if not os.path.exists(markdown_file):
+ print(f"Error: Markdown file not found: {markdown_file}")
+ return False
+
+ # Set default output path
+ if output_pdf is None:
+ output_pdf = Path(markdown_file).with_suffix('.pdf')
+
+ # Check if pandoc is installed
+ try:
+ subprocess.run(['pandoc', '--version'], capture_output=True, check=True)
+ except (subprocess.CalledProcessError, FileNotFoundError):
+ print("Error: pandoc is not installed.")
+ print("Install with: brew install pandoc (macOS) or apt-get install pandoc (Linux)")
+ return False
+
+ # Build pandoc command
+ cmd = [
+ 'pandoc',
+ markdown_file,
+ '-o', str(output_pdf),
+ '--pdf-engine=xelatex', # Better Unicode support
+ '-V', 'geometry:margin=1in',
+ '-V', 'fontsize=11pt',
+ '-V', 'colorlinks=true',
+ '-V', 'linkcolor=blue',
+ '-V', 'urlcolor=blue',
+ '-V', 'citecolor=blue',
+ ]
+
+ # Add table of contents
+ if toc:
+ cmd.extend(['--toc', '--toc-depth=3'])
+
+ # Add section numbering
+ if number_sections:
+ cmd.append('--number-sections')
+
+ # Add citation processing if bibliography exists
+ bib_file = Path(markdown_file).with_suffix('.bib')
+ if bib_file.exists():
+ cmd.extend([
+ '--citeproc',
+ '--bibliography', str(bib_file),
+ '--csl', f'{citation_style}.csl' if not citation_style.endswith('.csl') else citation_style
+ ])
+
+ # Add custom template if provided
+ if template and os.path.exists(template):
+ cmd.extend(['--template', template])
+
+ # Execute pandoc
+ try:
+ print(f"Generating PDF: {output_pdf}")
+ print(f"Command: {' '.join(cmd)}")
+ result = subprocess.run(cmd, capture_output=True, text=True, check=True)
+ print(f"✓ PDF generated successfully: {output_pdf}")
+ return True
+ except subprocess.CalledProcessError as e:
+ print(f"Error generating PDF:")
+ print(f"STDOUT: {e.stdout}")
+ print(f"STDERR: {e.stderr}")
+ return False
+
+def check_dependencies():
+ """Check if required dependencies are installed."""
+ dependencies = {
+ 'pandoc': 'pandoc --version',
+ 'xelatex': 'xelatex --version'
+ }
+
+ missing = []
+ for name, cmd in dependencies.items():
+ try:
+ subprocess.run(cmd.split(), capture_output=True, check=True)
+ print(f"✓ {name} is installed")
+ except (subprocess.CalledProcessError, FileNotFoundError):
+ print(f"✗ {name} is NOT installed")
+ missing.append(name)
+
+ if missing:
+ print("\n" + "="*60)
+ print("Missing dependencies:")
+ for dep in missing:
+ if dep == 'pandoc':
+ print(" - pandoc: brew install pandoc (macOS) or apt-get install pandoc (Linux)")
+ elif dep == 'xelatex':
+ print(" - xelatex: brew install --cask mactex (macOS) or apt-get install texlive-xetex (Linux)")
+ return False
+
+ return True
+
+def main():
+ """Command-line interface."""
+ if len(sys.argv) < 2:
+ print("Usage: python generate_pdf.py [output_pdf] [--citation-style STYLE]")
+ print("\nOptions:")
+ print(" --citation-style STYLE Citation style (default: apa)")
+ print(" --no-toc Disable table of contents")
+ print(" --no-numbers Disable section numbering")
+ print(" --check-deps Check if dependencies are installed")
+ sys.exit(1)
+
+ # Check dependencies mode
+ if '--check-deps' in sys.argv:
+ check_dependencies()
+ sys.exit(0)
+
+ # Parse arguments
+ markdown_file = sys.argv[1]
+ output_pdf = sys.argv[2] if len(sys.argv) > 2 and not sys.argv[2].startswith('--') else None
+
+ citation_style = 'apa'
+ toc = True
+ number_sections = True
+
+ # Parse optional flags
+ if '--citation-style' in sys.argv:
+ idx = sys.argv.index('--citation-style')
+ if idx + 1 < len(sys.argv):
+ citation_style = sys.argv[idx + 1]
+
+ if '--no-toc' in sys.argv:
+ toc = False
+
+ if '--no-numbers' in sys.argv:
+ number_sections = False
+
+ # Generate PDF
+ success = generate_pdf(
+ markdown_file,
+ output_pdf,
+ citation_style=citation_style,
+ toc=toc,
+ number_sections=number_sections
+ )
+
+ sys.exit(0 if success else 1)
+
+if __name__ == "__main__":
+ main()
diff --git a/scientific-skills/literature-review/scripts/search_databases.py b/scientific-skills/literature-review/scripts/search_databases.py
new file mode 100644
index 0000000..19081cd
--- /dev/null
+++ b/scientific-skills/literature-review/scripts/search_databases.py
@@ -0,0 +1,303 @@
+#!/usr/bin/env python3
+"""
+Literature Database Search Script
+Searches multiple literature databases and aggregates results.
+"""
+
+import json
+import sys
+from typing import Dict, List
+from datetime import datetime
+
+def format_search_results(results: List[Dict], output_format: str = 'json') -> str:
+ """
+ Format search results for output.
+
+ Args:
+ results: List of search results
+ output_format: Format (json, markdown, or bibtex)
+
+ Returns:
+ Formatted string
+ """
+ if output_format == 'json':
+ return json.dumps(results, indent=2)
+
+ elif output_format == 'markdown':
+ md = f"# Literature Search Results\n\n"
+ md += f"**Search Date**: {datetime.now().strftime('%Y-%m-%d %H:%M')}\n"
+ md += f"**Total Results**: {len(results)}\n\n"
+
+ for i, result in enumerate(results, 1):
+ md += f"## {i}. {result.get('title', 'Untitled')}\n\n"
+ md += f"**Authors**: {result.get('authors', 'Unknown')}\n\n"
+ md += f"**Year**: {result.get('year', 'N/A')}\n\n"
+ md += f"**Source**: {result.get('source', 'Unknown')}\n\n"
+
+ if result.get('abstract'):
+ md += f"**Abstract**: {result['abstract']}\n\n"
+
+ if result.get('doi'):
+ md += f"**DOI**: [{result['doi']}](https://doi.org/{result['doi']})\n\n"
+
+ if result.get('url'):
+ md += f"**URL**: {result['url']}\n\n"
+
+ if result.get('citations'):
+ md += f"**Citations**: {result['citations']}\n\n"
+
+ md += "---\n\n"
+
+ return md
+
+ elif output_format == 'bibtex':
+ bibtex = ""
+ for i, result in enumerate(results, 1):
+ entry_type = result.get('type', 'article')
+ cite_key = f"{result.get('first_author', 'unknown')}{result.get('year', '0000')}"
+
+ bibtex += f"@{entry_type}{{{cite_key},\n"
+ bibtex += f" title = {{{result.get('title', '')}}},\n"
+ bibtex += f" author = {{{result.get('authors', '')}}},\n"
+ bibtex += f" year = {{{result.get('year', '')}}},\n"
+
+ if result.get('journal'):
+ bibtex += f" journal = {{{result['journal']}}},\n"
+
+ if result.get('volume'):
+ bibtex += f" volume = {{{result['volume']}}},\n"
+
+ if result.get('pages'):
+ bibtex += f" pages = {{{result['pages']}}},\n"
+
+ if result.get('doi'):
+ bibtex += f" doi = {{{result['doi']}}},\n"
+
+ bibtex += "}\n\n"
+
+ return bibtex
+
+ else:
+ raise ValueError(f"Unknown format: {output_format}")
+
+def deduplicate_results(results: List[Dict]) -> List[Dict]:
+ """
+ Remove duplicate results based on DOI or title.
+
+ Args:
+ results: List of search results
+
+ Returns:
+ Deduplicated list
+ """
+ seen_dois = set()
+ seen_titles = set()
+ unique_results = []
+
+ for result in results:
+ doi = result.get('doi', '').lower().strip()
+ title = result.get('title', '').lower().strip()
+
+ # Check DOI first (more reliable)
+ if doi and doi in seen_dois:
+ continue
+
+ # Check title as fallback
+ if not doi and title in seen_titles:
+ continue
+
+ # Add to results
+ if doi:
+ seen_dois.add(doi)
+ if title:
+ seen_titles.add(title)
+
+ unique_results.append(result)
+
+ return unique_results
+
+def rank_results(results: List[Dict], criteria: str = 'citations') -> List[Dict]:
+ """
+ Rank results by specified criteria.
+
+ Args:
+ results: List of search results
+ criteria: Ranking criteria (citations, year, relevance)
+
+ Returns:
+ Ranked list
+ """
+ if criteria == 'citations':
+ return sorted(results, key=lambda x: x.get('citations', 0), reverse=True)
+ elif criteria == 'year':
+ return sorted(results, key=lambda x: x.get('year', '0'), reverse=True)
+ elif criteria == 'relevance':
+ return sorted(results, key=lambda x: x.get('relevance_score', 0), reverse=True)
+ else:
+ return results
+
+def filter_by_year(results: List[Dict], start_year: int = None, end_year: int = None) -> List[Dict]:
+ """
+ Filter results by publication year range.
+
+ Args:
+ results: List of search results
+ start_year: Minimum year (inclusive)
+ end_year: Maximum year (inclusive)
+
+ Returns:
+ Filtered list
+ """
+ filtered = []
+
+ for result in results:
+ try:
+ year = int(result.get('year', 0))
+ if start_year and year < start_year:
+ continue
+ if end_year and year > end_year:
+ continue
+ filtered.append(result)
+ except (ValueError, TypeError):
+ # Include if year parsing fails
+ filtered.append(result)
+
+ return filtered
+
+def generate_search_summary(results: List[Dict]) -> Dict:
+ """
+ Generate summary statistics for search results.
+
+ Args:
+ results: List of search results
+
+ Returns:
+ Summary dictionary
+ """
+ summary = {
+ 'total_results': len(results),
+ 'sources': {},
+ 'year_distribution': {},
+ 'avg_citations': 0,
+ 'total_citations': 0
+ }
+
+ citations = []
+
+ for result in results:
+ # Count by source
+ source = result.get('source', 'Unknown')
+ summary['sources'][source] = summary['sources'].get(source, 0) + 1
+
+ # Count by year
+ year = result.get('year', 'Unknown')
+ summary['year_distribution'][year] = summary['year_distribution'].get(year, 0) + 1
+
+ # Collect citations
+ if result.get('citations'):
+ try:
+ citations.append(int(result['citations']))
+ except (ValueError, TypeError):
+ pass
+
+ if citations:
+ summary['avg_citations'] = sum(citations) / len(citations)
+ summary['total_citations'] = sum(citations)
+
+ return summary
+
+def main():
+ """Command-line interface for search result processing."""
+ if len(sys.argv) < 2:
+ print("Usage: python search_databases.py [options]")
+ print("\nOptions:")
+ print(" --format FORMAT Output format (json, markdown, bibtex)")
+ print(" --output FILE Output file (default: stdout)")
+ print(" --rank CRITERIA Rank by (citations, year, relevance)")
+ print(" --year-start YEAR Filter by start year")
+ print(" --year-end YEAR Filter by end year")
+ print(" --deduplicate Remove duplicates")
+ print(" --summary Show summary statistics")
+ sys.exit(1)
+
+ # Load results
+ results_file = sys.argv[1]
+ try:
+ with open(results_file, 'r', encoding='utf-8') as f:
+ results = json.load(f)
+ except Exception as e:
+ print(f"Error loading results: {e}")
+ sys.exit(1)
+
+ # Parse options
+ output_format = 'markdown'
+ output_file = None
+ rank_criteria = None
+ year_start = None
+ year_end = None
+ do_dedup = False
+ show_summary = False
+
+ i = 2
+ while i < len(sys.argv):
+ arg = sys.argv[i]
+
+ if arg == '--format' and i + 1 < len(sys.argv):
+ output_format = sys.argv[i + 1]
+ i += 2
+ elif arg == '--output' and i + 1 < len(sys.argv):
+ output_file = sys.argv[i + 1]
+ i += 2
+ elif arg == '--rank' and i + 1 < len(sys.argv):
+ rank_criteria = sys.argv[i + 1]
+ i += 2
+ elif arg == '--year-start' and i + 1 < len(sys.argv):
+ year_start = int(sys.argv[i + 1])
+ i += 2
+ elif arg == '--year-end' and i + 1 < len(sys.argv):
+ year_end = int(sys.argv[i + 1])
+ i += 2
+ elif arg == '--deduplicate':
+ do_dedup = True
+ i += 1
+ elif arg == '--summary':
+ show_summary = True
+ i += 1
+ else:
+ i += 1
+
+ # Process results
+ if do_dedup:
+ results = deduplicate_results(results)
+ print(f"After deduplication: {len(results)} results")
+
+ if year_start or year_end:
+ results = filter_by_year(results, year_start, year_end)
+ print(f"After year filter: {len(results)} results")
+
+ if rank_criteria:
+ results = rank_results(results, rank_criteria)
+ print(f"Ranked by: {rank_criteria}")
+
+ # Show summary
+ if show_summary:
+ summary = generate_search_summary(results)
+ print("\n" + "="*60)
+ print("SEARCH SUMMARY")
+ print("="*60)
+ print(json.dumps(summary, indent=2))
+ print()
+
+ # Format output
+ output = format_search_results(results, output_format)
+
+ # Write output
+ if output_file:
+ with open(output_file, 'w', encoding='utf-8') as f:
+ f.write(output)
+ print(f"✓ Results saved to: {output_file}")
+ else:
+ print(output)
+
+if __name__ == "__main__":
+ main()
diff --git a/scientific-skills/literature-review/scripts/verify_citations.py b/scientific-skills/literature-review/scripts/verify_citations.py
new file mode 100644
index 0000000..ee6e4d5
--- /dev/null
+++ b/scientific-skills/literature-review/scripts/verify_citations.py
@@ -0,0 +1,222 @@
+#!/usr/bin/env python3
+"""
+Citation Verification Script
+Verifies DOIs, URLs, and citation metadata for accuracy.
+"""
+
+import re
+import requests
+import json
+from typing import Dict, List, Tuple
+from urllib.parse import urlparse
+import time
+
+class CitationVerifier:
+ def __init__(self):
+ self.session = requests.Session()
+ self.session.headers.update({
+ 'User-Agent': 'CitationVerifier/1.0 (Literature Review Tool)'
+ })
+
+ def extract_dois(self, text: str) -> List[str]:
+ """Extract all DOIs from text."""
+ doi_pattern = r'10\.\d{4,}/[^\s\]\)"]+'
+ return re.findall(doi_pattern, text)
+
+ def verify_doi(self, doi: str) -> Tuple[bool, Dict]:
+ """
+ Verify a DOI and retrieve metadata.
+ Returns (is_valid, metadata)
+ """
+ try:
+ url = f"https://doi.org/api/handles/{doi}"
+ response = self.session.get(url, timeout=10)
+
+ if response.status_code == 200:
+ # DOI exists, now get metadata from CrossRef
+ metadata = self._get_crossref_metadata(doi)
+ return True, metadata
+ else:
+ return False, {}
+ except Exception as e:
+ return False, {"error": str(e)}
+
+ def _get_crossref_metadata(self, doi: str) -> Dict:
+ """Get metadata from CrossRef API."""
+ try:
+ url = f"https://api.crossref.org/works/{doi}"
+ response = self.session.get(url, timeout=10)
+
+ if response.status_code == 200:
+ data = response.json()
+ message = data.get('message', {})
+
+ # Extract key metadata
+ metadata = {
+ 'title': message.get('title', [''])[0],
+ 'authors': self._format_authors(message.get('author', [])),
+ 'year': self._extract_year(message),
+ 'journal': message.get('container-title', [''])[0],
+ 'volume': message.get('volume', ''),
+ 'pages': message.get('page', ''),
+ 'doi': doi
+ }
+ return metadata
+ return {}
+ except Exception as e:
+ return {"error": str(e)}
+
+ def _format_authors(self, authors: List[Dict]) -> str:
+ """Format author list."""
+ if not authors:
+ return ""
+
+ formatted = []
+ for author in authors[:3]: # First 3 authors
+ given = author.get('given', '')
+ family = author.get('family', '')
+ if family:
+ formatted.append(f"{family}, {given[0]}." if given else family)
+
+ if len(authors) > 3:
+ formatted.append("et al.")
+
+ return ", ".join(formatted)
+
+ def _extract_year(self, message: Dict) -> str:
+ """Extract publication year."""
+ date_parts = message.get('published-print', {}).get('date-parts', [[]])
+ if not date_parts or not date_parts[0]:
+ date_parts = message.get('published-online', {}).get('date-parts', [[]])
+
+ if date_parts and date_parts[0]:
+ return str(date_parts[0][0])
+ return ""
+
+ def verify_url(self, url: str) -> Tuple[bool, int]:
+ """
+ Verify a URL is accessible.
+ Returns (is_accessible, status_code)
+ """
+ try:
+ response = self.session.head(url, timeout=10, allow_redirects=True)
+ is_accessible = response.status_code < 400
+ return is_accessible, response.status_code
+ except Exception as e:
+ return False, 0
+
+ def verify_citations_in_file(self, filepath: str) -> Dict:
+ """
+ Verify all citations in a markdown file.
+ Returns a report of verification results.
+ """
+ with open(filepath, 'r', encoding='utf-8') as f:
+ content = f.read()
+
+ dois = self.extract_dois(content)
+
+ report = {
+ 'total_dois': len(dois),
+ 'verified': [],
+ 'failed': [],
+ 'metadata': {}
+ }
+
+ for doi in dois:
+ print(f"Verifying DOI: {doi}")
+ is_valid, metadata = self.verify_doi(doi)
+
+ if is_valid:
+ report['verified'].append(doi)
+ report['metadata'][doi] = metadata
+ else:
+ report['failed'].append(doi)
+
+ time.sleep(0.5) # Rate limiting
+
+ return report
+
+ def format_citation_apa(self, metadata: Dict) -> str:
+ """Format citation in APA style."""
+ authors = metadata.get('authors', '')
+ year = metadata.get('year', 'n.d.')
+ title = metadata.get('title', '')
+ journal = metadata.get('journal', '')
+ volume = metadata.get('volume', '')
+ pages = metadata.get('pages', '')
+ doi = metadata.get('doi', '')
+
+ citation = f"{authors} ({year}). {title}. "
+ if journal:
+ citation += f"*{journal}*"
+ if volume:
+ citation += f", *{volume}*"
+ if pages:
+ citation += f", {pages}"
+ if doi:
+ citation += f". https://doi.org/{doi}"
+
+ return citation
+
+ def format_citation_nature(self, metadata: Dict) -> str:
+ """Format citation in Nature style."""
+ authors = metadata.get('authors', '')
+ title = metadata.get('title', '')
+ journal = metadata.get('journal', '')
+ volume = metadata.get('volume', '')
+ pages = metadata.get('pages', '')
+ year = metadata.get('year', '')
+
+ citation = f"{authors} {title}. "
+ if journal:
+ citation += f"*{journal}* "
+ if volume:
+ citation += f"**{volume}**, "
+ if pages:
+ citation += f"{pages} "
+ if year:
+ citation += f"({year})"
+
+ return citation
+
+def main():
+ """Example usage."""
+ import sys
+
+ if len(sys.argv) < 2:
+ print("Usage: python verify_citations.py ")
+ sys.exit(1)
+
+ filepath = sys.argv[1]
+ verifier = CitationVerifier()
+
+ print(f"Verifying citations in: {filepath}")
+ report = verifier.verify_citations_in_file(filepath)
+
+ print("\n" + "="*60)
+ print("CITATION VERIFICATION REPORT")
+ print("="*60)
+ print(f"\nTotal DOIs found: {report['total_dois']}")
+ print(f"Verified: {len(report['verified'])}")
+ print(f"Failed: {len(report['failed'])}")
+
+ if report['failed']:
+ print("\nFailed DOIs:")
+ for doi in report['failed']:
+ print(f" - {doi}")
+
+ if report['metadata']:
+ print("\n\nVerified Citations (APA format):")
+ for doi, metadata in report['metadata'].items():
+ citation = verifier.format_citation_apa(metadata)
+ print(f"\n{citation}")
+
+ # Save detailed report
+ output_file = filepath.replace('.md', '_citation_report.json')
+ with open(output_file, 'w', encoding='utf-8') as f:
+ json.dump(report, f, indent=2)
+
+ print(f"\n\nDetailed report saved to: {output_file}")
+
+if __name__ == "__main__":
+ main()
diff --git a/scientific-skills/market-research-reports/SKILL.md b/scientific-skills/market-research-reports/SKILL.md
new file mode 100644
index 0000000..90435c0
--- /dev/null
+++ b/scientific-skills/market-research-reports/SKILL.md
@@ -0,0 +1,901 @@
+---
+name: market-research-reports
+description: "Generate comprehensive market research reports (50+ pages) in the style of top consulting firms (McKinsey, BCG, Gartner). Features professional LaTeX formatting, extensive visual generation with scientific-schematics and generate-image, deep integration with research-lookup for data gathering, and multi-framework strategic analysis including Porter's Five Forces, PESTLE, SWOT, TAM/SAM/SOM, and BCG Matrix."
+allowed-tools: [Read, Write, Edit, Bash]
+---
+
+# Market Research Reports
+
+## Overview
+
+Market research reports are comprehensive strategic documents that analyze industries, markets, and competitive landscapes to inform business decisions, investment strategies, and strategic planning. This skill generates **professional-grade reports of 50+ pages** with extensive visual content, modeled after deliverables from top consulting firms like McKinsey, BCG, Bain, Gartner, and Forrester.
+
+**Key Features:**
+- **Comprehensive length**: Reports are designed to be 50+ pages with no token constraints
+- **Visual-rich content**: 5-6 key diagrams generated at start (more added as needed during writing)
+- **Data-driven analysis**: Deep integration with research-lookup for market data
+- **Multi-framework approach**: Porter's Five Forces, PESTLE, SWOT, BCG Matrix, TAM/SAM/SOM
+- **Professional formatting**: Consulting-firm quality typography, colors, and layout
+- **Actionable recommendations**: Strategic focus with implementation roadmaps
+
+**Output Format:** LaTeX with professional styling, compiled to PDF. Uses the `market_research.sty` style package for consistent, professional formatting.
+
+## When to Use This Skill
+
+This skill should be used when:
+- Creating comprehensive market analysis for investment decisions
+- Developing industry reports for strategic planning
+- Analyzing competitive landscapes and market dynamics
+- Conducting market sizing exercises (TAM/SAM/SOM)
+- Evaluating market entry opportunities
+- Preparing due diligence materials for M&A activities
+- Creating thought leadership content for industry positioning
+- Developing go-to-market strategy documentation
+- Analyzing regulatory and policy impacts on markets
+- Building business cases for new product launches
+
+## Visual Enhancement Requirements
+
+**CRITICAL: Market research reports should include key visual content.**
+
+Every report should generate **6 essential visuals** at the start, with additional visuals added as needed during writing. Start with the most critical visualizations to establish the report framework.
+
+### Visual Generation Tools
+
+**Use `scientific-schematics` for:**
+- Market growth trajectory charts
+- TAM/SAM/SOM breakdown diagrams (concentric circles)
+- Porter's Five Forces diagrams
+- Competitive positioning matrices
+- Market segmentation charts
+- Value chain diagrams
+- Technology roadmaps
+- Risk heatmaps
+- Strategic prioritization matrices
+- Implementation timelines/Gantt charts
+- SWOT analysis diagrams
+- BCG Growth-Share matrices
+
+```bash
+# Example: Generate a TAM/SAM/SOM diagram
+python skills/scientific-schematics/scripts/generate_schematic.py \
+ "TAM SAM SOM concentric circle diagram showing Total Addressable Market $50B outer circle, Serviceable Addressable Market $15B middle circle, Serviceable Obtainable Market $3B inner circle, with labels and arrows pointing to each segment" \
+ -o figures/tam_sam_som.png --doc-type report
+
+# Example: Generate Porter's Five Forces
+python skills/scientific-schematics/scripts/generate_schematic.py \
+ "Porter's Five Forces diagram with center box 'Competitive Rivalry' connected to four surrounding boxes: 'Threat of New Entrants' (top), 'Bargaining Power of Suppliers' (left), 'Bargaining Power of Buyers' (right), 'Threat of Substitutes' (bottom). Each box should show High/Medium/Low rating" \
+ -o figures/porters_five_forces.png --doc-type report
+```
+
+**Use `generate-image` for:**
+- Executive summary hero infographics
+- Industry/sector conceptual illustrations
+- Abstract technology visualizations
+- Cover page imagery
+
+```bash
+# Example: Generate executive summary infographic
+python skills/generate-image/scripts/generate_image.py \
+ "Professional executive summary infographic for market research report, showing key metrics in modern data visualization style, blue and green color scheme, clean minimalist design with icons representing market size, growth rate, and competitive landscape" \
+ --output figures/executive_summary.png
+```
+
+### Recommended Visuals by Section (Generate as Needed)
+
+| Section | Priority Visuals | Optional Visuals |
+|---------|-----------------|------------------|
+| Executive Summary | Executive infographic (START) | - |
+| Market Size & Growth | Growth trajectory (START), TAM/SAM/SOM (START) | Regional breakdown, segment growth |
+| Competitive Landscape | Porter's Five Forces (START), Positioning matrix (START) | Market share chart, strategic groups |
+| Risk Analysis | Risk heatmap (START) | Mitigation matrix |
+| Strategic Recommendations | Opportunity matrix | Priority framework |
+| Implementation Roadmap | Timeline/Gantt | Milestone tracker |
+| Investment Thesis | Financial projections | Scenario analysis |
+
+**Start with 6 priority visuals** (marked as START above), then generate additional visuals as specific sections are written and require visual support.
+
+---
+
+## Report Structure (50+ Pages)
+
+### Front Matter (~5 pages)
+
+#### Cover Page (1 page)
+- Report title and subtitle
+- Hero visualization (generated)
+- Date and classification
+- Prepared for / Prepared by
+
+#### Table of Contents (1-2 pages)
+- Automated from LaTeX
+- List of Figures
+- List of Tables
+
+#### Executive Summary (2-3 pages)
+- **Market Snapshot Box**: Key metrics at a glance
+- **Investment Thesis**: 3-5 bullet point summary
+- **Key Findings**: Major discoveries and insights
+- **Strategic Recommendations**: Top 3-5 actionable recommendations
+- **Executive Summary Infographic**: Visual synthesis of report highlights
+
+---
+
+### Core Analysis (~35 pages)
+
+#### Chapter 1: Market Overview & Definition (4-5 pages)
+
+**Content Requirements:**
+- Market definition and scope
+- Industry ecosystem mapping
+- Key stakeholders and their roles
+- Market boundaries and adjacencies
+- Historical context and evolution
+
+**Required Visuals (2):**
+1. Market ecosystem/value chain diagram
+2. Industry structure diagram
+
+**Key Data Points:**
+- Market definition criteria
+- Included/excluded segments
+- Geographic scope
+- Time horizon for analysis
+
+---
+
+#### Chapter 2: Market Size & Growth Analysis (6-8 pages)
+
+**Content Requirements:**
+- Total Addressable Market (TAM) calculation
+- Serviceable Addressable Market (SAM) definition
+- Serviceable Obtainable Market (SOM) estimation
+- Historical growth analysis (5-10 years)
+- Growth projections (5-10 years forward)
+- Growth drivers and inhibitors
+- Regional market breakdown
+- Segment-level analysis
+
+**Required Visuals (4):**
+1. Market growth trajectory chart (historical + projected)
+2. TAM/SAM/SOM concentric circles diagram
+3. Regional market breakdown (pie chart or treemap)
+4. Segment growth comparison (bar chart)
+
+**Key Data Points:**
+- Current market size (with source)
+- CAGR (historical and projected)
+- Market size by region
+- Market size by segment
+- Key assumptions for projections
+
+**Data Sources:**
+Use `research-lookup` to find:
+- Market research reports (Gartner, Forrester, IDC, etc.)
+- Industry association data
+- Government statistics
+- Company financial reports
+- Academic studies
+
+---
+
+#### Chapter 3: Industry Drivers & Trends (5-6 pages)
+
+**Content Requirements:**
+- Macroeconomic factors
+- Technology trends
+- Regulatory drivers
+- Social and demographic shifts
+- Environmental factors
+- Industry-specific trends
+
+**Analysis Frameworks:**
+- **PESTLE Analysis**: Political, Economic, Social, Technological, Legal, Environmental
+- **Trend Impact Assessment**: Likelihood vs Impact matrix
+
+**Required Visuals (3):**
+1. Industry trends timeline or radar chart
+2. Driver impact matrix
+3. PESTLE analysis diagram
+
+**Key Data Points:**
+- Top 5-10 growth drivers with quantified impact
+- Emerging trends with timeline
+- Disruption factors
+
+---
+
+#### Chapter 4: Competitive Landscape (6-8 pages)
+
+**Content Requirements:**
+- Market structure analysis
+- Major player profiles
+- Market share analysis
+- Competitive positioning
+- Barriers to entry
+- Competitive dynamics
+
+**Analysis Frameworks:**
+- **Porter's Five Forces**: Comprehensive industry analysis
+- **Competitive Positioning Matrix**: 2x2 matrix on key dimensions
+- **Strategic Group Mapping**: Cluster competitors by strategy
+
+**Required Visuals (4):**
+1. Porter's Five Forces diagram
+2. Market share pie chart or bar chart
+3. Competitive positioning matrix (2x2)
+4. Strategic group map
+
+**Key Data Points:**
+- Market share by company (top 10)
+- Competitive intensity rating
+- Entry barriers assessment
+- Supplier/buyer power assessment
+
+---
+
+#### Chapter 5: Customer Analysis & Segmentation (4-5 pages)
+
+**Content Requirements:**
+- Customer segment definitions
+- Segment size and growth
+- Buying behavior analysis
+- Customer needs and pain points
+- Decision-making process
+- Value drivers by segment
+
+**Analysis Frameworks:**
+- **Customer Segmentation Matrix**: Size vs Growth
+- **Value Proposition Canvas**: Jobs, Pains, Gains
+- **Customer Journey Mapping**: Awareness to Advocacy
+
+**Required Visuals (3):**
+1. Customer segmentation breakdown (pie/treemap)
+2. Segment attractiveness matrix
+3. Customer journey or value proposition diagram
+
+**Key Data Points:**
+- Segment sizes and percentages
+- Growth rates by segment
+- Average deal size / revenue per customer
+- Customer acquisition cost by segment
+
+---
+
+#### Chapter 6: Technology & Innovation Landscape (4-5 pages)
+
+**Content Requirements:**
+- Current technology stack
+- Emerging technologies
+- Innovation trends
+- Technology adoption curves
+- R&D investment analysis
+- Patent landscape
+
+**Analysis Frameworks:**
+- **Technology Readiness Assessment**: TRL levels
+- **Hype Cycle Positioning**: Where technologies sit
+- **Technology Roadmap**: Evolution over time
+
+**Required Visuals (2):**
+1. Technology roadmap diagram
+2. Innovation/adoption curve or hype cycle
+
+**Key Data Points:**
+- R&D spending in the industry
+- Key technology milestones
+- Patent filing trends
+- Technology adoption rates
+
+---
+
+#### Chapter 7: Regulatory & Policy Environment (3-4 pages)
+
+**Content Requirements:**
+- Current regulatory framework
+- Key regulatory bodies
+- Compliance requirements
+- Upcoming regulatory changes
+- Policy trends
+- Impact assessment
+
+**Required Visuals (1):**
+1. Regulatory timeline or framework diagram
+
+**Key Data Points:**
+- Key regulations and effective dates
+- Compliance costs
+- Regulatory risks
+- Policy change probability
+
+---
+
+#### Chapter 8: Risk Analysis (3-4 pages)
+
+**Content Requirements:**
+- Market risks
+- Competitive risks
+- Regulatory risks
+- Technology risks
+- Operational risks
+- Financial risks
+- Risk mitigation strategies
+
+**Analysis Frameworks:**
+- **Risk Heatmap**: Probability vs Impact
+- **Risk Register**: Comprehensive risk inventory
+- **Mitigation Matrix**: Risk vs Mitigation strategy
+
+**Required Visuals (2):**
+1. Risk heatmap (probability vs impact)
+2. Risk mitigation matrix
+
+**Key Data Points:**
+- Top 10 risks with ratings
+- Risk probability scores
+- Impact severity scores
+- Mitigation cost estimates
+
+---
+
+### Strategic Recommendations (~10 pages)
+
+#### Chapter 9: Strategic Opportunities & Recommendations (4-5 pages)
+
+**Content Requirements:**
+- Opportunity identification
+- Opportunity sizing
+- Strategic options analysis
+- Prioritization framework
+- Detailed recommendations
+- Success factors
+
+**Analysis Frameworks:**
+- **Opportunity Attractiveness Matrix**: Attractiveness vs Ability to Win
+- **Strategic Options Framework**: Build, Buy, Partner, Ignore
+- **Priority Matrix**: Impact vs Effort
+
+**Required Visuals (3):**
+1. Opportunity matrix
+2. Strategic options framework
+3. Priority/recommendation matrix
+
+**Key Data Points:**
+- Opportunity sizes
+- Investment requirements
+- Expected returns
+- Timeline to value
+
+---
+
+#### Chapter 10: Implementation Roadmap (3-4 pages)
+
+**Content Requirements:**
+- Phased implementation plan
+- Key milestones and deliverables
+- Resource requirements
+- Timeline and sequencing
+- Dependencies and critical path
+- Governance structure
+
+**Required Visuals (2):**
+1. Implementation timeline/Gantt chart
+2. Milestone tracker or phase diagram
+
+**Key Data Points:**
+- Phase durations
+- Resource requirements
+- Key milestones with dates
+- Budget allocation by phase
+
+---
+
+#### Chapter 11: Investment Thesis & Financial Projections (3-4 pages)
+
+**Content Requirements:**
+- Investment summary
+- Financial projections
+- Scenario analysis
+- Return expectations
+- Key assumptions
+- Sensitivity analysis
+
+**Required Visuals (2):**
+1. Financial projection chart (revenue, growth)
+2. Scenario analysis comparison
+
+**Key Data Points:**
+- Revenue projections (3-5 years)
+- CAGR projections
+- ROI/IRR expectations
+- Key financial assumptions
+
+---
+
+### Back Matter (~5 pages)
+
+#### Appendix A: Methodology & Data Sources (1-2 pages)
+- Research methodology
+- Data collection approach
+- Data sources and citations
+- Limitations and assumptions
+
+#### Appendix B: Detailed Market Data Tables (2-3 pages)
+- Comprehensive market data tables
+- Regional breakdowns
+- Segment details
+- Historical data series
+
+#### Appendix C: Company Profiles (1-2 pages)
+- Brief profiles of key competitors
+- Financial highlights
+- Strategic focus areas
+
+#### References/Bibliography
+- All sources cited
+- BibTeX format for LaTeX
+
+---
+
+## Workflow
+
+### Phase 1: Research & Data Gathering
+
+**Step 1: Define Scope**
+- Clarify market definition
+- Set geographic boundaries
+- Determine time horizon
+- Identify key questions to answer
+
+**Step 2: Conduct Deep Research**
+
+Use `research-lookup` extensively to gather market data:
+
+```bash
+# Market size and growth data
+python skills/research-lookup/scripts/research_lookup.py \
+ "What is the current market size and projected growth rate for [MARKET] industry? Include TAM, SAM, SOM estimates and CAGR projections"
+
+# Competitive landscape
+python skills/research-lookup/scripts/research_lookup.py \
+ "Who are the top 10 competitors in the [MARKET] market? What is their market share and competitive positioning?"
+
+# Industry trends
+python skills/research-lookup/scripts/research_lookup.py \
+ "What are the major trends and growth drivers in the [MARKET] industry for 2024-2030?"
+
+# Regulatory environment
+python skills/research-lookup/scripts/research_lookup.py \
+ "What are the key regulations and policy changes affecting the [MARKET] industry?"
+```
+
+**Step 3: Data Organization**
+- Create `sources/` folder with research notes
+- Organize data by section
+- Identify data gaps
+- Conduct follow-up research as needed
+
+### Phase 2: Analysis & Framework Application
+
+**Step 4: Apply Analysis Frameworks**
+
+For each framework, conduct structured analysis:
+
+- **Market Sizing**: TAM → SAM → SOM with clear assumptions
+- **Porter's Five Forces**: Rate each force High/Medium/Low with rationale
+- **PESTLE**: Analyze each dimension with trends and impacts
+- **SWOT**: Internal strengths/weaknesses, external opportunities/threats
+- **Competitive Positioning**: Define axes, plot competitors
+
+**Step 5: Develop Insights**
+- Synthesize findings into key insights
+- Identify strategic implications
+- Develop recommendations
+- Prioritize opportunities
+
+### Phase 3: Visual Generation
+
+**Step 6: Generate All Visuals**
+
+Generate visuals BEFORE writing the report. Use the batch generation script:
+
+```bash
+# Generate all standard market report visuals
+python skills/market-research-reports/scripts/generate_market_visuals.py \
+ --topic "[MARKET NAME]" \
+ --output-dir figures/
+```
+
+Or generate individually:
+
+```bash
+# 1. Market growth trajectory
+python skills/scientific-schematics/scripts/generate_schematic.py \
+ "Bar chart showing market growth from 2020 to 2034, with historical bars in dark blue (2020-2024) and projected bars in light blue (2025-2034). Y-axis shows market size in billions USD. Include CAGR annotation" \
+ -o figures/01_market_growth.png --doc-type report
+
+# 2. TAM/SAM/SOM breakdown
+python skills/scientific-schematics/scripts/generate_schematic.py \
+ "TAM SAM SOM concentric circles diagram. Outer circle TAM Total Addressable Market, middle circle SAM Serviceable Addressable Market, inner circle SOM Serviceable Obtainable Market. Each labeled with acronym and description. Blue gradient" \
+ -o figures/02_tam_sam_som.png --doc-type report
+
+# 3. Porter's Five Forces
+python skills/scientific-schematics/scripts/generate_schematic.py \
+ "Porter's Five Forces diagram with center box 'Competitive Rivalry' connected to four surrounding boxes: Threat of New Entrants (top), Bargaining Power of Suppliers (left), Bargaining Power of Buyers (right), Threat of Substitutes (bottom). Color code by rating: High=red, Medium=yellow, Low=green" \
+ -o figures/03_porters_five_forces.png --doc-type report
+
+# 4. Competitive positioning matrix
+python skills/scientific-schematics/scripts/generate_schematic.py \
+ "2x2 competitive positioning matrix with X-axis 'Market Focus (Niche to Broad)' and Y-axis 'Solution Approach (Product to Platform)'. Plot 8-10 competitors as labeled circles of varying sizes. Include quadrant labels" \
+ -o figures/04_competitive_positioning.png --doc-type report
+
+# 5. Risk heatmap
+python skills/scientific-schematics/scripts/generate_schematic.py \
+ "Risk heatmap matrix. X-axis Impact (Low to Critical), Y-axis Probability (Unlikely to Very Likely). Color gradient: Green (low risk) to Red (critical risk). Plot 10-12 risks as labeled points" \
+ -o figures/05_risk_heatmap.png --doc-type report
+
+# 6. (Optional) Executive summary infographic
+python skills/generate-image/scripts/generate_image.py \
+ "Professional executive summary infographic for market research report, modern data visualization style, blue and green color scheme, clean minimalist design" \
+ --output figures/06_exec_summary.png
+```
+
+### Phase 4: Report Writing
+
+**Step 7: Initialize Project Structure**
+
+Create the standard project structure:
+
+```
+writing_outputs/YYYYMMDD_HHMMSS_market_report_[topic]/
+├── progress.md
+├── drafts/
+│ └── v1_market_report.tex
+├── references/
+│ └── references.bib
+├── figures/
+│ └── [all generated visuals]
+├── sources/
+│ └── [research notes]
+└── final/
+```
+
+**Step 8: Write Report Using Template**
+
+Use the `market_report_template.tex` as a starting point. Write each section following the structure guide, ensuring:
+
+- **Comprehensive coverage**: Every subsection addressed
+- **Data-driven content**: Claims supported by research
+- **Visual integration**: Reference all generated figures
+- **Professional tone**: Consulting-style writing
+- **No token constraints**: Write fully, don't abbreviate
+
+**Writing Guidelines:**
+- Use active voice where possible
+- Lead with insights, support with data
+- Use numbered lists for recommendations
+- Include data sources for all statistics
+- Create smooth transitions between sections
+
+### Phase 5: Compilation & Review
+
+**Step 9: Compile LaTeX**
+
+```bash
+cd writing_outputs/[project_folder]/drafts/
+xelatex v1_market_report.tex
+bibtex v1_market_report
+xelatex v1_market_report.tex
+xelatex v1_market_report.tex
+```
+
+**Step 10: Quality Review**
+
+Verify the report meets quality standards:
+
+- [ ] Total page count is 50+ pages
+- [ ] All essential visuals (5-6 core + any additional) are included and render correctly
+- [ ] Executive summary captures key findings
+- [ ] All data points have sources cited
+- [ ] Analysis frameworks are properly applied
+- [ ] Recommendations are actionable and prioritized
+- [ ] No orphaned figures or tables
+- [ ] Table of contents, list of figures, list of tables are accurate
+- [ ] Bibliography is complete
+- [ ] PDF renders without errors
+
+**Step 11: Peer Review**
+
+Use the peer-review skill to evaluate the report:
+- Assess comprehensiveness
+- Verify data accuracy
+- Check logical flow
+- Evaluate recommendation quality
+
+---
+
+## Quality Standards
+
+### Page Count Targets
+
+| Section | Minimum Pages | Target Pages |
+|---------|---------------|--------------|
+| Front Matter | 4 | 5 |
+| Market Overview | 4 | 5 |
+| Market Size & Growth | 5 | 7 |
+| Industry Drivers | 4 | 6 |
+| Competitive Landscape | 5 | 7 |
+| Customer Analysis | 3 | 5 |
+| Technology Landscape | 3 | 5 |
+| Regulatory Environment | 2 | 4 |
+| Risk Analysis | 2 | 4 |
+| Strategic Recommendations | 3 | 5 |
+| Implementation Roadmap | 2 | 4 |
+| Investment Thesis | 2 | 4 |
+| Back Matter | 4 | 5 |
+| **TOTAL** | **43** | **66** |
+
+### Visual Quality Requirements
+
+- **Resolution**: All images at 300 DPI minimum
+- **Format**: PNG for raster, PDF for vector
+- **Accessibility**: Colorblind-friendly palettes
+- **Consistency**: Same color scheme throughout
+- **Labeling**: All axes, legends, and data points labeled
+- **Source Attribution**: Sources cited in figure captions
+
+### Data Quality Requirements
+
+- **Currency**: Data no older than 2 years (prefer current year)
+- **Sourcing**: All statistics attributed to specific sources
+- **Validation**: Cross-reference multiple sources when possible
+- **Assumptions**: All projections state underlying assumptions
+- **Limitations**: Acknowledge data limitations and gaps
+
+### Writing Quality Requirements
+
+- **Objectivity**: Present balanced analysis, acknowledge uncertainties
+- **Clarity**: Avoid jargon, define technical terms
+- **Precision**: Use specific numbers over vague qualifiers
+- **Structure**: Clear headings, logical flow, smooth transitions
+- **Actionability**: Recommendations are specific and implementable
+
+---
+
+## LaTeX Formatting
+
+### Using the Style Package
+
+The `market_research.sty` package provides professional formatting. Include it in your document:
+
+```latex
+\documentclass[11pt,letterpaper]{report}
+\usepackage{market_research}
+```
+
+### Box Environments
+
+Use colored boxes to highlight key content:
+
+```latex
+% Key insight box (blue)
+\begin{keyinsightbox}[Key Finding]
+The market is projected to grow at 15.3% CAGR through 2030.
+\end{keyinsightbox}
+
+% Market data box (green)
+\begin{marketdatabox}[Market Snapshot]
+\begin{itemize}
+ \item Market Size (2024): \$45.2B
+ \item Projected Size (2030): \$98.7B
+ \item CAGR: 15.3%
+\end{itemize}
+\end{marketdatabox}
+
+% Risk box (orange/warning)
+\begin{riskbox}[Critical Risk]
+Regulatory changes could impact 40% of market participants.
+\end{riskbox}
+
+% Recommendation box (purple)
+\begin{recommendationbox}[Strategic Recommendation]
+Prioritize market entry in the Asia-Pacific region.
+\end{recommendationbox}
+
+% Callout box (gray)
+\begin{calloutbox}[Definition]
+TAM (Total Addressable Market) represents the total revenue opportunity.
+\end{calloutbox}
+```
+
+### Figure Formatting
+
+```latex
+\begin{figure}[htbp]
+\centering
+\includegraphics[width=0.9\textwidth]{../figures/market_growth.png}
+\caption{Market Growth Trajectory (2020-2030). Source: Industry analysis, company data.}
+\label{fig:market_growth}
+\end{figure}
+```
+
+### Table Formatting
+
+```latex
+\begin{table}[htbp]
+\centering
+\caption{Market Size by Region (2024)}
+\begin{tabular}{@{}lrrr@{}}
+\toprule
+\textbf{Region} & \textbf{Size (USD)} & \textbf{Share} & \textbf{CAGR} \\
+\midrule
+North America & \$18.2B & 40.3\% & 12.5\% \\
+\rowcolor{tablealt} Europe & \$12.1B & 26.8\% & 14.2\% \\
+Asia-Pacific & \$10.5B & 23.2\% & 18.7\% \\
+\rowcolor{tablealt} Rest of World & \$4.4B & 9.7\% & 11.3\% \\
+\midrule
+\textbf{Total} & \textbf{\$45.2B} & \textbf{100\%} & \textbf{15.3\%} \\
+\bottomrule
+\end{tabular}
+\label{tab:market_by_region}
+\end{table}
+```
+
+For complete formatting reference, see `assets/FORMATTING_GUIDE.md`.
+
+---
+
+## Integration with Other Skills
+
+This skill works synergistically with:
+
+- **research-lookup**: Essential for gathering market data, statistics, and competitive intelligence
+- **scientific-schematics**: Generate all diagrams, charts, and visualizations
+- **generate-image**: Create infographics and conceptual illustrations
+- **peer-review**: Evaluate report quality and completeness
+- **citation-management**: Manage BibTeX references
+
+---
+
+## Example Prompts
+
+### Market Overview Section
+
+```
+Write a comprehensive market overview section for the [Electric Vehicle Charging Infrastructure] market. Include:
+- Clear market definition and scope
+- Industry ecosystem with key stakeholders
+- Value chain analysis
+- Historical evolution of the market
+- Current market dynamics
+
+Generate 2 supporting visuals using scientific-schematics.
+```
+
+### Competitive Landscape Section
+
+```
+Analyze the competitive landscape for the [Cloud Computing] market. Include:
+- Porter's Five Forces analysis with High/Medium/Low ratings
+- Top 10 competitors with market share
+- Competitive positioning matrix
+- Strategic group mapping
+- Barriers to entry analysis
+
+Generate 4 supporting visuals including Porter's Five Forces diagram and positioning matrix.
+```
+
+### Strategic Recommendations Section
+
+```
+Develop strategic recommendations for entering the [Renewable Energy Storage] market. Include:
+- 5-7 prioritized recommendations
+- Opportunity sizing for each
+- Implementation considerations
+- Risk factors and mitigations
+- Success criteria
+
+Generate 3 supporting visuals including opportunity matrix and priority framework.
+```
+
+---
+
+## Checklist: 50+ Page Validation
+
+Before finalizing the report, verify:
+
+### Structure Completeness
+- [ ] Cover page with hero visual
+- [ ] Table of contents (auto-generated)
+- [ ] List of figures (auto-generated)
+- [ ] List of tables (auto-generated)
+- [ ] Executive summary (2-3 pages)
+- [ ] All 11 core chapters present
+- [ ] Appendix A: Methodology
+- [ ] Appendix B: Data tables
+- [ ] Appendix C: Company profiles
+- [ ] References/Bibliography
+
+### Visual Completeness (Core 5-6)
+- [ ] Market growth trajectory chart (Priority 1)
+- [ ] TAM/SAM/SOM diagram (Priority 2)
+- [ ] Porter's Five Forces (Priority 3)
+- [ ] Competitive positioning matrix (Priority 4)
+- [ ] Risk heatmap (Priority 5)
+- [ ] Executive summary infographic (Priority 6, optional)
+
+### Additional Visuals (Generate as Needed)
+- [ ] Market ecosystem diagram
+- [ ] Regional breakdown chart
+- [ ] Segment growth chart
+- [ ] Industry trends/PESTLE diagram
+- [ ] Market share chart
+- [ ] Customer segmentation chart
+- [ ] Technology roadmap
+- [ ] Regulatory timeline
+- [ ] Opportunity matrix
+- [ ] Implementation timeline
+- [ ] Financial projections chart
+- [ ] Other section-specific visuals
+
+### Content Quality
+- [ ] All statistics have sources
+- [ ] Projections include assumptions
+- [ ] Frameworks properly applied
+- [ ] Recommendations are actionable
+- [ ] Writing is professional quality
+- [ ] No placeholder or incomplete sections
+
+### Technical Quality
+- [ ] PDF compiles without errors
+- [ ] All figures render correctly
+- [ ] Cross-references work
+- [ ] Bibliography complete
+- [ ] Page count exceeds 50
+
+---
+
+## Resources
+
+### Reference Files
+
+Load these files for detailed guidance:
+
+- **`references/report_structure_guide.md`**: Detailed section-by-section content requirements
+- **`references/visual_generation_guide.md`**: Complete prompts for generating all visual types
+- **`references/data_analysis_patterns.md`**: Templates for Porter's, PESTLE, SWOT, etc.
+
+### Assets
+
+- **`assets/market_research.sty`**: LaTeX style package
+- **`assets/market_report_template.tex`**: Complete LaTeX template
+- **`assets/FORMATTING_GUIDE.md`**: Quick reference for box environments and styling
+
+### Scripts
+
+- **`scripts/generate_market_visuals.py`**: Batch generate all report visuals
+
+---
+
+## Troubleshooting
+
+### Common Issues
+
+**Problem**: Report is under 50 pages
+- **Solution**: Expand data tables in appendices, add more detailed company profiles, include additional regional breakdowns
+
+**Problem**: Visuals not rendering
+- **Solution**: Check file paths in LaTeX, ensure images are in figures/ folder, verify file extensions
+
+**Problem**: Bibliography missing entries
+- **Solution**: Run bibtex after first xelatex pass, check .bib file for syntax errors
+
+**Problem**: Table/figure overflow
+- **Solution**: Use `\resizebox` or `adjustbox` package, reduce image width percentage
+
+**Problem**: Poor visual quality from generation
+- **Solution**: Use `--doc-type report` flag, increase iterations with `--iterations 5`
+
+---
+
+Use this skill to create comprehensive, visually-rich market research reports that rival top consulting firm deliverables. The combination of deep research, structured frameworks, and extensive visualization produces documents that inform strategic decisions and demonstrate analytical rigor.
diff --git a/scientific-skills/market-research-reports/assets/FORMATTING_GUIDE.md b/scientific-skills/market-research-reports/assets/FORMATTING_GUIDE.md
new file mode 100644
index 0000000..09a1da4
--- /dev/null
+++ b/scientific-skills/market-research-reports/assets/FORMATTING_GUIDE.md
@@ -0,0 +1,428 @@
+# Market Research Report Formatting Guide
+
+Quick reference for using the `market_research.sty` style package.
+
+## Color Palette
+
+### Primary Colors
+| Color Name | RGB | Hex | Usage |
+|------------|-----|-----|-------|
+| `primaryblue` | (0, 51, 102) | `#003366` | Headers, titles, links |
+| `secondaryblue` | (51, 102, 153) | `#336699` | Subsections, secondary elements |
+| `lightblue` | (173, 216, 230) | `#ADD8E6` | Key insight box backgrounds |
+| `accentblue` | (0, 120, 215) | `#0078D7` | Accent highlights, opportunity boxes |
+
+### Secondary Colors
+| Color Name | RGB | Hex | Usage |
+|------------|-----|-----|-------|
+| `accentgreen` | (0, 128, 96) | `#008060` | Market data boxes, positive indicators |
+| `lightgreen` | (200, 230, 201) | `#C8E6C9` | Market data box backgrounds |
+| `warningorange` | (255, 140, 0) | `#FF8C00` | Risk boxes, warnings |
+| `alertred` | (198, 40, 40) | `#C62828` | Critical risks |
+| `recommendpurple` | (103, 58, 183) | `#673AB7` | Recommendation boxes |
+
+### Neutral Colors
+| Color Name | RGB | Hex | Usage |
+|------------|-----|-----|-------|
+| `darkgray` | (66, 66, 66) | `#424242` | Body text |
+| `mediumgray` | (117, 117, 117) | `#757575` | Secondary text |
+| `lightgray` | (240, 240, 240) | `#F0F0F0` | Backgrounds, callout boxes |
+| `tablealt` | (245, 247, 250) | `#F5F7FA` | Alternating table rows |
+
+---
+
+## Box Environments
+
+### Key Insight Box (Blue)
+For major findings, insights, and important discoveries.
+
+```latex
+\begin{keyinsightbox}[Custom Title]
+The market is projected to grow at 15.3% CAGR through 2030, driven by
+increasing enterprise adoption and favorable regulatory conditions.
+\end{keyinsightbox}
+```
+
+### Market Data Box (Green)
+For market statistics, metrics, and data highlights.
+
+```latex
+\begin{marketdatabox}[Market Snapshot]
+\begin{itemize}
+ \item \textbf{Market Size (2024):} \marketsize{45.2 billion}
+ \item \textbf{Projected Size (2030):} \marketsize{98.7 billion}
+ \item \textbf{CAGR:} \growthrate{15.3}
+\end{itemize}
+\end{marketdatabox}
+```
+
+### Risk Box (Orange/Warning)
+For risk factors, warnings, and cautions.
+
+```latex
+\begin{riskbox}[Market Risk]
+Regulatory changes in the European Union could impact 40% of market
+participants within the next 18 months.
+\end{riskbox}
+```
+
+### Critical Risk Box (Red)
+For high-severity or critical risks.
+
+```latex
+\begin{criticalriskbox}[Critical: Supply Chain Disruption]
+A major supply chain disruption could result in 6-12 month delays
+and 30% cost increases.
+\end{criticalriskbox}
+```
+
+### Recommendation Box (Purple)
+For strategic recommendations and action items.
+
+```latex
+\begin{recommendationbox}[Strategic Recommendation]
+\begin{enumerate}
+ \item Prioritize market entry in Asia-Pacific region
+ \item Develop strategic partnerships with local distributors
+ \item Invest in localization of product offerings
+\end{enumerate}
+\end{recommendationbox}
+```
+
+### Callout Box (Gray)
+For definitions, notes, and supplementary information.
+
+```latex
+\begin{calloutbox}[Definition: TAM]
+Total Addressable Market (TAM) represents the total revenue opportunity
+available if 100% market share was achieved.
+\end{calloutbox}
+```
+
+### Executive Summary Box
+Special styling for executive summary highlights.
+
+```latex
+\begin{executivesummarybox}[Executive Summary]
+Key findings and highlights of the report...
+\end{executivesummarybox}
+```
+
+### Opportunity Box (Teal/Accent Blue)
+For opportunities and positive findings.
+
+```latex
+\begin{opportunitybox}[Growth Opportunity]
+The Asia-Pacific market represents a \$15 billion opportunity
+growing at 22% CAGR.
+\end{opportunitybox}
+```
+
+### Framework Boxes
+For strategic analysis frameworks.
+
+```latex
+% SWOT Analysis
+\begin{swotbox}[SWOT Analysis Summary]
+Content...
+\end{swotbox}
+
+% Porter's Five Forces
+\begin{porterbox}[Porter's Five Forces Analysis]
+Content...
+\end{porterbox}
+```
+
+---
+
+## Pull Quotes
+
+For highlighting important statistics or quotes.
+
+```latex
+\begin{pullquote}
+"The convergence of AI and healthcare represents a \$199 billion
+opportunity by 2034."
+\end{pullquote}
+```
+
+---
+
+## Stat Boxes
+
+For highlighting key statistics (use in rows of 3).
+
+```latex
+\begin{center}
+\statbox{\$45.2B}{Market Size 2024}
+\statbox{15.3\%}{CAGR 2024-2030}
+\statbox{23\%}{Market Leader Share}
+\end{center}
+```
+
+---
+
+## Custom Commands
+
+### Highlighting Text
+```latex
+\highlight{Important text} % Blue bold
+```
+
+### Market Size Formatting
+```latex
+\marketsize{45.2 billion} % Outputs: $45.2 billion in green
+```
+
+### Growth Rate Formatting
+```latex
+\growthrate{15.3} % Outputs: 15.3% in green
+```
+
+### Risk Indicators
+```latex
+\riskhigh{} % Outputs: HIGH in red
+\riskmedium{} % Outputs: MEDIUM in orange
+\risklow{} % Outputs: LOW in green
+```
+
+### Rating Stars (1-5)
+```latex
+\rating{4} % Outputs: ★★★★☆
+```
+
+### Trend Indicators
+```latex
+\trendup{} % Green up triangle
+\trenddown{} % Red down triangle
+\trendflat{} % Gray right arrow
+```
+
+---
+
+## Table Formatting
+
+### Standard Table with Alternating Rows
+```latex
+\begin{table}[htbp]
+\centering
+\caption{Market Size by Region}
+\begin{tabular}{@{}lrrr@{}}
+\toprule
+\textbf{Region} & \textbf{Size} & \textbf{Share} & \textbf{CAGR} \\
+\midrule
+North America & \$18.2B & 40.3\% & 12.5\% \\
+\rowcolor{tablealt} Europe & \$12.1B & 26.8\% & 14.2\% \\
+Asia-Pacific & \$10.5B & 23.2\% & 18.7\% \\
+\rowcolor{tablealt} Rest of World & \$4.4B & 9.7\% & 11.3\% \\
+\midrule
+\textbf{Total} & \textbf{\$45.2B} & \textbf{100\%} & \textbf{15.3\%} \\
+\bottomrule
+\end{tabular}
+\label{tab:regional}
+\end{table}
+```
+
+### Table with Trend Indicators
+```latex
+\begin{tabular}{@{}lrrl@{}}
+\toprule
+\textbf{Company} & \textbf{Revenue} & \textbf{Share} & \textbf{Trend} \\
+\midrule
+Company A & \$5.2B & 15.3\% & \trendup{} +12\% \\
+Company B & \$4.8B & 14.1\% & \trenddown{} -3\% \\
+Company C & \$4.2B & 12.4\% & \trendflat{} +1\% \\
+\bottomrule
+\end{tabular}
+```
+
+---
+
+## Figure Formatting
+
+### Standard Figure
+```latex
+\begin{figure}[htbp]
+\centering
+\includegraphics[width=0.9\textwidth]{../figures/market_growth.png}
+\caption{Market Growth Trajectory (2020-2030)}
+\label{fig:growth}
+\end{figure}
+```
+
+### Figure with Source Attribution
+```latex
+\begin{figure}[htbp]
+\centering
+\includegraphics[width=0.85\textwidth]{../figures/market_share.png}
+\caption{Market Share Distribution (2024)}
+\figuresource{Company annual reports, industry analysis}
+\label{fig:market_share}
+\end{figure}
+```
+
+---
+
+## List Formatting
+
+### Bullet Lists
+```latex
+\begin{itemize}
+ \item First item with automatic blue bullet
+ \item Second item
+ \item Third item
+\end{itemize}
+```
+
+### Numbered Lists
+```latex
+\begin{enumerate}
+ \item First item with blue number
+ \item Second item
+ \item Third item
+\end{enumerate}
+```
+
+### Nested Lists
+```latex
+\begin{itemize}
+ \item Main point
+ \begin{itemize}
+ \item Sub-point A
+ \item Sub-point B
+ \end{itemize}
+ \item Another main point
+\end{itemize}
+```
+
+---
+
+## Title Page
+
+### Using the Custom Title Command
+```latex
+\makemarketreporttitle
+ {Market Title} % Report title
+ {Subtitle Here} % Subtitle
+ {../figures/cover.png} % Hero image (leave empty for no image)
+ {January 2025} % Date
+ {Market Intelligence Team} % Author/prepared by
+```
+
+### Manual Title Page
+See the template for full manual title page code.
+
+---
+
+## Appendix Sections
+
+```latex
+\appendix
+
+\chapter{Methodology}
+
+\appendixsection{Data Sources}
+Content that appears in table of contents...
+```
+
+---
+
+## Common Patterns
+
+### Market Snapshot Section
+```latex
+\begin{marketdatabox}[Market Snapshot]
+\begin{itemize}
+ \item \textbf{Current Market Size:} \marketsize{45.2 billion}
+ \item \textbf{Projected Size (2030):} \marketsize{98.7 billion}
+ \item \textbf{CAGR:} \growthrate{15.3}
+ \item \textbf{Largest Segment:} Enterprise (42\% share)
+ \item \textbf{Fastest Growing Region:} APAC (\growthrate{22.1} CAGR)
+\end{itemize}
+\end{marketdatabox}
+```
+
+### Risk Register Summary
+```latex
+\begin{table}[htbp]
+\centering
+\caption{Risk Assessment Summary}
+\begin{tabular}{@{}llccl@{}}
+\toprule
+\textbf{Risk} & \textbf{Category} & \textbf{Prob.} & \textbf{Impact} & \textbf{Rating} \\
+\midrule
+Market disruption & Market & High & High & \riskhigh{} \\
+\rowcolor{tablealt} Regulatory change & Regulatory & Med & High & \riskhigh{} \\
+New entrant & Competitive & Med & Med & \riskmedium{} \\
+\rowcolor{tablealt} Tech obsolescence & Technology & Low & High & \riskmedium{} \\
+Currency fluctuation & Financial & Med & Low & \risklow{} \\
+\bottomrule
+\end{tabular}
+\end{table}
+```
+
+### Competitive Comparison Table
+```latex
+\begin{table}[htbp]
+\centering
+\caption{Competitive Comparison}
+\begin{tabular}{@{}lccccc@{}}
+\toprule
+\textbf{Factor} & \textbf{Co. A} & \textbf{Co. B} & \textbf{Co. C} & \textbf{Co. D} \\
+\midrule
+Market Share & \rating{5} & \rating{4} & \rating{3} & \rating{2} \\
+\rowcolor{tablealt} Product Quality & \rating{4} & \rating{5} & \rating{3} & \rating{4} \\
+Price Competitiveness & \rating{3} & \rating{3} & \rating{5} & \rating{4} \\
+\rowcolor{tablealt} Innovation & \rating{5} & \rating{4} & \rating{2} & \rating{3} \\
+Customer Service & \rating{4} & \rating{4} & \rating{4} & \rating{5} \\
+\bottomrule
+\end{tabular}
+\end{table}
+```
+
+---
+
+## Troubleshooting
+
+### Box Overflow
+If box content overflows the page, break into multiple boxes or use page breaks:
+```latex
+\newpage
+\begin{keyinsightbox}[Continued...]
+```
+
+### Figure Placement
+Use `[htbp]` for flexible placement, or `[H]` (requires `float` package) for exact placement:
+```latex
+\begin{figure}[H] % Requires \usepackage{float}
+```
+
+### Table Too Wide
+Use `\resizebox` or `adjustbox`:
+```latex
+\resizebox{\textwidth}{!}{
+\begin{tabular}{...}
+...
+\end{tabular}
+}
+```
+
+### Color Not Appearing
+Ensure `xcolor` package is loaded with `[table]` option (already included in style file).
+
+---
+
+## Compilation
+
+Compile with XeLaTeX for best results:
+```bash
+xelatex report.tex
+bibtex report
+xelatex report.tex
+xelatex report.tex
+```
+
+Or use latexmk:
+```bash
+latexmk -xelatex report.tex
+```
diff --git a/scientific-skills/market-research-reports/assets/market_report_template.tex b/scientific-skills/market-research-reports/assets/market_report_template.tex
new file mode 100644
index 0000000..244264b
--- /dev/null
+++ b/scientific-skills/market-research-reports/assets/market_report_template.tex
@@ -0,0 +1,1380 @@
+% !TEX program = xelatex
+% Market Research Report Template
+% Professional formatting for 50+ page comprehensive market reports
+% Use with market_research.sty style package
+
+\documentclass[11pt,letterpaper]{report}
+\usepackage{market_research}
+
+% ============================================================================
+% DOCUMENT METADATA - CUSTOMIZE THESE
+% ============================================================================
+\newcommand{\reporttitle}{[MARKET NAME]}
+\newcommand{\reportsubtitle}{Comprehensive Market Analysis Report}
+\newcommand{\reportdate}{\today}
+\newcommand{\reportauthor}{Market Intelligence Division}
+\newcommand{\reportclassification}{Confidential}
+
+% ============================================================================
+% PDF METADATA
+% ============================================================================
+\hypersetup{
+ pdftitle={\reporttitle{} - \reportsubtitle{}},
+ pdfauthor={\reportauthor{}},
+ pdfsubject={Market Research Report},
+ pdfkeywords={market research, market analysis, competitive landscape, strategic analysis}
+}
+
+% ============================================================================
+% DOCUMENT START
+% ============================================================================
+\begin{document}
+
+% ============================================================================
+% TITLE PAGE
+% ============================================================================
+% To use a hero image, replace the empty braces with the path:
+% \makemarketreporttitle{\reporttitle}{\reportsubtitle}{../figures/cover_image.png}{\reportdate}{\reportauthor}
+
+\begin{titlepage}
+\centering
+\vspace*{2cm}
+
+{\Huge\bfseries\color{primaryblue} \reporttitle\\[0.5cm]}
+{\LARGE\bfseries \reportsubtitle\\[1.5cm]}
+
+% VISUAL: Generate hero/cover image
+% python skills/generate-image/scripts/generate_image.py "Professional executive summary infographic for [MARKET] market research report, showing key metrics in modern data visualization style, blue and green color scheme, clean minimalist design" --output figures/cover_image.png
+% Uncomment below when image is generated:
+% \includegraphics[width=\textwidth]{../figures/cover_image.png}\\[1.5cm]
+
+\vspace{4cm}
+
+{\Large\bfseries Comprehensive Market Research Report\\[0.5cm]}
+{\large Strategic Intelligence for Business Decision-Making\\[3cm]}
+
+{\large
+\textbf{Date:} \reportdate\\[0.3cm]
+\textbf{Prepared By:} \reportauthor\\[0.3cm]
+\textbf{Classification:} \reportclassification\\[0.3cm]
+\textbf{Report Type:} Full Market Analysis
+}
+
+\vfill
+
+{\footnotesize
+\textit{This report contains market intelligence and strategic analysis based on publicly available data and proprietary research. All sources are cited and independently verifiable.}
+}
+
+\end{titlepage}
+
+% ============================================================================
+% FRONT MATTER
+% ============================================================================
+\pagenumbering{roman}
+
+% Table of Contents
+\tableofcontents
+\newpage
+
+% List of Figures
+\listoffigures
+\newpage
+
+% List of Tables
+\listoftables
+\newpage
+
+% ============================================================================
+% MAIN CONTENT
+% ============================================================================
+\pagenumbering{arabic}
+
+% ============================================================================
+% EXECUTIVE SUMMARY (2-3 pages)
+% ============================================================================
+\chapter{Executive Summary}
+
+\section{Report Overview}
+
+This comprehensive market analysis examines the \reporttitle{} market, providing strategic intelligence for investors, executives, and strategic planners. The report synthesizes data from authoritative sources including market research firms, regulatory agencies, industry associations, and enterprise surveys.
+
+% VISUAL: Executive summary infographic
+% python skills/scientific-schematics/scripts/generate_schematic.py "Executive summary infographic showing 4 key metrics: Market Size $XX.XB (2024), CAGR XX.X%, Top 3 Players, and Key Trend. Use blue boxes with white text, professional layout" -o figures/exec_summary_infographic.png --doc-type report
+
+\subsection{Market Snapshot}
+
+\begin{marketdatabox}[Market Snapshot: \reporttitle{}]
+\begin{itemize}[leftmargin=*]
+ \item \textbf{Current Market Size (2024):} \marketsize{X.XX billion}
+ \item \textbf{Projected Market Size (2034):} \marketsize{XX.XX billion}
+ \item \textbf{Compound Annual Growth Rate (CAGR):} \growthrate{XX.X}
+ \item \textbf{Growth Multiple:} Xx increase over 10 years
+ \item \textbf{Largest Segment:} [Segment Name] (XX\% market share)
+ \item \textbf{Fastest Growing Region:} [Region] (\growthrate{XX.X} CAGR)
+ \item \textbf{Current Enterprise Adoption:} XX\%
+\end{itemize}
+\end{marketdatabox}
+
+\subsection{Investment Thesis}
+
+The convergence of multiple market catalysts creates a compelling opportunity for investment and strategic action in the \reporttitle{} market:
+
+\begin{keyinsightbox}[Key Investment Drivers]
+\begin{enumerate}
+ \item \textbf{[Driver 1]:} [Brief explanation of why this driver creates opportunity]
+ \item \textbf{[Driver 2]:} [Brief explanation]
+ \item \textbf{[Driver 3]:} [Brief explanation]
+ \item \textbf{[Driver 4]:} [Brief explanation]
+\end{enumerate}
+\end{keyinsightbox}
+
+\subsection{Key Findings}
+
+\paragraph{Market Dynamics}
+[Summarize the most important findings about market size, growth, and dynamics. Include 3-5 key statistics with sources.]
+
+\paragraph{Competitive Landscape}
+[Summarize competitive dynamics, market concentration, and key players. Include market share of top players.]
+
+\paragraph{Growth Drivers}
+[Summarize the primary factors driving market growth and their expected impact.]
+
+\paragraph{Risk Factors}
+[Summarize the key risks that could impact market development.]
+
+\subsection{Strategic Recommendations}
+
+Based on the comprehensive analysis presented in this report, we recommend the following strategic actions:
+
+\begin{recommendationbox}[Top Strategic Recommendations]
+\begin{enumerate}
+ \item \textbf{[Recommendation 1]:} [Action-oriented recommendation with expected outcome]
+ \item \textbf{[Recommendation 2]:} [Action-oriented recommendation with expected outcome]
+ \item \textbf{[Recommendation 3]:} [Action-oriented recommendation with expected outcome]
+ \item \textbf{[Recommendation 4]:} [Action-oriented recommendation with expected outcome]
+ \item \textbf{[Recommendation 5]:} [Action-oriented recommendation with expected outcome]
+\end{enumerate}
+\end{recommendationbox}
+
+% ============================================================================
+% CHAPTER 1: MARKET OVERVIEW & DEFINITION (4-5 pages)
+% ============================================================================
+\chapter{Market Overview \& Definition}
+
+\section{Market Definition}
+
+[Provide a clear, comprehensive definition of the market being analyzed. Include:
+- What products/services are included
+- What is explicitly excluded
+- How this market relates to adjacent markets
+- Industry classification codes if applicable (NAICS, SIC)]
+
+\begin{calloutbox}[Market Definition]
+The \reporttitle{} market encompasses [comprehensive definition]. This includes [included elements] and excludes [excluded elements].
+\end{calloutbox}
+
+\subsection{Scope and Boundaries}
+
+\paragraph{Geographic Scope}
+[Define the geographic boundaries of the analysis - global, regional, or specific countries.]
+
+\paragraph{Product/Service Scope}
+[Define what products and services are included in the market definition.]
+
+\paragraph{Time Horizon}
+[Specify the historical period analyzed and the forecast period.]
+
+\subsection{Market Classification}
+
+[Provide detailed market classification and taxonomy, including:
+- Market segments
+- Sub-segments
+- Categories]
+
+\section{Industry Ecosystem}
+
+% VISUAL: Industry ecosystem diagram
+% python skills/scientific-schematics/scripts/generate_schematic.py "Industry ecosystem diagram showing value chain from [Raw Materials/Inputs] on left through [Manufacturing/Processing] through [Distribution] to [End Users] on right. Include key players at each stage. Use blue boxes connected by arrows" -o figures/industry_ecosystem.png --doc-type report
+
+[Describe the industry ecosystem and value chain, including:
+- Key stakeholders and their roles
+- Relationships between stakeholders
+- Value creation at each stage
+- Information and money flows]
+
+\begin{figure}[htbp]
+\centering
+% \includegraphics[width=0.95\textwidth]{../figures/industry_ecosystem.png}
+\caption{Industry Ecosystem and Value Chain}
+\label{fig:ecosystem}
+\end{figure}
+
+\subsection{Key Stakeholders}
+
+[Describe each category of stakeholder:]
+
+\paragraph{Suppliers/Vendors}
+[Description of upstream suppliers and their role.]
+
+\paragraph{Manufacturers/Service Providers}
+[Description of core market participants.]
+
+\paragraph{Distributors/Channels}
+[Description of distribution and go-to-market channels.]
+
+\paragraph{End Users/Customers}
+[Description of customer segments and their needs.]
+
+\paragraph{Regulators and Industry Bodies}
+[Description of regulatory environment and industry associations.]
+
+\section{Market Structure}
+
+% VISUAL: Market structure diagram
+% python skills/scientific-schematics/scripts/generate_schematic.py "Market structure diagram showing industry layers: [Core Market] in center, surrounded by [Adjacent Markets], with [Enabling Technologies] as foundation and [Regulatory Framework] as overlay. Use concentric rectangles" -o figures/market_structure.png --doc-type report
+
+[Describe the structure of the market:]
+
+\subsection{Market Concentration}
+
+[Analyze market concentration using metrics like:
+- Herfindahl-Hirschman Index (HHI)
+- CR4/CR8 concentration ratios
+- Market fragmentation assessment]
+
+\subsection{Industry Lifecycle Stage}
+
+[Identify where the market is in its lifecycle:
+- Introduction
+- Growth
+- Maturity
+- Decline]
+
+\section{Historical Context}
+
+[Provide historical background on the market:
+- When did the market emerge?
+- Key milestones in market development
+- Major industry shifts and disruptions
+- How has the market evolved over time?]
+
+% ============================================================================
+% CHAPTER 2: MARKET SIZE & GROWTH ANALYSIS (6-8 pages)
+% ============================================================================
+\chapter{Market Size \& Growth Analysis}
+
+\section{Total Addressable Market (TAM)}
+
+The Total Addressable Market represents the total revenue opportunity available if 100\% market share was achieved. Based on comprehensive analysis from multiple research sources:
+
+% VISUAL: Market growth trajectory
+% python skills/scientific-schematics/scripts/generate_schematic.py "Bar chart showing market growth from 2020 to 2034. Historical bars (2020-2024) in dark blue, projected bars (2025-2034) in light blue. Y-axis in billions USD, X-axis showing years. Include CAGR label. Title: [MARKET] Market Growth Trajectory" -o figures/market_growth_trajectory.png --doc-type report
+
+\begin{table}[htbp]
+\centering
+\caption{Global \reporttitle{} Market Projections (2024-2034)}
+\begin{tabular}{@{}lrrr@{}}
+\toprule
+\textbf{Year} & \textbf{Market Size (USD)} & \textbf{YoY Growth} & \textbf{CAGR} \\
+\midrule
+2024 & \$X.XX B & -- & -- \\
+\rowcolor{tablealt} 2025 & \$X.XX B & XX.X\% & XX.X\% \\
+2026 & \$X.XX B & XX.X\% & XX.X\% \\
+\rowcolor{tablealt} 2027 & \$X.XX B & XX.X\% & XX.X\% \\
+2028 & \$X.XX B & XX.X\% & XX.X\% \\
+\rowcolor{tablealt} 2029 & \$X.XX B & XX.X\% & XX.X\% \\
+2030 & \$X.XX B & XX.X\% & XX.X\% \\
+\rowcolor{tablealt} 2031 & \$X.XX B & XX.X\% & XX.X\% \\
+2032 & \$X.XX B & XX.X\% & XX.X\% \\
+\rowcolor{tablealt} 2033 & \$X.XX B & XX.X\% & XX.X\% \\
+2034 & \$X.XX B & XX.X\% & XX.X\% \\
+\bottomrule
+\end{tabular}
+\label{tab:tam_projections}
+\end{table}
+
+\textbf{Source:} [Primary research source, year]
+
+\begin{figure}[htbp]
+\centering
+% \includegraphics[width=0.9\textwidth]{../figures/market_growth_trajectory.png}
+\caption{Market Growth Trajectory (2020-2034)}
+\label{fig:market_growth}
+\end{figure}
+
+\subsection{Historical Growth Analysis}
+
+[Analyze historical market performance over the past 5-10 years:
+- Historical CAGR
+- Key growth periods and drivers
+- Impact of major events (recessions, disruptions, etc.)
+- Comparison to overall economic growth]
+
+\subsection{Growth Projections Methodology}
+
+[Explain the methodology behind growth projections:
+- Key assumptions
+- Data sources
+- Modeling approach
+- Confidence intervals]
+
+\section{Serviceable Addressable Market (SAM)}
+
+The Serviceable Addressable Market represents the portion of TAM that can be served given current product offerings, geographic presence, and regulatory constraints.
+
+% VISUAL: TAM/SAM/SOM diagram
+% python skills/scientific-schematics/scripts/generate_schematic.py "TAM SAM SOM concentric circle diagram. Outer circle: TAM $XXB (Total Addressable Market). Middle circle: SAM $XXB (Serviceable Addressable Market). Inner circle: SOM $XXB (Serviceable Obtainable Market). Labels with arrows pointing to each. Professional blue color scheme" -o figures/tam_sam_som.png --doc-type report
+
+\begin{figure}[htbp]
+\centering
+% \includegraphics[width=0.8\textwidth]{../figures/tam_sam_som.png}
+\caption{TAM/SAM/SOM Market Opportunity Breakdown}
+\label{fig:tam_sam_som}
+\end{figure}
+
+\begin{table}[htbp]
+\centering
+\caption{Market Segments Within SAM (2024 vs 2034)}
+\begin{tabular}{@{}lrrrr@{}}
+\toprule
+\textbf{Segment} & \textbf{2024 Value} & \textbf{2034 Value} & \textbf{CAGR} & \textbf{Share} \\
+\midrule
+Segment A & \$X.XX B & \$XX.XX B & XX.X\% & XX\% \\
+\rowcolor{tablealt} Segment B & \$X.XX B & \$XX.XX B & XX.X\% & XX\% \\
+Segment C & \$X.XX B & \$XX.XX B & XX.X\% & XX\% \\
+\rowcolor{tablealt} Segment D & \$X.XX B & \$XX.XX B & XX.X\% & XX\% \\
+Segment E & \$X.XX B & \$XX.XX B & XX.X\% & XX\% \\
+\midrule
+\textbf{Total SAM} & \textbf{\$X.XX B} & \textbf{\$XX.XX B} & \textbf{XX.X\%} & \textbf{100\%} \\
+\bottomrule
+\end{tabular}
+\label{tab:sam_segments}
+\end{table}
+
+\section{Serviceable Obtainable Market (SOM)}
+
+The Serviceable Obtainable Market represents the realistic market share capture based on competitive dynamics, go-to-market capabilities, and strategic positioning.
+
+\begin{keyinsightbox}[SOM Projections (2034)]
+\textbf{Conservative Scenario (XX\% Market Share):} \marketsize{X.X billion}
+\begin{itemize}
+ \item Assumes competitive market with multiple major players
+ \item Typical XX-XX month enterprise sales cycles
+ \item Focus on [specific segments]
+\end{itemize}
+
+\textbf{Base Case Scenario (XX\% Market Share):} \marketsize{X.X billion}
+\begin{itemize}
+ \item Captures first-mover advantages in key segments
+ \item Strong product-market fit
+ \item Established partnership ecosystem
+\end{itemize}
+
+\textbf{Optimistic Scenario (XX\% Market Share):} \marketsize{X.X billion}
+\begin{itemize}
+ \item Market leadership position
+ \item Platform effects and network advantages
+ \item Proprietary advantages and moats
+\end{itemize}
+\end{keyinsightbox}
+
+\section{Regional Market Analysis}
+
+% VISUAL: Regional breakdown
+% python skills/scientific-schematics/scripts/generate_schematic.py "Pie chart or treemap showing regional market breakdown. North America XX%, Europe XX%, Asia-Pacific XX%, Latin America XX%, Middle East & Africa XX%. Use distinct colors for each region. Include both percentage and dollar values" -o figures/regional_breakdown.png --doc-type report
+
+\begin{figure}[htbp]
+\centering
+% \includegraphics[width=0.8\textwidth]{../figures/regional_breakdown.png}
+\caption{Market Size by Region (2024)}
+\label{fig:regional_breakdown}
+\end{figure}
+
+\begin{table}[htbp]
+\centering
+\caption{Regional Market Size and Growth}
+\begin{tabular}{@{}lrrrr@{}}
+\toprule
+\textbf{Region} & \textbf{2024 Size} & \textbf{Share} & \textbf{CAGR} & \textbf{2034 Size} \\
+\midrule
+North America & \$X.XX B & XX.X\% & XX.X\% & \$XX.XX B \\
+\rowcolor{tablealt} Europe & \$X.XX B & XX.X\% & XX.X\% & \$XX.XX B \\
+Asia-Pacific & \$X.XX B & XX.X\% & XX.X\% & \$XX.XX B \\
+\rowcolor{tablealt} Latin America & \$X.XX B & XX.X\% & XX.X\% & \$XX.XX B \\
+Middle East \& Africa & \$X.XX B & XX.X\% & XX.X\% & \$XX.XX B \\
+\midrule
+\textbf{Global Total} & \textbf{\$X.XX B} & \textbf{100\%} & \textbf{XX.X\%} & \textbf{\$XX.XX B} \\
+\bottomrule
+\end{tabular}
+\label{tab:regional_market}
+\end{table}
+
+\subsection{North America}
+[Detailed analysis of North American market including US and Canada specifics.]
+
+\subsection{Europe}
+[Detailed analysis of European market including key country breakdowns.]
+
+\subsection{Asia-Pacific}
+[Detailed analysis of APAC market with focus on China, Japan, India, and emerging markets.]
+
+\subsection{Rest of World}
+[Analysis of Latin America, Middle East, and Africa markets.]
+
+\section{Segment Analysis}
+
+% VISUAL: Segment growth comparison
+% python skills/scientific-schematics/scripts/generate_schematic.py "Horizontal bar chart comparing segment growth rates. Segments listed on Y-axis, CAGR percentage on X-axis. Bars colored from green (highest growth) to blue (lowest growth). Include data labels on each bar" -o figures/segment_growth.png --doc-type report
+
+\begin{figure}[htbp]
+\centering
+% \includegraphics[width=0.9\textwidth]{../figures/segment_growth.png}
+\caption{Segment Growth Rate Comparison (CAGR 2024-2034)}
+\label{fig:segment_growth}
+\end{figure}
+
+[Provide detailed analysis of each market segment including:
+- Current size and market share
+- Growth trajectory
+- Key drivers for each segment
+- Competitive dynamics within segment]
+
+% ============================================================================
+% CHAPTER 3: INDUSTRY DRIVERS & TRENDS (5-6 pages)
+% ============================================================================
+\chapter{Industry Drivers \& Trends}
+
+\section{Primary Growth Drivers}
+
+[Identify and analyze the key factors driving market growth:]
+
+% VISUAL: Driver impact matrix
+% python skills/scientific-schematics/scripts/generate_schematic.py "2x2 matrix showing market drivers. X-axis: Impact (Low to High). Y-axis: Likelihood (Low to High). Plot 8-10 drivers as circles. Upper-right quadrant labeled 'Critical Drivers', lower-right 'Watch Carefully', upper-left 'Monitor', lower-left 'Lower Priority'. Professional blue and green colors" -o figures/driver_impact_matrix.png --doc-type report
+
+\begin{figure}[htbp]
+\centering
+% \includegraphics[width=0.85\textwidth]{../figures/driver_impact_matrix.png}
+\caption{Market Driver Impact Assessment Matrix}
+\label{fig:driver_matrix}
+\end{figure}
+
+\subsection{Driver 1: [Name]}
+[Detailed analysis of this driver including:
+- How it affects the market
+- Quantified impact
+- Timeline for impact
+- Supporting evidence and data]
+
+\subsection{Driver 2: [Name]}
+[Detailed analysis]
+
+\subsection{Driver 3: [Name]}
+[Detailed analysis]
+
+\subsection{Driver 4: [Name]}
+[Detailed analysis]
+
+\subsection{Driver 5: [Name]}
+[Detailed analysis]
+
+\section{PESTLE Analysis}
+
+% VISUAL: PESTLE diagram
+% python skills/scientific-schematics/scripts/generate_schematic.py "PESTLE analysis diagram with center hexagon labeled 'Market' surrounded by 6 hexagons: Political (red), Economic (blue), Social (green), Technological (orange), Legal (purple), Environmental (teal). Each outer hexagon contains 2-3 bullet points of key factors" -o figures/pestle_analysis.png --doc-type report
+
+\begin{figure}[htbp]
+\centering
+% \includegraphics[width=0.9\textwidth]{../figures/pestle_analysis.png}
+\caption{PESTLE Analysis Framework}
+\label{fig:pestle}
+\end{figure}
+
+\subsection{Political Factors}
+[Analysis of political factors affecting the market:
+- Government policies
+- Political stability
+- Trade policies
+- Tax regulations]
+
+\subsection{Economic Factors}
+[Analysis of economic factors:
+- Economic growth
+- Interest rates
+- Inflation
+- Exchange rates
+- Consumer spending]
+
+\subsection{Social Factors}
+[Analysis of social factors:
+- Demographics
+- Cultural trends
+- Consumer attitudes
+- Workforce trends]
+
+\subsection{Technological Factors}
+[Analysis of technological factors:
+- Technology adoption
+- R\&D activity
+- Automation
+- Digital transformation]
+
+\subsection{Legal Factors}
+[Analysis of legal factors:
+- Industry regulations
+- Compliance requirements
+- Intellectual property
+- Employment laws]
+
+\subsection{Environmental Factors}
+[Analysis of environmental factors:
+- Sustainability requirements
+- Environmental regulations
+- Climate impact
+- Resource availability]
+
+\section{Emerging Trends}
+
+% VISUAL: Trends timeline
+% python skills/scientific-schematics/scripts/generate_schematic.py "Horizontal timeline showing emerging trends from 2024 to 2030. Mark 6-8 trends at different points on timeline with icons and labels. Use different colors for Technology trends (blue), Market trends (green), and Regulatory trends (orange). Include brief descriptions below each trend" -o figures/trends_timeline.png --doc-type report
+
+\begin{figure}[htbp]
+\centering
+% \includegraphics[width=\textwidth]{../figures/trends_timeline.png}
+\caption{Emerging Industry Trends Timeline}
+\label{fig:trends}
+\end{figure}
+
+[Identify and analyze emerging trends that will shape the market:]
+
+\subsection{Trend 1: [Name]}
+[Detailed trend analysis]
+
+\subsection{Trend 2: [Name]}
+[Detailed trend analysis]
+
+\subsection{Trend 3: [Name]}
+[Detailed trend analysis]
+
+\section{Growth Inhibitors}
+
+[Identify factors that could slow market growth:
+- Market barriers
+- Resource constraints
+- Adoption challenges
+- Competitive pressures]
+
+% ============================================================================
+% CHAPTER 4: COMPETITIVE LANDSCAPE (6-8 pages)
+% ============================================================================
+\chapter{Competitive Landscape}
+
+\section{Market Structure Analysis}
+
+[Analyze the competitive structure of the market:]
+
+\subsection{Market Concentration}
+
+[Provide market concentration analysis:
+- Number of competitors
+- Market share distribution
+- Concentration metrics (HHI, CR4)]
+
+\section{Porter's Five Forces Analysis}
+
+% VISUAL: Porter's Five Forces
+% python skills/scientific-schematics/scripts/generate_schematic.py "Porter's Five Forces diagram. Center box labeled 'Competitive Rivalry: [HIGH/MEDIUM/LOW]'. Four boxes around it connected by arrows: 'Threat of New Entrants: [RATING]' (top), 'Bargaining Power of Suppliers: [RATING]' (left), 'Bargaining Power of Buyers: [RATING]' (right), 'Threat of Substitutes: [RATING]' (bottom). Color code by rating: High=red, Medium=orange, Low=green" -o figures/porters_five_forces.png --doc-type report
+
+\begin{figure}[htbp]
+\centering
+% \includegraphics[width=0.85\textwidth]{../figures/porters_five_forces.png}
+\caption{Porter's Five Forces Analysis}
+\label{fig:porter}
+\end{figure}
+
+\begin{porterbox}[Porter's Five Forces Summary]
+\begin{tabular}{@{}ll@{}}
+\textbf{Force} & \textbf{Rating} \\
+\midrule
+Threat of New Entrants & \riskmedium{} \\
+Bargaining Power of Suppliers & \risklow{} \\
+Bargaining Power of Buyers & \riskhigh{} \\
+Threat of Substitutes & \risklow{} \\
+Competitive Rivalry & \riskhigh{} \\
+\end{tabular}
+\end{porterbox}
+
+\subsection{Threat of New Entrants}
+[Detailed analysis of barriers to entry and threat level]
+
+\subsection{Bargaining Power of Suppliers}
+[Detailed analysis of supplier power dynamics]
+
+\subsection{Bargaining Power of Buyers}
+[Detailed analysis of buyer power dynamics]
+
+\subsection{Threat of Substitutes}
+[Detailed analysis of substitute products/services]
+
+\subsection{Competitive Rivalry}
+[Detailed analysis of competitive intensity]
+
+\section{Market Share Analysis}
+
+% VISUAL: Market share chart
+% python skills/scientific-schematics/scripts/generate_schematic.py "Pie chart showing market share of top 10 companies. Company A XX%, Company B XX%, Company C XX%, [etc.], Others XX%. Use distinct colors for each company. Include legend with company names and percentages" -o figures/market_share.png --doc-type report
+
+\begin{figure}[htbp]
+\centering
+% \includegraphics[width=0.8\textwidth]{../figures/market_share.png}
+\caption{Market Share by Company (2024)}
+\label{fig:market_share}
+\end{figure}
+
+\begin{table}[htbp]
+\centering
+\caption{Top 10 Companies by Market Share}
+\begin{tabular}{@{}clrrr@{}}
+\toprule
+\textbf{Rank} & \textbf{Company} & \textbf{Revenue} & \textbf{Share} & \textbf{YoY Growth} \\
+\midrule
+1 & Company A & \$X.XX B & XX.X\% & \trendup{} XX\% \\
+\rowcolor{tablealt} 2 & Company B & \$X.XX B & XX.X\% & \trendup{} XX\% \\
+3 & Company C & \$X.XX B & XX.X\% & \trendflat{} XX\% \\
+\rowcolor{tablealt} 4 & Company D & \$X.XX B & XX.X\% & \trendup{} XX\% \\
+5 & Company E & \$X.XX B & XX.X\% & \trenddown{} XX\% \\
+\rowcolor{tablealt} 6 & Company F & \$X.XX B & XX.X\% & \trendup{} XX\% \\
+7 & Company G & \$X.XX B & XX.X\% & \trendup{} XX\% \\
+\rowcolor{tablealt} 8 & Company H & \$X.XX B & XX.X\% & \trendflat{} XX\% \\
+9 & Company I & \$X.XX B & XX.X\% & \trendup{} XX\% \\
+\rowcolor{tablealt} 10 & Company J & \$X.XX B & XX.X\% & \trenddown{} XX\% \\
+\midrule
+& Others & \$X.XX B & XX.X\% & -- \\
+\bottomrule
+\end{tabular}
+\label{tab:market_share}
+\end{table}
+
+\section{Competitive Positioning}
+
+% VISUAL: Competitive positioning matrix
+% python skills/scientific-schematics/scripts/generate_schematic.py "2x2 competitive positioning matrix. X-axis: 'Market Focus' from Niche (left) to Broad (right). Y-axis: 'Solution Approach' from Product (bottom) to Platform (top). Plot 8-10 companies as labeled circles of varying sizes (representing market share). Include quadrant labels" -o figures/competitive_positioning.png --doc-type report
+
+\begin{figure}[htbp]
+\centering
+% \includegraphics[width=0.9\textwidth]{../figures/competitive_positioning.png}
+\caption{Competitive Positioning Matrix}
+\label{fig:competitive_positioning}
+\end{figure}
+
+[Analyze how competitors are positioned in the market based on key dimensions:]
+
+\subsection{Strategic Groups}
+
+% VISUAL: Strategic group map
+% python skills/scientific-schematics/scripts/generate_schematic.py "Strategic group map with circles representing different strategic groups. X-axis: Geographic Scope (Regional to Global). Y-axis: Product Breadth (Narrow to Broad). Each circle contains multiple company names and is sized by collective market share. 4-5 distinct groups" -o figures/strategic_groups.png --doc-type report
+
+\begin{figure}[htbp]
+\centering
+% \includegraphics[width=0.85\textwidth]{../figures/strategic_groups.png}
+\caption{Strategic Group Mapping}
+\label{fig:strategic_groups}
+\end{figure}
+
+[Identify and describe strategic groups within the competitive landscape]
+
+\section{Competitive Dynamics}
+
+[Analyze competitive behaviors and dynamics:
+- Recent M\&A activity
+- Partnership announcements
+- Product launches
+- Pricing trends
+- Geographic expansion]
+
+\section{Barriers to Entry}
+
+[Analyze barriers that protect incumbents and challenge new entrants:
+- Capital requirements
+- Regulatory barriers
+- Technology barriers
+- Brand and reputation
+- Distribution access
+- Economies of scale]
+
+% ============================================================================
+% CHAPTER 5: CUSTOMER ANALYSIS & SEGMENTATION (4-5 pages)
+% ============================================================================
+\chapter{Customer Analysis \& Segmentation}
+
+\section{Customer Segmentation}
+
+% VISUAL: Customer segmentation
+% python skills/scientific-schematics/scripts/generate_schematic.py "Treemap or pie chart showing customer segments. Segment A XX% (large enterprises), Segment B XX% (mid-market), Segment C XX% (SMB), Segment D XX% (other). Size represents market share. Use distinct colors" -o figures/customer_segments.png --doc-type report
+
+\begin{figure}[htbp]
+\centering
+% \includegraphics[width=0.85\textwidth]{../figures/customer_segments.png}
+\caption{Customer Segmentation by Market Share}
+\label{fig:customer_segments}
+\end{figure}
+
+\begin{table}[htbp]
+\centering
+\caption{Customer Segment Analysis}
+\begin{tabular}{@{}lrrrr@{}}
+\toprule
+\textbf{Segment} & \textbf{Size} & \textbf{Growth} & \textbf{Avg. Deal} & \textbf{CAC} \\
+\midrule
+Large Enterprise & \$X.XX B & XX\% & \$XXX K & \$XX K \\
+\rowcolor{tablealt} Mid-Market & \$X.XX B & XX\% & \$XX K & \$X K \\
+SMB & \$X.XX B & XX\% & \$X K & \$X K \\
+\rowcolor{tablealt} Consumer & \$X.XX B & XX\% & \$XXX & \$XX \\
+\bottomrule
+\end{tabular}
+\label{tab:customer_segments}
+\end{table}
+
+\subsection{Segment A: [Large Enterprise]}
+[Detailed segment analysis including:
+- Segment characteristics
+- Buying behavior
+- Key needs and pain points
+- Decision-making process
+- Willingness to pay]
+
+\subsection{Segment B: [Mid-Market]}
+[Detailed segment analysis]
+
+\subsection{Segment C: [SMB]}
+[Detailed segment analysis]
+
+\subsection{Segment D: [Other]}
+[Detailed segment analysis]
+
+\section{Segment Attractiveness}
+
+% VISUAL: Segment attractiveness matrix
+% python skills/scientific-schematics/scripts/generate_schematic.py "2x2 segment attractiveness matrix. X-axis: Segment Size (Small to Large). Y-axis: Growth Rate (Low to High). Plot customer segments as circles. Upper-right: 'Priority', Upper-left: 'Invest to Grow', Lower-right: 'Harvest', Lower-left: 'Deprioritize'. Include segment labels" -o figures/segment_attractiveness.png --doc-type report
+
+\begin{figure}[htbp]
+\centering
+% \includegraphics[width=0.85\textwidth]{../figures/segment_attractiveness.png}
+\caption{Customer Segment Attractiveness Matrix}
+\label{fig:segment_attractiveness}
+\end{figure}
+
+[Analyze which segments are most attractive for investment and focus]
+
+\section{Customer Needs Analysis}
+
+[Identify and prioritize customer needs by segment:
+- Functional needs
+- Emotional needs
+- Social needs
+- Pain points
+- Unmet needs]
+
+\section{Buying Behavior}
+
+[Analyze how customers buy in this market:
+- Purchase triggers
+- Decision-making process
+- Key influencers
+- Evaluation criteria
+- Purchase channels]
+
+% VISUAL: Customer journey
+% python skills/scientific-schematics/scripts/generate_schematic.py "Customer journey diagram showing 5 stages: Awareness → Consideration → Decision → Implementation → Advocacy. Each stage shows key activities, pain points, and touchpoints. Use horizontal flow with icons for each stage" -o figures/customer_journey.png --doc-type report
+
+\begin{figure}[htbp]
+\centering
+% \includegraphics[width=\textwidth]{../figures/customer_journey.png}
+\caption{Customer Journey Map}
+\label{fig:customer_journey}
+\end{figure}
+
+% ============================================================================
+% CHAPTER 6: TECHNOLOGY & INNOVATION LANDSCAPE (4-5 pages)
+% ============================================================================
+\chapter{Technology \& Innovation Landscape}
+
+\section{Current Technology Stack}
+
+[Describe the technology infrastructure and stack commonly used in the market]
+
+\section{Technology Roadmap}
+
+% VISUAL: Technology roadmap
+% python skills/scientific-schematics/scripts/generate_schematic.py "Technology roadmap timeline from 2024 to 2030. Show 3 parallel tracks: Core Technology (blue), Emerging Technology (green), and Enabling Technology (orange). Mark key milestones and technology introductions on each track. Use horizontal timeline format" -o figures/technology_roadmap.png --doc-type report
+
+\begin{figure}[htbp]
+\centering
+% \includegraphics[width=\textwidth]{../figures/technology_roadmap.png}
+\caption{Technology Evolution Roadmap (2024-2030)}
+\label{fig:tech_roadmap}
+\end{figure}
+
+[Describe how technology is expected to evolve:
+- Near-term (1-2 years)
+- Medium-term (3-5 years)
+- Long-term (5-10 years)]
+
+\section{Emerging Technologies}
+
+[Analyze emerging technologies that could impact the market:
+- Technology description
+- Current maturity level
+- Expected timeline to mainstream adoption
+- Potential impact on market]
+
+\subsection{Technology 1: [Name]}
+[Detailed analysis]
+
+\subsection{Technology 2: [Name]}
+[Detailed analysis]
+
+\subsection{Technology 3: [Name]}
+[Detailed analysis]
+
+\section{Innovation Trends}
+
+% VISUAL: Innovation matrix
+% python skills/scientific-schematics/scripts/generate_schematic.py "Innovation adoption curve or hype cycle diagram showing where key technologies sit. From left to right: Innovation Trigger, Peak of Inflated Expectations, Trough of Disillusionment, Slope of Enlightenment, Plateau of Productivity. Plot 6-8 technologies at different points" -o figures/innovation_curve.png --doc-type report
+
+\begin{figure}[htbp]
+\centering
+% \includegraphics[width=\textwidth]{../figures/innovation_curve.png}
+\caption{Technology Adoption Curve / Hype Cycle}
+\label{fig:innovation}
+\end{figure}
+
+[Analyze innovation trends and R\&D activity:
+- R\&D investment levels
+- Patent filing trends
+- Startup activity
+- Corporate innovation initiatives]
+
+\section{Technology Adoption Barriers}
+
+[Identify barriers to technology adoption:
+- Technical complexity
+- Integration challenges
+- Cost barriers
+- Skills gaps
+- Security/privacy concerns]
+
+% ============================================================================
+% CHAPTER 7: REGULATORY & POLICY ENVIRONMENT (3-4 pages)
+% ============================================================================
+\chapter{Regulatory \& Policy Environment}
+
+\section{Current Regulatory Framework}
+
+[Describe the current regulatory landscape:
+- Key regulations
+- Regulatory bodies
+- Compliance requirements
+- Enforcement mechanisms]
+
+\section{Regulatory Timeline}
+
+% VISUAL: Regulatory timeline
+% python skills/scientific-schematics/scripts/generate_schematic.py "Regulatory timeline from 2020 to 2028. Show key regulatory milestones as markers on horizontal timeline. Past events in dark blue, future/upcoming in light blue. Include regulation names and effective dates. Mark current date with vertical line" -o figures/regulatory_timeline.png --doc-type report
+
+\begin{figure}[htbp]
+\centering
+% \includegraphics[width=\textwidth]{../figures/regulatory_timeline.png}
+\caption{Regulatory Development Timeline}
+\label{fig:regulatory_timeline}
+\end{figure}
+
+[Chronological analysis of regulatory developments]
+
+\section{Regulatory Impact Analysis}
+
+[Analyze how regulations impact the market:
+- Compliance costs
+- Market access implications
+- Competitive implications
+- Product/service requirements]
+
+\section{Policy Trends}
+
+[Identify policy trends that could affect the market:
+- Government priorities
+- Funding initiatives
+- Trade policies
+- Environmental policies]
+
+\section{Regional Regulatory Differences}
+
+[Compare regulatory environments across regions:
+- North America
+- Europe
+- Asia-Pacific
+- Other regions]
+
+% ============================================================================
+% CHAPTER 8: RISK ANALYSIS (3-4 pages)
+% ============================================================================
+\chapter{Risk Analysis}
+
+\section{Risk Overview}
+
+[Provide overview of key risks facing market participants]
+
+\section{Risk Assessment}
+
+% VISUAL: Risk heatmap
+% python skills/scientific-schematics/scripts/generate_schematic.py "Risk heatmap matrix. X-axis: Impact (Low to Critical). Y-axis: Probability (Unlikely to Very Likely). Plot 10-12 risks as labeled circles. Color code: Green (low risk), Yellow (medium), Orange (high), Red (critical). Include risk labels" -o figures/risk_heatmap.png --doc-type report
+
+\begin{figure}[htbp]
+\centering
+% \includegraphics[width=0.9\textwidth]{../figures/risk_heatmap.png}
+\caption{Risk Assessment Heatmap}
+\label{fig:risk_heatmap}
+\end{figure}
+
+\begin{table}[htbp]
+\centering
+\caption{Risk Register Summary}
+\begin{tabular}{@{}llccl@{}}
+\toprule
+\textbf{Risk} & \textbf{Category} & \textbf{Probability} & \textbf{Impact} & \textbf{Rating} \\
+\midrule
+Risk 1 & Market & High & High & \riskhigh{} \\
+\rowcolor{tablealt} Risk 2 & Regulatory & Medium & High & \riskhigh{} \\
+Risk 3 & Technology & Medium & Medium & \riskmedium{} \\
+\rowcolor{tablealt} Risk 4 & Competitive & High & Medium & \riskmedium{} \\
+Risk 5 & Operational & Low & High & \riskmedium{} \\
+\rowcolor{tablealt} Risk 6 & Financial & Low & Medium & \risklow{} \\
+\bottomrule
+\end{tabular}
+\label{tab:risk_register}
+\end{table}
+
+\subsection{Market Risks}
+[Detailed analysis of market-related risks]
+
+\subsection{Competitive Risks}
+[Detailed analysis of competitive risks]
+
+\subsection{Regulatory Risks}
+[Detailed analysis of regulatory risks]
+
+\subsection{Technology Risks}
+[Detailed analysis of technology risks]
+
+\subsection{Operational Risks}
+[Detailed analysis of operational risks]
+
+\subsection{Financial Risks}
+[Detailed analysis of financial risks]
+
+\section{Risk Mitigation Strategies}
+
+% VISUAL: Risk mitigation matrix
+% python skills/scientific-schematics/scripts/generate_schematic.py "Risk mitigation matrix showing risks in left column and corresponding mitigation strategies in right column. Connect risks to mitigations with arrows. Color code by risk severity. Include both prevention and response strategies" -o figures/risk_mitigation.png --doc-type report
+
+\begin{figure}[htbp]
+\centering
+% \includegraphics[width=0.9\textwidth]{../figures/risk_mitigation.png}
+\caption{Risk Mitigation Framework}
+\label{fig:risk_mitigation}
+\end{figure}
+
+[Describe strategies to mitigate identified risks]
+
+\begin{riskbox}[Risk Mitigation Summary]
+\begin{enumerate}
+ \item \textbf{[Risk 1]:} [Mitigation strategy]
+ \item \textbf{[Risk 2]:} [Mitigation strategy]
+ \item \textbf{[Risk 3]:} [Mitigation strategy]
+ \item \textbf{[Risk 4]:} [Mitigation strategy]
+\end{enumerate}
+\end{riskbox}
+
+% ============================================================================
+% CHAPTER 9: STRATEGIC OPPORTUNITIES & RECOMMENDATIONS (4-5 pages)
+% ============================================================================
+\chapter{Strategic Opportunities \& Recommendations}
+
+\section{Opportunity Analysis}
+
+% VISUAL: Opportunity matrix
+% python skills/scientific-schematics/scripts/generate_schematic.py "2x2 opportunity matrix. X-axis: Market Attractiveness (Low to High). Y-axis: Ability to Win (Low to High). Plot 6-8 opportunities as labeled circles of varying sizes. Upper-right: 'Pursue Aggressively', Upper-left: 'Selective Investment', Lower-right: 'Build Capabilities', Lower-left: 'Avoid'" -o figures/opportunity_matrix.png --doc-type report
+
+\begin{figure}[htbp]
+\centering
+% \includegraphics[width=0.9\textwidth]{../figures/opportunity_matrix.png}
+\caption{Strategic Opportunity Assessment Matrix}
+\label{fig:opportunity_matrix}
+\end{figure}
+
+[Identify and analyze strategic opportunities in the market]
+
+\subsection{Opportunity 1: [Name]}
+\begin{opportunitybox}[Opportunity: [Name]]
+\textbf{Description:} [Brief description]
+
+\textbf{Market Size:} \marketsize{X.X billion}
+
+\textbf{Growth Rate:} \growthrate{XX.X}
+
+\textbf{Strategic Fit:} \rating{4}
+
+\textbf{Investment Required:} \$XX million
+\end{opportunitybox}
+
+[Detailed analysis of the opportunity]
+
+\subsection{Opportunity 2: [Name]}
+[Detailed analysis]
+
+\subsection{Opportunity 3: [Name]}
+[Detailed analysis]
+
+\section{Strategic Options Analysis}
+
+[Analyze different strategic approaches:
+- Build (organic development)
+- Buy (M\&A)
+- Partner (strategic alliances)
+- Ignore (not pursue)]
+
+\section{Prioritized Recommendations}
+
+% VISUAL: Recommendation priority matrix
+% python skills/scientific-schematics/scripts/generate_schematic.py "Priority matrix showing recommendations. X-axis: Effort/Investment (Low to High). Y-axis: Impact/Value (Low to High). Plot 6-8 recommendations. Upper-left: 'Quick Wins', Upper-right: 'Major Projects', Lower-left: 'Fill-ins', Lower-right: 'Thankless Tasks'. Label each recommendation" -o figures/recommendation_priority.png --doc-type report
+
+\begin{figure}[htbp]
+\centering
+% \includegraphics[width=0.85\textwidth]{../figures/recommendation_priority.png}
+\caption{Recommendation Priority Framework}
+\label{fig:recommendations}
+\end{figure}
+
+\begin{recommendationbox}[Strategic Recommendations]
+\textbf{Tier 1: Immediate Priority}
+\begin{enumerate}
+ \item \textbf{[Recommendation 1]:} [Detailed action with expected outcome, timeline, and investment]
+ \item \textbf{[Recommendation 2]:} [Detailed action]
+\end{enumerate}
+
+\textbf{Tier 2: Near-Term (6-12 months)}
+\begin{enumerate}[start=3]
+ \item \textbf{[Recommendation 3]:} [Detailed action]
+ \item \textbf{[Recommendation 4]:} [Detailed action]
+\end{enumerate}
+
+\textbf{Tier 3: Medium-Term (1-2 years)}
+\begin{enumerate}[start=5]
+ \item \textbf{[Recommendation 5]:} [Detailed action]
+ \item \textbf{[Recommendation 6]:} [Detailed action]
+\end{enumerate}
+\end{recommendationbox}
+
+\section{Success Factors}
+
+[Identify critical success factors for implementing recommendations:
+- Organizational capabilities
+- Resource requirements
+- Timing considerations
+- External dependencies]
+
+% ============================================================================
+% CHAPTER 10: IMPLEMENTATION ROADMAP (3-4 pages)
+% ============================================================================
+\chapter{Implementation Roadmap}
+
+\section{Implementation Overview}
+
+[Provide overview of implementation approach and timeline]
+
+\section{Phased Implementation Plan}
+
+% VISUAL: Implementation timeline
+% python skills/scientific-schematics/scripts/generate_schematic.py "Gantt chart style implementation timeline showing 4 phases over 24 months. Phase 1: Foundation (months 1-6), Phase 2: Build (months 4-12), Phase 3: Scale (months 10-18), Phase 4: Optimize (months 16-24). Show overlapping phases with key milestones marked. Use different colors for each phase" -o figures/implementation_timeline.png --doc-type report
+
+\begin{figure}[htbp]
+\centering
+% \includegraphics[width=\textwidth]{../figures/implementation_timeline.png}
+\caption{Implementation Roadmap Timeline}
+\label{fig:implementation}
+\end{figure}
+
+\subsection{Phase 1: Foundation (Months 1-6)}
+[Detailed activities and deliverables for Phase 1]
+
+\subsection{Phase 2: Build (Months 4-12)}
+[Detailed activities and deliverables for Phase 2]
+
+\subsection{Phase 3: Scale (Months 10-18)}
+[Detailed activities and deliverables for Phase 3]
+
+\subsection{Phase 4: Optimize (Months 16-24)}
+[Detailed activities and deliverables for Phase 4]
+
+\section{Key Milestones}
+
+% VISUAL: Milestone tracker
+% python skills/scientific-schematics/scripts/generate_schematic.py "Milestone tracker showing 8-10 key milestones on a horizontal timeline. Each milestone has a date, name, and status indicator (completed=green checkmark, in-progress=yellow circle, upcoming=gray circle). Group by phase" -o figures/milestone_tracker.png --doc-type report
+
+\begin{figure}[htbp]
+\centering
+% \includegraphics[width=\textwidth]{../figures/milestone_tracker.png}
+\caption{Key Implementation Milestones}
+\label{fig:milestones}
+\end{figure}
+
+\begin{table}[htbp]
+\centering
+\caption{Implementation Milestones}
+\begin{tabular}{@{}llll@{}}
+\toprule
+\textbf{Milestone} & \textbf{Target Date} & \textbf{Owner} & \textbf{Success Criteria} \\
+\midrule
+Milestone 1 & Month 3 & [Owner] & [Criteria] \\
+\rowcolor{tablealt} Milestone 2 & Month 6 & [Owner] & [Criteria] \\
+Milestone 3 & Month 9 & [Owner] & [Criteria] \\
+\rowcolor{tablealt} Milestone 4 & Month 12 & [Owner] & [Criteria] \\
+Milestone 5 & Month 18 & [Owner] & [Criteria] \\
+\rowcolor{tablealt} Milestone 6 & Month 24 & [Owner] & [Criteria] \\
+\bottomrule
+\end{tabular}
+\label{tab:milestones}
+\end{table}
+
+\section{Resource Requirements}
+
+[Detail resource requirements for implementation:
+- Team structure
+- Budget allocation
+- Technology requirements
+- External support needs]
+
+\section{Governance Structure}
+
+[Define governance for implementation:
+- Decision-making authority
+- Reporting structure
+- Review cadence
+- Escalation paths]
+
+% ============================================================================
+% CHAPTER 11: INVESTMENT THESIS & FINANCIAL PROJECTIONS (3-4 pages)
+% ============================================================================
+\chapter{Investment Thesis \& Financial Projections}
+
+\section{Investment Summary}
+
+[Summarize the investment opportunity:
+- Key value drivers
+- Expected returns
+- Investment timeline
+- Risk-adjusted assessment]
+
+\begin{executivesummarybox}[Investment Thesis]
+The \reporttitle{} market presents a compelling investment opportunity characterized by:
+
+\begin{itemize}
+ \item \textbf{Large Market:} \marketsize{XX billion} TAM growing at \growthrate{XX.X} CAGR
+ \item \textbf{Favorable Dynamics:} [Key market dynamics]
+ \item \textbf{Strong Drivers:} [Key growth drivers]
+ \item \textbf{Manageable Risks:} [Risk summary]
+ \item \textbf{Clear Path to Value:} [Value creation summary]
+\end{itemize}
+\end{executivesummarybox}
+
+\section{Financial Projections}
+
+% VISUAL: Financial projections
+% python skills/scientific-schematics/scripts/generate_schematic.py "Financial projections chart showing revenue growth over 5 years. Bar chart for revenue with line overlay for growth rate. Three scenarios: Conservative (gray bars), Base Case (blue bars), Optimistic (green bars). Y-axis dual: Revenue ($M) and Growth (%). Include data labels" -o figures/financial_projections.png --doc-type report
+
+\begin{figure}[htbp]
+\centering
+% \includegraphics[width=0.9\textwidth]{../figures/financial_projections.png}
+\caption{Financial Projections (5-Year)}
+\label{fig:financials}
+\end{figure}
+
+\begin{table}[htbp]
+\centering
+\caption{Financial Projections Summary}
+\begin{tabular}{@{}lrrrrr@{}}
+\toprule
+\textbf{Metric} & \textbf{Year 1} & \textbf{Year 2} & \textbf{Year 3} & \textbf{Year 4} & \textbf{Year 5} \\
+\midrule
+Revenue (\$M) & \$XX & \$XX & \$XX & \$XX & \$XX \\
+\rowcolor{tablealt} Growth Rate & XX\% & XX\% & XX\% & XX\% & XX\% \\
+Gross Margin & XX\% & XX\% & XX\% & XX\% & XX\% \\
+\rowcolor{tablealt} EBITDA (\$M) & \$XX & \$XX & \$XX & \$XX & \$XX \\
+EBITDA Margin & XX\% & XX\% & XX\% & XX\% & XX\% \\
+\bottomrule
+\end{tabular}
+\label{tab:financials}
+\end{table}
+
+\section{Scenario Analysis}
+
+% VISUAL: Scenario comparison
+% python skills/scientific-schematics/scripts/generate_schematic.py "Scenario comparison chart showing 3 scenarios (Conservative, Base, Optimistic) across key metrics. Use grouped bar chart with metrics on X-axis (Revenue Y5, EBITDA Y5, Market Share, ROI) and values on Y-axis. Color code by scenario" -o figures/scenario_analysis.png --doc-type report
+
+\begin{figure}[htbp]
+\centering
+% \includegraphics[width=0.85\textwidth]{../figures/scenario_analysis.png}
+\caption{Scenario Analysis Comparison}
+\label{fig:scenarios}
+\end{figure}
+
+\subsection{Conservative Scenario}
+[Detailed assumptions and outcomes for conservative case]
+
+\subsection{Base Case Scenario}
+[Detailed assumptions and outcomes for base case]
+
+\subsection{Optimistic Scenario}
+[Detailed assumptions and outcomes for optimistic case]
+
+\section{Key Assumptions}
+
+[Document key assumptions underlying financial projections:
+- Market growth assumptions
+- Pricing assumptions
+- Cost assumptions
+- Competitive assumptions
+- Timing assumptions]
+
+\section{Sensitivity Analysis}
+
+[Analyze sensitivity of projections to key variables:
+- Revenue sensitivity to market growth
+- Margin sensitivity to pricing
+- Returns sensitivity to timing]
+
+\section{Return Expectations}
+
+[Summarize expected returns:
+- ROI projections
+- Payback period
+- IRR estimates
+- Multiple analysis]
+
+% ============================================================================
+% APPENDICES
+% ============================================================================
+\appendix
+
+% ============================================================================
+% APPENDIX A: METHODOLOGY & DATA SOURCES
+% ============================================================================
+\chapter{Methodology \& Data Sources}
+
+\section{Research Methodology}
+
+[Describe the research methodology used:
+- Primary research methods
+- Secondary research sources
+- Data collection timeframe
+- Analytical frameworks applied]
+
+\section{Data Sources}
+
+[List all data sources used in the report:
+- Market research reports
+- Industry databases
+- Government statistics
+- Company reports
+- Expert interviews
+- Academic publications]
+
+\section{Limitations}
+
+[Acknowledge limitations of the analysis:
+- Data availability constraints
+- Methodological limitations
+- Forecast uncertainty
+- Scope limitations]
+
+% ============================================================================
+% APPENDIX B: DETAILED MARKET DATA
+% ============================================================================
+\chapter{Detailed Market Data}
+
+\section{Historical Market Data}
+
+[Provide detailed historical market data tables]
+
+\section{Regional Data Breakdown}
+
+[Provide detailed regional market data]
+
+\section{Segment Data Details}
+
+[Provide detailed segment-level data]
+
+\section{Competitive Data}
+
+[Provide detailed competitive data tables]
+
+% ============================================================================
+% APPENDIX C: COMPANY PROFILES
+% ============================================================================
+\chapter{Company Profiles}
+
+\section{Company A}
+
+\begin{calloutbox}[Company Profile: Company A]
+\textbf{Headquarters:} [Location]
+
+\textbf{Revenue:} \$X.X billion (FY2024)
+
+\textbf{Employees:} X,XXX
+
+\textbf{Market Position:} [Position description]
+
+\textbf{Key Products/Services:} [List]
+
+\textbf{Recent Developments:} [Summary]
+\end{calloutbox}
+
+[Brief narrative description of company strategy and positioning]
+
+\section{Company B}
+[Company profile]
+
+\section{Company C}
+[Company profile]
+
+\section{Company D}
+[Company profile]
+
+\section{Company E}
+[Company profile]
+
+% ============================================================================
+% REFERENCES
+% ============================================================================
+\newpage
+\bibliographystyle{plainnat}
+\bibliography{../references/references}
+
+% Alternative: Manual bibliography if not using BibTeX
+% \begin{thebibliography}{99}
+%
+% \bibitem{source1}
+% Author1, A.B. (2024).
+% Title of report or article.
+% \textit{Publisher/Source}.
+% URL
+%
+% \bibitem{source2}
+% [Continue with all references...]
+%
+% \end{thebibliography}
+
+% ============================================================================
+% END OF DOCUMENT
+% ============================================================================
+\end{document}
diff --git a/scientific-skills/market-research-reports/assets/market_research.sty b/scientific-skills/market-research-reports/assets/market_research.sty
new file mode 100644
index 0000000..d383941
--- /dev/null
+++ b/scientific-skills/market-research-reports/assets/market_research.sty
@@ -0,0 +1,564 @@
+% market_research.sty - Professional Market Research Report Styling
+% For use with XeLaTeX or LuaLaTeX
+% Style inspired by top consulting firms (McKinsey, BCG, Gartner)
+
+\ProvidesPackage{market_research}[2024/01/01 Market Research Report Style]
+
+% ============================================================================
+% REQUIRED PACKAGES
+% ============================================================================
+
+% Page layout and geometry
+\RequirePackage[margin=1in]{geometry}
+\RequirePackage{setspace}
+
+% Typography
+\RequirePackage[utf8]{inputenc}
+\RequirePackage[T1]{fontenc}
+\RequirePackage{helvet}
+\renewcommand{\familydefault}{\sfdefault}
+
+% Colors and graphics
+\RequirePackage{xcolor}
+\RequirePackage{graphicx}
+\RequirePackage{tikz}
+
+% Tables
+\RequirePackage{longtable}
+\RequirePackage{booktabs}
+\RequirePackage{multirow}
+\RequirePackage{array}
+\RequirePackage{colortbl}
+
+% Lists and formatting
+\RequirePackage{enumitem}
+\RequirePackage{parskip}
+
+% Boxes and callouts
+\RequirePackage[most]{tcolorbox}
+
+% Headers and footers
+\RequirePackage{fancyhdr}
+\RequirePackage{titlesec}
+
+% Hyperlinks and references
+\RequirePackage{hyperref}
+\RequirePackage[numbers,sort&compress]{natbib}
+
+% Math (for financial projections)
+\RequirePackage{amsmath}
+
+% Captions
+\RequirePackage{caption}
+\RequirePackage{subcaption}
+
+% ============================================================================
+% COLOR DEFINITIONS
+% ============================================================================
+
+% Primary colors (professional blue palette)
+\definecolor{primaryblue}{RGB}{0, 51, 102} % Deep navy blue
+\definecolor{secondaryblue}{RGB}{51, 102, 153} % Medium blue
+\definecolor{lightblue}{RGB}{173, 216, 230} % Light blue for backgrounds
+\definecolor{accentblue}{RGB}{0, 120, 215} % Bright accent blue
+
+% Secondary colors (complementary)
+\definecolor{accentgreen}{RGB}{0, 128, 96} % Teal green
+\definecolor{lightgreen}{RGB}{200, 230, 201} % Light green background
+\definecolor{darkgreen}{RGB}{27, 94, 32} % Dark green
+
+% Warning and risk colors
+\definecolor{warningorange}{RGB}{255, 140, 0} % Orange for warnings
+\definecolor{lightorange}{RGB}{255, 243, 224} % Light orange background
+\definecolor{alertred}{RGB}{198, 40, 40} % Red for critical items
+\definecolor{lightred}{RGB}{255, 235, 238} % Light red background
+
+% Recommendation and action colors
+\definecolor{recommendpurple}{RGB}{103, 58, 183} % Purple for recommendations
+\definecolor{lightpurple}{RGB}{237, 231, 246} % Light purple background
+
+% Neutral colors
+\definecolor{darkgray}{RGB}{66, 66, 66} % Dark gray for text
+\definecolor{mediumgray}{RGB}{117, 117, 117} % Medium gray
+\definecolor{lightgray}{RGB}{240, 240, 240} % Light gray backgrounds
+\definecolor{tablegray}{RGB}{250, 250, 250} % Table row alternating
+\definecolor{tablealt}{RGB}{245, 247, 250} % Alternating table row
+
+% Chart colors (colorblind-friendly palette)
+\definecolor{chart1}{RGB}{0, 114, 178} % Blue
+\definecolor{chart2}{RGB}{230, 159, 0} % Orange
+\definecolor{chart3}{RGB}{0, 158, 115} % Green
+\definecolor{chart4}{RGB}{204, 121, 167} % Pink
+\definecolor{chart5}{RGB}{86, 180, 233} % Sky blue
+\definecolor{chart6}{RGB}{213, 94, 0} % Vermillion
+\definecolor{chart7}{RGB}{240, 228, 66} % Yellow
+
+% ============================================================================
+% HYPERLINK CONFIGURATION
+% ============================================================================
+
+\hypersetup{
+ colorlinks=true,
+ linkcolor=primaryblue,
+ filecolor=primaryblue,
+ urlcolor=accentblue,
+ citecolor=secondaryblue,
+ pdftitle={Market Research Report},
+ pdfauthor={Market Intelligence},
+ pdfsubject={Market Analysis},
+}
+
+% ============================================================================
+% CHAPTER AND SECTION FORMATTING
+% ============================================================================
+
+% Chapter formatting - large number with colored title
+\titleformat{\chapter}[display]
+{\normalfont\huge\bfseries\color{primaryblue}}
+{\chaptertitlename\ \thechapter}{20pt}{\Huge}
+\titlespacing*{\chapter}{0pt}{-20pt}{40pt}
+
+% Section formatting
+\titleformat{\section}
+{\normalfont\Large\bfseries\color{primaryblue}}
+{\thesection}{1em}{}
+\titlespacing*{\section}{0pt}{3.5ex plus 1ex minus .2ex}{2.3ex plus .2ex}
+
+% Subsection formatting
+\titleformat{\subsection}
+{\normalfont\large\bfseries\color{secondaryblue}}
+{\thesubsection}{1em}{}
+
+% Subsubsection formatting
+\titleformat{\subsubsection}
+{\normalfont\normalsize\bfseries\color{darkgray}}
+{\thesubsubsection}{1em}{}
+
+% Paragraph formatting
+\titleformat{\paragraph}[runin]
+{\normalfont\normalsize\bfseries\color{darkgray}}
+{\theparagraph}{1em}{}
+
+% ============================================================================
+% HEADER AND FOOTER CONFIGURATION
+% ============================================================================
+
+\pagestyle{fancy}
+\fancyhf{}
+\fancyhead[L]{\small\textit{\leftmark}}
+\fancyhead[R]{\small\textit{Market Research Report}}
+\fancyfoot[C]{\thepage}
+\renewcommand{\headrulewidth}{0.4pt}
+\renewcommand{\footrulewidth}{0.4pt}
+\renewcommand{\headrule}{\hbox to\headwidth{\color{primaryblue}\leaders\hrule height \headrulewidth\hfill}}
+\renewcommand{\footrule}{\hbox to\headwidth{\color{lightgray}\leaders\hrule height \footrulewidth\hfill}}
+
+% Plain page style for chapter pages
+\fancypagestyle{plain}{
+ \fancyhf{}
+ \fancyfoot[C]{\thepage}
+ \renewcommand{\headrulewidth}{0pt}
+ \renewcommand{\footrulewidth}{0.4pt}
+}
+
+% ============================================================================
+% BOX ENVIRONMENTS
+% ============================================================================
+
+% Key Insight Box (Blue) - For major findings and insights
+\newtcolorbox{keyinsightbox}[1][Key Insight]{
+ colback=lightblue!30,
+ colframe=primaryblue,
+ fonttitle=\bfseries\color{white},
+ title=#1,
+ coltitle=white,
+ colbacktitle=primaryblue,
+ boxrule=1pt,
+ arc=3pt,
+ left=10pt,
+ right=10pt,
+ top=8pt,
+ bottom=8pt,
+ before skip=12pt,
+ after skip=12pt,
+}
+
+% Market Data Box (Green) - For market statistics and data highlights
+\newtcolorbox{marketdatabox}[1][Market Data]{
+ colback=lightgreen!50,
+ colframe=accentgreen,
+ fonttitle=\bfseries\color{white},
+ title=#1,
+ coltitle=white,
+ colbacktitle=accentgreen,
+ boxrule=1pt,
+ arc=3pt,
+ left=10pt,
+ right=10pt,
+ top=8pt,
+ bottom=8pt,
+ before skip=12pt,
+ after skip=12pt,
+}
+
+% Risk Box (Orange/Warning) - For risk factors and warnings
+\newtcolorbox{riskbox}[1][Risk Factor]{
+ colback=lightorange,
+ colframe=warningorange,
+ fonttitle=\bfseries\color{white},
+ title=#1,
+ coltitle=white,
+ colbacktitle=warningorange,
+ boxrule=1pt,
+ arc=3pt,
+ left=10pt,
+ right=10pt,
+ top=8pt,
+ bottom=8pt,
+ before skip=12pt,
+ after skip=12pt,
+}
+
+% Critical Risk Box (Red) - For critical/high-severity risks
+\newtcolorbox{criticalriskbox}[1][Critical Risk]{
+ colback=lightred,
+ colframe=alertred,
+ fonttitle=\bfseries\color{white},
+ title=#1,
+ coltitle=white,
+ colbacktitle=alertred,
+ boxrule=1pt,
+ arc=3pt,
+ left=10pt,
+ right=10pt,
+ top=8pt,
+ bottom=8pt,
+ before skip=12pt,
+ after skip=12pt,
+}
+
+% Recommendation Box (Purple) - For strategic recommendations
+\newtcolorbox{recommendationbox}[1][Strategic Recommendation]{
+ colback=lightpurple,
+ colframe=recommendpurple,
+ fonttitle=\bfseries\color{white},
+ title=#1,
+ coltitle=white,
+ colbacktitle=recommendpurple,
+ boxrule=1pt,
+ arc=3pt,
+ left=10pt,
+ right=10pt,
+ top=8pt,
+ bottom=8pt,
+ before skip=12pt,
+ after skip=12pt,
+}
+
+% Callout Box (Gray) - For definitions, notes, supplementary info
+\newtcolorbox{calloutbox}[1][Note]{
+ colback=lightgray,
+ colframe=mediumgray,
+ fonttitle=\bfseries\color{darkgray},
+ title=#1,
+ coltitle=darkgray,
+ colbacktitle=lightgray,
+ boxrule=0.5pt,
+ arc=3pt,
+ left=10pt,
+ right=10pt,
+ top=8pt,
+ bottom=8pt,
+ before skip=12pt,
+ after skip=12pt,
+}
+
+% Executive Summary Box (Special styling)
+\newtcolorbox{executivesummarybox}[1][Executive Summary]{
+ enhanced,
+ colback=white,
+ colframe=primaryblue,
+ fonttitle=\Large\bfseries\color{white},
+ title=#1,
+ coltitle=white,
+ colbacktitle=primaryblue,
+ boxrule=2pt,
+ arc=5pt,
+ left=15pt,
+ right=15pt,
+ top=12pt,
+ bottom=12pt,
+ before skip=15pt,
+ after skip=15pt,
+ shadow={2mm}{-2mm}{0mm}{black!20},
+}
+
+% Opportunity Box (Teal) - For opportunities and positive findings
+\newtcolorbox{opportunitybox}[1][Opportunity]{
+ colback=lightblue!20,
+ colframe=accentblue,
+ fonttitle=\bfseries\color{white},
+ title=#1,
+ coltitle=white,
+ colbacktitle=accentblue,
+ boxrule=1pt,
+ arc=3pt,
+ left=10pt,
+ right=10pt,
+ top=8pt,
+ bottom=8pt,
+ before skip=12pt,
+ after skip=12pt,
+}
+
+% ============================================================================
+% PULL QUOTE ENVIRONMENT
+% ============================================================================
+
+\newtcolorbox{pullquote}{
+ enhanced,
+ colback=lightgray,
+ colframe=lightgray,
+ boxrule=0pt,
+ borderline west={4pt}{0pt}{primaryblue},
+ arc=0pt,
+ left=15pt,
+ right=15pt,
+ top=10pt,
+ bottom=10pt,
+ before skip=15pt,
+ after skip=15pt,
+ fontupper=\large\itshape\color{darkgray},
+}
+
+% ============================================================================
+% STATISTIC HIGHLIGHT
+% ============================================================================
+
+\newcommand{\statbox}[2]{%
+ \begin{tcolorbox}[
+ colback=primaryblue,
+ colframe=primaryblue,
+ coltext=white,
+ arc=5pt,
+ boxrule=0pt,
+ width=0.3\textwidth,
+ halign=center,
+ valign=center,
+ before skip=10pt,
+ after skip=10pt,
+ ]
+ {\Huge\bfseries #1}\\[5pt]
+ {\small #2}
+ \end{tcolorbox}
+}
+
+% ============================================================================
+% TABLE STYLING
+% ============================================================================
+
+% Alternating row colors command
+\newcommand{\tablerowcolor}{\rowcolor{tablealt}}
+
+% Table header styling
+\newcommand{\tableheader}[1]{\textbf{\color{white}#1}}
+\newcommand{\tableheaderrow}{\rowcolor{primaryblue}}
+
+% Professional table environment
+\newenvironment{markettable}[2][htbp]{%
+ \begin{table}[#1]
+ \centering
+ \caption{#2}
+ \small
+}{%
+ \end{table}
+}
+
+% ============================================================================
+% FIGURE STYLING
+% ============================================================================
+
+% Caption formatting
+\captionsetup{
+ font=small,
+ labelfont={bf,color=primaryblue},
+ textfont={color=darkgray},
+ justification=centering,
+ margin=20pt,
+}
+
+% Figure with source attribution
+\newcommand{\figuresource}[1]{%
+ \par\vspace{-8pt}
+ {\small\textit{Source: #1}}
+}
+
+% ============================================================================
+% LIST STYLING
+% ============================================================================
+
+% Bullet list styling
+\setlist[itemize]{
+ leftmargin=*,
+ label=\textcolor{primaryblue}{\textbullet},
+ topsep=5pt,
+ itemsep=3pt,
+}
+
+% Numbered list styling
+\setlist[enumerate]{
+ leftmargin=*,
+ label=\textcolor{primaryblue}{\arabic*.},
+ topsep=5pt,
+ itemsep=3pt,
+}
+
+% ============================================================================
+% CUSTOM COMMANDS
+% ============================================================================
+
+% Highlight important text
+\newcommand{\highlight}[1]{\textbf{\textcolor{primaryblue}{#1}}}
+
+% Market size with formatting
+\newcommand{\marketsize}[1]{\textbf{\textcolor{accentgreen}{\$#1}}}
+
+% Growth rate with formatting
+\newcommand{\growthrate}[1]{\textbf{\textcolor{chart3}{#1\%}}}
+
+% Risk indicator
+\newcommand{\riskhigh}{\textbf{\textcolor{alertred}{HIGH}}}
+\newcommand{\riskmedium}{\textbf{\textcolor{warningorange}{MEDIUM}}}
+\newcommand{\risklow}{\textbf{\textcolor{accentgreen}{LOW}}}
+
+% Rating stars (1-5)
+\newcommand{\rating}[1]{%
+ \foreach \i in {1,...,5}{%
+ \ifnum\i>#1
+ \textcolor{lightgray}{$\star$}%
+ \else
+ \textcolor{warningorange}{$\star$}%
+ \fi
+ }%
+}
+
+% Trend indicators
+\newcommand{\trendup}{\textcolor{accentgreen}{$\blacktriangle$}}
+\newcommand{\trenddown}{\textcolor{alertred}{$\blacktriangledown$}}
+\newcommand{\trendflat}{\textcolor{mediumgray}{$\rightarrow$}}
+
+% ============================================================================
+% TITLE PAGE COMMAND
+% ============================================================================
+
+\newcommand{\makemarketreporttitle}[5]{%
+ % #1 = Report Title
+ % #2 = Subtitle
+ % #3 = Hero Image Path
+ % #4 = Date
+ % #5 = Prepared By
+ \begin{titlepage}
+ \centering
+ \vspace*{1cm}
+
+ {\Huge\bfseries\color{primaryblue} #1\\[0.5cm]}
+ {\LARGE\bfseries #2\\[2cm]}
+
+ \ifx&
+ % No image provided
+ \vspace{4cm}
+ \else
+ \includegraphics[width=\textwidth]{#3}\\[2cm]
+ \fi
+
+ {\Large\bfseries Market Research Report\\[3cm]}
+
+ {\large
+ \textbf{Date:} #4\\[0.3cm]
+ \textbf{Prepared By:} #5\\[0.3cm]
+ \textbf{Classification:} Confidential
+ }
+
+ \vfill
+
+ {\footnotesize
+ \textit{This report contains market intelligence and strategic analysis. All data sources are cited and independently verifiable.}
+ }
+
+ \end{titlepage}
+}
+
+% ============================================================================
+% APPENDIX SECTION COMMAND
+% ============================================================================
+
+\newcommand{\appendixsection}[1]{%
+ \section*{#1}
+ \addcontentsline{toc}{section}{#1}
+}
+
+% ============================================================================
+% FRAMEWORK BOXES
+% ============================================================================
+
+% SWOT Analysis Box
+\newtcolorbox{swotbox}[1][SWOT Analysis]{
+ enhanced,
+ colback=white,
+ colframe=secondaryblue,
+ fonttitle=\bfseries\color{white},
+ title=#1,
+ coltitle=white,
+ colbacktitle=secondaryblue,
+ boxrule=1.5pt,
+ arc=5pt,
+ left=10pt,
+ right=10pt,
+ top=10pt,
+ bottom=10pt,
+ before skip=15pt,
+ after skip=15pt,
+}
+
+% Porter's Five Forces Box
+\newtcolorbox{porterbox}[1][Porter's Five Forces]{
+ enhanced,
+ colback=white,
+ colframe=primaryblue,
+ fonttitle=\bfseries\color{white},
+ title=#1,
+ coltitle=white,
+ colbacktitle=primaryblue,
+ boxrule=1.5pt,
+ arc=5pt,
+ left=10pt,
+ right=10pt,
+ top=10pt,
+ bottom=10pt,
+ before skip=15pt,
+ after skip=15pt,
+}
+
+% ============================================================================
+% PAGE LAYOUT ADJUSTMENTS
+% ============================================================================
+
+% Spacing
+\setstretch{1.15}
+\setlength{\parskip}{0.5em}
+
+% Prevent orphans and widows
+\clubpenalty=10000
+\widowpenalty=10000
+
+% Float placement
+\renewcommand{\topfraction}{0.9}
+\renewcommand{\bottomfraction}{0.8}
+\renewcommand{\textfraction}{0.07}
+\renewcommand{\floatpagefraction}{0.7}
+
+% ============================================================================
+% END OF STYLE FILE
+% ============================================================================
+
+\endinput
diff --git a/scientific-skills/market-research-reports/references/data_analysis_patterns.md b/scientific-skills/market-research-reports/references/data_analysis_patterns.md
new file mode 100644
index 0000000..f94863b
--- /dev/null
+++ b/scientific-skills/market-research-reports/references/data_analysis_patterns.md
@@ -0,0 +1,548 @@
+# Data Analysis Patterns for Market Research
+
+Templates and frameworks for conducting rigorous market analysis.
+
+---
+
+## Market Sizing Frameworks
+
+### TAM/SAM/SOM Analysis
+
+**Total Addressable Market (TAM)** represents the total revenue opportunity if 100% market share was achieved.
+
+#### Top-Down Approach
+```
+TAM = Total Industry Revenue (from market research reports)
+
+Example:
+- Global AI Software Market (2024): $184 billion
+- Source: Gartner, IDC, or similar
+```
+
+#### Bottom-Up Approach
+```
+TAM = Number of Potential Customers × Average Revenue per Customer
+
+Example:
+- Number of enterprises globally: 400 million
+- Target segment (large enterprises): 50,000
+- Average annual spend on solution: $500,000
+- TAM = 50,000 × $500,000 = $25 billion
+```
+
+**Serviceable Addressable Market (SAM)** represents the portion of TAM that can be served given product/service capabilities.
+
+```
+SAM = TAM × Applicable Segment %
+
+Example:
+- TAM: $25 billion
+- Geographic constraint (North America only): 40%
+- Product fit (enterprise only): 60%
+- SAM = $25B × 40% × 60% = $6 billion
+```
+
+**Serviceable Obtainable Market (SOM)** represents realistic market share capture.
+
+```
+SOM = SAM × Achievable Market Share %
+
+Example:
+- SAM: $6 billion
+- Conservative market share (5%): $300 million
+- Base case market share (10%): $600 million
+- Optimistic market share (15%): $900 million
+```
+
+### Growth Rate Calculation
+
+#### CAGR (Compound Annual Growth Rate)
+```
+CAGR = (End Value / Start Value)^(1/n) - 1
+
+Where n = number of years
+
+Example:
+- 2020 market size: $10 billion
+- 2024 market size: $18 billion
+- n = 4 years
+- CAGR = (18/10)^(1/4) - 1 = 15.8%
+```
+
+#### Year-over-Year Growth
+```
+YoY Growth = (Current Year - Previous Year) / Previous Year × 100
+
+Example:
+- 2023: $15 billion
+- 2024: $18 billion
+- YoY Growth = (18-15)/15 × 100 = 20%
+```
+
+---
+
+## Porter's Five Forces Analysis
+
+### Framework Template
+
+For each force, assess: **HIGH**, **MEDIUM**, or **LOW**
+
+#### 1. Threat of New Entrants
+
+**Factors to evaluate:**
+| Factor | Assessment | Notes |
+|--------|------------|-------|
+| Capital requirements | High/Med/Low | $ required to enter |
+| Economies of scale | Strong/Moderate/Weak | Incumbent advantages |
+| Brand loyalty | High/Med/Low | Customer switching cost |
+| Access to distribution | Easy/Moderate/Difficult | Channel availability |
+| Regulatory barriers | High/Med/Low | Licensing, certifications |
+| Proprietary technology | Critical/Important/Minor | IP and know-how |
+| Expected retaliation | Aggressive/Moderate/Passive | Incumbent response |
+
+**Overall Assessment:** [HIGH/MEDIUM/LOW]
+
+**Key Insights:** [Summary of implications]
+
+#### 2. Bargaining Power of Suppliers
+
+**Factors to evaluate:**
+| Factor | Assessment | Notes |
+|--------|------------|-------|
+| Supplier concentration | High/Med/Low | Number of suppliers |
+| Switching costs | High/Med/Low | Cost to change suppliers |
+| Supplier differentiation | High/Med/Low | Uniqueness of inputs |
+| Forward integration threat | High/Med/Low | Can suppliers compete? |
+| Importance to supplier | Critical/Important/Minor | Your share of their revenue |
+| Substitute inputs | Many/Some/Few | Alternatives available |
+
+**Overall Assessment:** [HIGH/MEDIUM/LOW]
+
+#### 3. Bargaining Power of Buyers
+
+**Factors to evaluate:**
+| Factor | Assessment | Notes |
+|--------|------------|-------|
+| Buyer concentration | High/Med/Low | Few large vs. many small |
+| Purchase volume | Large/Medium/Small | Relative importance |
+| Switching costs | Low/Med/High | Cost to change vendors |
+| Price sensitivity | High/Med/Low | Focus on price vs. value |
+| Backward integration threat | High/Med/Low | Can buyers self-supply? |
+| Information availability | Full/Partial/Limited | Market transparency |
+
+**Overall Assessment:** [HIGH/MEDIUM/LOW]
+
+#### 4. Threat of Substitutes
+
+**Factors to evaluate:**
+| Factor | Assessment | Notes |
+|--------|------------|-------|
+| Substitute availability | Many/Some/Few | Number of alternatives |
+| Price-performance ratio | Better/Same/Worse | Value comparison |
+| Switching costs | Low/Med/High | Friction to substitute |
+| Buyer propensity to switch | High/Med/Low | Willingness to change |
+| Perceived differentiation | Low/Med/High | Unique value |
+
+**Overall Assessment:** [HIGH/MEDIUM/LOW]
+
+#### 5. Competitive Rivalry
+
+**Factors to evaluate:**
+| Factor | Assessment | Notes |
+|--------|------------|-------|
+| Number of competitors | Many/Several/Few | Market fragmentation |
+| Industry growth | Slow/Moderate/Fast | Growth rate impact |
+| Fixed costs | High/Med/Low | Pressure to fill capacity |
+| Product differentiation | Low/Med/High | Commoditization level |
+| Exit barriers | High/Med/Low | Difficulty leaving market |
+| Strategic stakes | High/Med/Low | Importance to competitors |
+
+**Overall Assessment:** [HIGH/MEDIUM/LOW]
+
+### Five Forces Summary Table
+
+| Force | Rating | Key Drivers | Implications |
+|-------|--------|-------------|--------------|
+| New Entrants | [H/M/L] | [Top factors] | [Strategic impact] |
+| Supplier Power | [H/M/L] | [Top factors] | [Strategic impact] |
+| Buyer Power | [H/M/L] | [Top factors] | [Strategic impact] |
+| Substitutes | [H/M/L] | [Top factors] | [Strategic impact] |
+| Rivalry | [H/M/L] | [Top factors] | [Strategic impact] |
+
+**Overall Industry Attractiveness:** [ATTRACTIVE / MODERATE / UNATTRACTIVE]
+
+---
+
+## PESTLE Analysis
+
+### Framework Template
+
+#### Political Factors
+
+| Factor | Current State | Trend | Impact | Time Horizon |
+|--------|---------------|-------|--------|--------------|
+| Government stability | | ↑ ↓ → | H/M/L | Short/Med/Long |
+| Trade policies | | ↑ ↓ → | H/M/L | |
+| Tax regulations | | ↑ ↓ → | H/M/L | |
+| Government support | | ↑ ↓ → | H/M/L | |
+| Political relations | | ↑ ↓ → | H/M/L | |
+
+**Key Political Implications:** [Summary]
+
+#### Economic Factors
+
+| Factor | Current State | Trend | Impact | Time Horizon |
+|--------|---------------|-------|--------|--------------|
+| GDP growth | X.X% | ↑ ↓ → | H/M/L | |
+| Interest rates | X.X% | ↑ ↓ → | H/M/L | |
+| Inflation | X.X% | ↑ ↓ → | H/M/L | |
+| Exchange rates | | ↑ ↓ → | H/M/L | |
+| Consumer spending | | ↑ ↓ → | H/M/L | |
+| Unemployment | X.X% | ↑ ↓ → | H/M/L | |
+
+**Key Economic Implications:** [Summary]
+
+#### Social Factors
+
+| Factor | Current State | Trend | Impact | Time Horizon |
+|--------|---------------|-------|--------|--------------|
+| Demographics | | ↑ ↓ → | H/M/L | |
+| Cultural attitudes | | ↑ ↓ → | H/M/L | |
+| Consumer behavior | | ↑ ↓ → | H/M/L | |
+| Education levels | | ↑ ↓ → | H/M/L | |
+| Health consciousness | | ↑ ↓ → | H/M/L | |
+| Work-life balance | | ↑ ↓ → | H/M/L | |
+
+**Key Social Implications:** [Summary]
+
+#### Technological Factors
+
+| Factor | Current State | Trend | Impact | Time Horizon |
+|--------|---------------|-------|--------|--------------|
+| R&D activity | | ↑ ↓ → | H/M/L | |
+| Technology adoption | | ↑ ↓ → | H/M/L | |
+| Automation | | ↑ ↓ → | H/M/L | |
+| Digital infrastructure | | ↑ ↓ → | H/M/L | |
+| Innovation rate | | ↑ ↓ → | H/M/L | |
+| Disruptive tech | | ↑ ↓ → | H/M/L | |
+
+**Key Technological Implications:** [Summary]
+
+#### Legal Factors
+
+| Factor | Current State | Trend | Impact | Time Horizon |
+|--------|---------------|-------|--------|--------------|
+| Industry regulations | | ↑ ↓ → | H/M/L | |
+| Data protection | | ↑ ↓ → | H/M/L | |
+| Employment law | | ↑ ↓ → | H/M/L | |
+| Consumer protection | | ↑ ↓ → | H/M/L | |
+| IP rights | | ↑ ↓ → | H/M/L | |
+| Antitrust | | ↑ ↓ → | H/M/L | |
+
+**Key Legal Implications:** [Summary]
+
+#### Environmental Factors
+
+| Factor | Current State | Trend | Impact | Time Horizon |
+|--------|---------------|-------|--------|--------------|
+| Climate change | | ↑ ↓ → | H/M/L | |
+| Sustainability reqs | | ↑ ↓ → | H/M/L | |
+| Resource availability | | ↑ ↓ → | H/M/L | |
+| Waste management | | ↑ ↓ → | H/M/L | |
+| Carbon regulations | | ↑ ↓ → | H/M/L | |
+| Environmental awareness | | ↑ ↓ → | H/M/L | |
+
+**Key Environmental Implications:** [Summary]
+
+---
+
+## SWOT Analysis
+
+### Framework Template
+
+#### Strengths (Internal, Positive)
+| Strength | Evidence | Strategic Value |
+|----------|----------|-----------------|
+| [Strength 1] | [Data/proof] | High/Med/Low |
+| [Strength 2] | [Data/proof] | High/Med/Low |
+| [Strength 3] | [Data/proof] | High/Med/Low |
+
+**Core Strengths Summary:** [2-3 sentence synthesis]
+
+#### Weaknesses (Internal, Negative)
+| Weakness | Evidence | Severity |
+|----------|----------|----------|
+| [Weakness 1] | [Data/proof] | Critical/Moderate/Minor |
+| [Weakness 2] | [Data/proof] | Critical/Moderate/Minor |
+| [Weakness 3] | [Data/proof] | Critical/Moderate/Minor |
+
+**Key Vulnerabilities Summary:** [2-3 sentence synthesis]
+
+#### Opportunities (External, Positive)
+| Opportunity | Size/Potential | Timeframe |
+|-------------|----------------|-----------|
+| [Opportunity 1] | $X / High/Med/Low | Short/Med/Long |
+| [Opportunity 2] | $X / High/Med/Low | Short/Med/Long |
+| [Opportunity 3] | $X / High/Med/Low | Short/Med/Long |
+
+**Priority Opportunities Summary:** [2-3 sentence synthesis]
+
+#### Threats (External, Negative)
+| Threat | Likelihood | Impact |
+|--------|------------|--------|
+| [Threat 1] | High/Med/Low | High/Med/Low |
+| [Threat 2] | High/Med/Low | High/Med/Low |
+| [Threat 3] | High/Med/Low | High/Med/Low |
+
+**Critical Threats Summary:** [2-3 sentence synthesis]
+
+### SWOT Strategy Matrix
+
+| | **Strengths** | **Weaknesses** |
+|---|---------------|----------------|
+| **Opportunities** | **SO Strategies** (use strengths to capture opportunities) | **WO Strategies** (overcome weaknesses to capture opportunities) |
+| **Threats** | **ST Strategies** (use strengths to mitigate threats) | **WT Strategies** (minimize weaknesses and avoid threats) |
+
+---
+
+## BCG Growth-Share Matrix
+
+### Framework Template
+
+**Axes:**
+- X-axis: Relative Market Share (High → Low, logarithmic scale)
+- Y-axis: Market Growth Rate (High → Low, typically 10% as midpoint)
+
+### Quadrant Definitions
+
+| Quadrant | Growth | Share | Characteristics | Strategy |
+|----------|--------|-------|-----------------|----------|
+| **Stars** | High | High | Market leaders in growing markets | Invest to maintain position |
+| **Cash Cows** | Low | High | Market leaders in mature markets | Harvest for cash flow |
+| **Question Marks** | High | Low | Small share in growing markets | Invest selectively or divest |
+| **Dogs** | Low | Low | Small share in mature markets | Divest or minimize investment |
+
+### Product/Business Unit Analysis
+
+| Product/BU | Market Growth | Relative Share | Quadrant | Recommended Strategy |
+|------------|---------------|----------------|----------|---------------------|
+| [Product A] | X.X% | X.X | Star/Cow/QM/Dog | [Strategy] |
+| [Product B] | X.X% | X.X | Star/Cow/QM/Dog | [Strategy] |
+| [Product C] | X.X% | X.X | Star/Cow/QM/Dog | [Strategy] |
+
+### Portfolio Balance Assessment
+
+| Quadrant | Number of Products | Revenue % | Investment Priority |
+|----------|-------------------|-----------|---------------------|
+| Stars | X | X% | High |
+| Cash Cows | X | X% | Maintain |
+| Question Marks | X | X% | Selective |
+| Dogs | X | X% | Low/Divest |
+
+---
+
+## Value Chain Analysis
+
+### Framework Template
+
+#### Primary Activities
+
+| Activity | Description | Value Created | Cost | Competitive Position |
+|----------|-------------|---------------|------|---------------------|
+| **Inbound Logistics** | Receiving, storing, inventory | | $X | Strong/Average/Weak |
+| **Operations** | Manufacturing, assembly | | $X | Strong/Average/Weak |
+| **Outbound Logistics** | Distribution, delivery | | $X | Strong/Average/Weak |
+| **Marketing & Sales** | Promotion, sales force | | $X | Strong/Average/Weak |
+| **Service** | Installation, support, repair | | $X | Strong/Average/Weak |
+
+#### Support Activities
+
+| Activity | Description | Value Created | Cost | Competitive Position |
+|----------|-------------|---------------|------|---------------------|
+| **Infrastructure** | Management, finance, legal | | $X | Strong/Average/Weak |
+| **HR Management** | Recruiting, training, comp | | $X | Strong/Average/Weak |
+| **Technology Dev** | R&D, process improvement | | $X | Strong/Average/Weak |
+| **Procurement** | Purchasing, supplier mgmt | | $X | Strong/Average/Weak |
+
+### Value Chain Margin Analysis
+
+```
+Total Revenue: $XXX
+- Inbound Logistics: ($XX)
+- Operations: ($XX)
+- Outbound Logistics: ($XX)
+- Marketing & Sales: ($XX)
+- Service: ($XX)
+- Support Activities: ($XX)
+= Margin: $XX (X%)
+```
+
+### Competitive Comparison
+
+| Activity | Company | Industry Avg | Best-in-Class | Gap |
+|----------|---------|--------------|---------------|-----|
+| [Activity] | X% | Y% | Z% | +/-X% |
+
+---
+
+## Competitive Positioning Analysis
+
+### Framework Template
+
+#### Positioning Dimensions
+
+Common positioning dimension pairs:
+- Price vs. Quality
+- Market Focus (Niche vs. Broad)
+- Solution Type (Product vs. Platform)
+- Geographic Scope (Regional vs. Global)
+- Customer Focus (Enterprise vs. SMB vs. Consumer)
+- Innovation Level (Leader vs. Follower)
+
+#### Competitor Mapping
+
+| Competitor | Dimension 1 Score (1-10) | Dimension 2 Score (1-10) | Market Share | Notes |
+|------------|-------------------------|-------------------------|--------------|-------|
+| Company A | X | X | X% | [Position description] |
+| Company B | X | X | X% | [Position description] |
+| Company C | X | X | X% | [Position description] |
+
+#### Strategic Group Identification
+
+| Strategic Group | Companies | Characteristics | Market Share |
+|-----------------|-----------|-----------------|--------------|
+| Group 1: [Name] | A, B, C | [Description] | X% |
+| Group 2: [Name] | D, E | [Description] | X% |
+| Group 3: [Name] | F, G, H | [Description] | X% |
+
+---
+
+## Risk Assessment Framework
+
+### Risk Identification
+
+#### Risk Categories
+1. **Market Risks**: Demand changes, price pressure, market shifts
+2. **Competitive Risks**: New entrants, competitor moves, disruption
+3. **Regulatory Risks**: New regulations, compliance requirements
+4. **Technology Risks**: Obsolescence, security, integration
+5. **Operational Risks**: Supply chain, quality, capacity
+6. **Financial Risks**: Currency, interest rates, credit
+7. **Reputational Risks**: Brand damage, social media, ethics
+
+### Risk Assessment Matrix
+
+| Risk ID | Risk Description | Category | Probability | Impact | Score | Priority |
+|---------|------------------|----------|-------------|--------|-------|----------|
+| R1 | [Description] | Market | 1-5 | 1-5 | P×I | H/M/L |
+| R2 | [Description] | Competitive | 1-5 | 1-5 | P×I | H/M/L |
+
+**Scoring Guide:**
+- Probability: 1=Very Unlikely, 2=Unlikely, 3=Possible, 4=Likely, 5=Very Likely
+- Impact: 1=Minimal, 2=Minor, 3=Moderate, 4=Major, 5=Severe
+- Priority: Score 15-25=High, 8-14=Medium, 1-7=Low
+
+### Risk Mitigation Planning
+
+| Risk ID | Risk | Mitigation Strategy | Owner | Timeline | Cost |
+|---------|------|---------------------|-------|----------|------|
+| R1 | [Risk] | [Prevention + Response] | [Name] | [Date] | $X |
+
+---
+
+## Financial Analysis Patterns
+
+### Revenue Projection Model
+
+```
+Year N Revenue = Year N-1 Revenue × (1 + Growth Rate)
+
+Or bottom-up:
+Revenue = Customers × Revenue per Customer × Retention Rate
+ + New Customers × Revenue per Customer × (1 - Churn Rate)
+```
+
+### Scenario Analysis Template
+
+| Metric | Conservative | Base Case | Optimistic |
+|--------|--------------|-----------|------------|
+| Market Growth | X% | Y% | Z% |
+| Market Share | X% | Y% | Z% |
+| Pricing | $X | $Y | $Z |
+| Gross Margin | X% | Y% | Z% |
+| **Revenue Y5** | $X | $Y | $Z |
+| **EBITDA Y5** | $X | $Y | $Z |
+
+### Key Financial Metrics
+
+| Metric | Formula | Target |
+|--------|---------|--------|
+| Gross Margin | (Revenue - COGS) / Revenue | X% |
+| EBITDA Margin | EBITDA / Revenue | X% |
+| Customer Acquisition Cost | Sales & Marketing / New Customers | $X |
+| Lifetime Value | ARPU × Gross Margin × Lifetime | $X |
+| LTV/CAC Ratio | LTV / CAC | >3x |
+| Payback Period | CAC / (ARPU × Gross Margin × 12) | Path:
+ """Get the path to the appropriate generation script."""
+ base_path = Path(__file__).parent.parent.parent # skills directory
+
+ if tool == "scientific-schematics":
+ return base_path / "scientific-schematics" / "scripts" / "generate_schematic.py"
+ elif tool == "generate-image":
+ return base_path / "generate-image" / "scripts" / "generate_image.py"
+ else:
+ raise ValueError(f"Unknown tool: {tool}")
+
+
+def generate_visual(
+ filename: str,
+ tool: str,
+ prompt: str,
+ output_dir: Path,
+ topic: str,
+ skip_existing: bool = False,
+ verbose: bool = False
+) -> bool:
+ """Generate a single visual using the appropriate tool."""
+ output_path = output_dir / filename
+
+ # Skip if exists and skip_existing is True
+ if skip_existing and output_path.exists():
+ if verbose:
+ print(f" [SKIP] {filename} already exists")
+ return True
+
+ # Format prompt with topic
+ formatted_prompt = prompt.format(topic=topic)
+
+ # Get script path
+ script_path = get_script_path(tool)
+
+ if not script_path.exists():
+ print(f" [ERROR] Script not found: {script_path}")
+ return False
+
+ # Build command
+ if tool == "scientific-schematics":
+ cmd = [
+ sys.executable,
+ str(script_path),
+ formatted_prompt,
+ "-o", str(output_path),
+ "--doc-type", "report"
+ ]
+ else: # generate-image
+ cmd = [
+ sys.executable,
+ str(script_path),
+ formatted_prompt,
+ "--output", str(output_path)
+ ]
+
+ if verbose:
+ print(f" [GEN] {filename}")
+ print(f" Tool: {tool}")
+ print(f" Prompt: {formatted_prompt[:80]}...")
+
+ try:
+ result = subprocess.run(
+ cmd,
+ capture_output=True,
+ text=True,
+ timeout=120 # 2 minute timeout per image
+ )
+
+ if result.returncode == 0:
+ if verbose:
+ print(f" [OK] {filename} generated successfully")
+ return True
+ else:
+ print(f" [ERROR] {filename} failed:")
+ if result.stderr:
+ print(f" {result.stderr[:200]}")
+ return False
+
+ except subprocess.TimeoutExpired:
+ print(f" [TIMEOUT] {filename} generation timed out")
+ return False
+ except Exception as e:
+ print(f" [ERROR] {filename}: {str(e)}")
+ return False
+
+
+def main():
+ parser = argparse.ArgumentParser(
+ description="Generate visuals for a market research report (default: 5-6 core visuals)"
+ )
+ parser.add_argument(
+ "--topic", "-t",
+ required=True,
+ help="Market topic (e.g., 'Electric Vehicle Charging Infrastructure')"
+ )
+ parser.add_argument(
+ "--output-dir", "-o",
+ default="figures",
+ help="Output directory for generated images (default: figures)"
+ )
+ parser.add_argument(
+ "--all", "-a",
+ action="store_true",
+ help="Generate all 27 extended visuals (default: only core 5-6)"
+ )
+ parser.add_argument(
+ "--skip-existing", "-s",
+ action="store_true",
+ help="Skip generation if file already exists"
+ )
+ parser.add_argument(
+ "--verbose", "-v",
+ action="store_true",
+ help="Show detailed output"
+ )
+ parser.add_argument(
+ "--dry-run",
+ action="store_true",
+ help="Show what would be generated without actually generating"
+ )
+ parser.add_argument(
+ "--only",
+ type=str,
+ help="Only generate visuals matching this pattern (e.g., '01_', 'porter')"
+ )
+
+ args = parser.parse_args()
+
+ # Create output directory
+ output_dir = Path(args.output_dir)
+ if not args.dry_run:
+ output_dir.mkdir(parents=True, exist_ok=True)
+
+ print(f"\n{'='*60}")
+ print(f"Market Research Visual Generator")
+ print(f"{'='*60}")
+ print(f"Topic: {args.topic}")
+ print(f"Output Directory: {output_dir.absolute()}")
+ print(f"Mode: {'All Visuals (27)' if args.all else 'Core Visuals Only (5-6)'}")
+ print(f"Skip Existing: {args.skip_existing}")
+ print(f"{'='*60}\n")
+
+ # Select visual set based on --all flag
+ if args.all:
+ visuals_to_generate = CORE_VISUALS + EXTENDED_VISUALS
+ print("Generating ALL visuals (core + extended)\n")
+ else:
+ visuals_to_generate = CORE_VISUALS
+ print("Generating CORE visuals only (use --all for extended set)\n")
+
+ # Filter visuals if --only specified
+ if args.only:
+ pattern = args.only.lower()
+ visuals_to_generate = [
+ v for v in VISUALS
+ if pattern in v[0].lower() or pattern in v[2].lower()
+ ]
+ print(f"Filtered to {len(visuals_to_generate)} visuals matching '{args.only}'\n")
+
+ if args.dry_run:
+ print("DRY RUN - The following visuals would be generated:\n")
+ for filename, tool, prompt in visuals_to_generate:
+ formatted = prompt.format(topic=args.topic)
+ print(f" {filename}")
+ print(f" Tool: {tool}")
+ print(f" Prompt: {formatted[:60]}...")
+ print()
+ return
+
+ # Generate all visuals
+ total = len(visuals_to_generate)
+ success = 0
+ failed = 0
+ skipped = 0
+
+ for i, (filename, tool, prompt) in enumerate(visuals_to_generate, 1):
+ print(f"\n[{i}/{total}] Generating {filename}...")
+
+ result = generate_visual(
+ filename=filename,
+ tool=tool,
+ prompt=prompt,
+ output_dir=output_dir,
+ topic=args.topic,
+ skip_existing=args.skip_existing,
+ verbose=args.verbose
+ )
+
+ if result:
+ if args.skip_existing and (output_dir / filename).exists():
+ skipped += 1
+ else:
+ success += 1
+ else:
+ failed += 1
+
+ # Print summary
+ print(f"\n{'='*60}")
+ print(f"Generation Complete")
+ print(f"{'='*60}")
+ print(f"Total: {total}")
+ print(f"Success: {success}")
+ print(f"Skipped: {skipped}")
+ print(f"Failed: {failed}")
+ print(f"{'='*60}")
+
+ if failed > 0:
+ print(f"\nWARNING: {failed} visuals failed to generate.")
+ print("Check the output above for error details.")
+ print("You may need to generate failed visuals manually.")
+
+ print(f"\nOutput directory: {output_dir.absolute()}")
+
+
+if __name__ == "__main__":
+ main()
diff --git a/scientific-skills/paper-2-web/SKILL.md b/scientific-skills/paper-2-web/SKILL.md
new file mode 100644
index 0000000..8793722
--- /dev/null
+++ b/scientific-skills/paper-2-web/SKILL.md
@@ -0,0 +1,491 @@
+---
+name: paper-2-web
+description: This skill should be used when converting academic papers into promotional and presentation formats including interactive websites (Paper2Web), presentation videos (Paper2Video), and conference posters (Paper2Poster). Use this skill for tasks involving paper dissemination, conference preparation, creating explorable academic homepages, generating video abstracts, or producing print-ready posters from LaTeX or PDF sources.
+allowed-tools: [Read, Write, Edit, Bash]
+---
+
+# Paper2All: Academic Paper Transformation Pipeline
+
+## Overview
+
+This skill enables the transformation of academic papers into multiple promotional and presentation formats using the Paper2All autonomous pipeline. The system converts research papers (LaTeX or PDF) into three primary outputs:
+
+1. **Paper2Web**: Interactive, explorable academic homepages with layout-aware design
+2. **Paper2Video**: Professional presentation videos with narration, slides, and optional talking-head
+3. **Paper2Poster**: Print-ready conference posters with professional layouts
+
+The pipeline uses LLM-powered content extraction, design generation, and iterative refinement to create high-quality outputs suitable for conferences, journals, preprint repositories, and academic promotion.
+
+## When to Use This Skill
+
+Use this skill when:
+
+- **Creating conference materials**: Posters, presentation videos, and companion websites for academic conferences
+- **Promoting research**: Converting published papers or preprints into accessible, engaging web formats
+- **Preparing presentations**: Generating video abstracts or full presentation videos from paper content
+- **Disseminating findings**: Creating promotional materials for social media, lab websites, or institutional showcases
+- **Enhancing preprints**: Adding interactive homepages to bioRxiv, arXiv, or other preprint submissions
+- **Batch processing**: Generating promotional materials for multiple papers simultaneously
+
+**Trigger phrases**:
+- "Convert this paper to a website"
+- "Generate a conference poster from my LaTeX paper"
+- "Create a video presentation from this research"
+- "Make an interactive homepage for my paper"
+- "Transform my paper into promotional materials"
+- "Generate a poster and video for my conference talk"
+
+## Visual Enhancement with Scientific Schematics
+
+**When creating documents with this skill, always consider adding scientific diagrams and schematics to enhance visual communication.**
+
+If your document does not already contain schematics or diagrams:
+- Use the **scientific-schematics** skill to generate AI-powered publication-quality diagrams
+- Simply describe your desired diagram in natural language
+- Nano Banana Pro will automatically generate, review, and refine the schematic
+
+**For new documents:** Scientific schematics should be generated by default to visually represent key concepts, workflows, architectures, or relationships described in the text.
+
+**How to generate schematics:**
+```bash
+python scripts/generate_schematic.py "your diagram description" -o figures/output.png
+```
+
+The AI will automatically:
+- Create publication-quality images with proper formatting
+- Review and refine through multiple iterations
+- Ensure accessibility (colorblind-friendly, high contrast)
+- Save outputs in the figures/ directory
+
+**When to add schematics:**
+- Paper transformation pipeline diagrams
+- Website layout architecture diagrams
+- Video production workflow illustrations
+- Poster design process flowcharts
+- Content extraction diagrams
+- System architecture visualizations
+- Any complex concept that benefits from visualization
+
+For detailed guidance on creating schematics, refer to the scientific-schematics skill documentation.
+
+---
+
+## Core Capabilities
+
+### 1. Paper2Web: Interactive Website Generation
+
+Converts papers into layout-aware, interactive academic homepages that go beyond simple HTML conversion.
+
+**Key Features**:
+- Responsive, multi-section layouts adapted to paper content
+- Interactive figures, tables, and citations
+- Mobile-friendly design with navigation
+- Automatic logo discovery (with Google Search API)
+- Aesthetic refinement and quality assessment
+
+**Best For**: Post-publication promotion, preprint enhancement, lab websites, permanent research showcases
+
+→ **See `references/paper2web.md` for detailed documentation**
+
+---
+
+### 2. Paper2Video: Presentation Video Generation
+
+Generates professional presentation videos with slides, narration, cursor movements, and optional talking-head video.
+
+**Key Features**:
+- Automated slide generation from paper structure
+- Natural-sounding speech synthesis
+- Synchronized cursor movements and highlights
+- Optional talking-head video using Hallo2 (requires GPU)
+- Multi-language support
+
+**Best For**: Video abstracts, conference presentations, online talks, course materials, YouTube promotion
+
+→ **See `references/paper2video.md` for detailed documentation**
+
+---
+
+### 3. Paper2Poster: Conference Poster Generation
+
+Creates print-ready academic posters with professional layouts and visual design.
+
+**Key Features**:
+- Custom poster dimensions (any size)
+- Professional design templates
+- Institution branding support
+- QR code generation for links
+- High-resolution output (300+ DPI)
+
+**Best For**: Conference poster sessions, symposiums, academic exhibitions, virtual conferences
+
+→ **See `references/paper2poster.md` for detailed documentation**
+
+---
+
+## Quick Start
+
+### Prerequisites
+
+1. **Install Paper2All**:
+ ```bash
+ git clone https://github.com/YuhangChen1/Paper2All.git
+ cd Paper2All
+ conda create -n paper2all python=3.11
+ conda activate paper2all
+ pip install -r requirements.txt
+ ```
+
+2. **Configure API Keys** (create `.env` file):
+ ```
+ OPENAI_API_KEY=your_openai_api_key_here
+ # Optional: GOOGLE_API_KEY and GOOGLE_CSE_ID for logo search
+ ```
+
+3. **Install System Dependencies**:
+ - LibreOffice (document conversion)
+ - Poppler utilities (PDF processing)
+ - NVIDIA GPU with 48GB (optional, for talking-head videos)
+
+→ **See `references/installation.md` for complete installation guide**
+
+---
+
+### Basic Usage
+
+**Generate All Components** (website + poster + video):
+```bash
+python pipeline_all.py \
+ --input-dir "path/to/paper" \
+ --output-dir "path/to/output" \
+ --model-choice 1
+```
+
+**Generate Website Only**:
+```bash
+python pipeline_all.py \
+ --input-dir "path/to/paper" \
+ --output-dir "path/to/output" \
+ --model-choice 1 \
+ --generate-website
+```
+
+**Generate Poster with Custom Size**:
+```bash
+python pipeline_all.py \
+ --input-dir "path/to/paper" \
+ --output-dir "path/to/output" \
+ --model-choice 1 \
+ --generate-poster \
+ --poster-width-inches 60 \
+ --poster-height-inches 40
+```
+
+**Generate Video** (lightweight pipeline):
+```bash
+python pipeline_light.py \
+ --model_name_t gpt-4.1 \
+ --model_name_v gpt-4.1 \
+ --result_dir "path/to/output" \
+ --paper_latex_root "path/to/paper"
+```
+
+→ **See `references/usage_examples.md` for comprehensive workflow examples**
+
+---
+
+## Workflow Decision Tree
+
+Use this decision tree to determine which components to generate:
+
+```
+User needs promotional materials for paper?
+│
+├─ Need permanent online presence?
+│ └─→ Generate Paper2Web (interactive website)
+│
+├─ Need physical conference materials?
+│ ├─→ Poster session? → Generate Paper2Poster
+│ └─→ Oral presentation? → Generate Paper2Video
+│
+├─ Need video content?
+│ ├─→ Journal video abstract? → Generate Paper2Video (5-10 min)
+│ ├─→ Conference talk? → Generate Paper2Video (15-20 min)
+│ └─→ Social media? → Generate Paper2Video (1-3 min)
+│
+└─ Need complete package?
+ └─→ Generate all three components
+```
+
+## Input Requirements
+
+### Supported Input Formats
+
+**1. LaTeX Source** (Recommended):
+```
+paper_directory/
+├── main.tex # Main paper file
+├── sections/ # Optional: split sections
+├── figures/ # All figure files
+├── tables/ # Table files
+└── bibliography.bib # References
+```
+
+**2. PDF**:
+- High-quality PDF with embedded fonts
+- Selectable text (not scanned images)
+- High-resolution figures (300+ DPI preferred)
+
+### Input Organization
+
+**Single Paper**:
+```bash
+input/
+└── paper_name/
+ ├── main.tex (or paper.pdf)
+ ├── figures/
+ └── bibliography.bib
+```
+
+**Multiple Papers** (batch processing):
+```bash
+input/
+├── paper1/
+│ └── main.tex
+├── paper2/
+│ └── main.tex
+└── paper3/
+ └── main.tex
+```
+
+## Common Parameters
+
+### Model Selection
+- `--model-choice 1`: GPT-4 (best balance of quality and cost)
+- `--model-choice 2`: GPT-4.1 (latest features, higher cost)
+- `--model_name_t gpt-3.5-turbo`: Faster, lower cost (acceptable quality)
+
+### Component Selection
+- `--generate-website`: Enable website generation
+- `--generate-poster`: Enable poster generation
+- `--generate-video`: Enable video generation
+- `--enable-talking-head`: Add talking-head to video (requires GPU)
+
+### Customization
+- `--poster-width-inches [width]`: Custom poster width
+- `--poster-height-inches [height]`: Custom poster height
+- `--video-duration [seconds]`: Target video length
+- `--enable-logo-search`: Automatic institution logo discovery
+
+## Output Structure
+
+Generated outputs are organized by paper and component:
+
+```
+output/
+└── paper_name/
+ ├── website/
+ │ ├── index.html
+ │ ├── styles.css
+ │ └── assets/
+ ├── poster/
+ │ ├── poster_final.pdf
+ │ ├── poster_final.png
+ │ └── poster_source/
+ └── video/
+ ├── final_video.mp4
+ ├── slides/
+ ├── audio/
+ └── subtitles/
+```
+
+## Best Practices
+
+### Input Preparation
+1. **Use LaTeX when possible**: Provides best content extraction and structure
+2. **Organize files properly**: Keep all assets (figures, tables, bibliography) in paper directory
+3. **High-quality figures**: Use vector formats (PDF, SVG) or high-resolution rasters (300+ DPI)
+4. **Clean LaTeX**: Remove compilation artifacts, ensure source compiles successfully
+
+### Model Selection Strategy
+- **GPT-4**: Best for production-quality outputs, conferences, publications
+- **GPT-4.1**: Use when you need latest features or best possible quality
+- **GPT-3.5-turbo**: Use for quick drafts, testing, or simple papers
+
+### Component Priority
+For tight deadlines, generate in this order:
+1. **Website** (fastest, most versatile, ~15-30 min)
+2. **Poster** (moderate speed, for print deadlines, ~10-20 min)
+3. **Video** (slowest, can be generated later, ~20-60 min)
+
+### Quality Assurance
+Before finalizing outputs:
+1. **Website**: Test on multiple devices, verify all links work, check figure quality
+2. **Poster**: Print test page, verify text readability from 3-6 feet, check colors
+3. **Video**: Watch entire video, verify audio synchronization, test on different devices
+
+## Resource Requirements
+
+### Processing Time
+- **Website**: 15-30 minutes per paper
+- **Poster**: 10-20 minutes per paper
+- **Video (no talking-head)**: 20-60 minutes per paper
+- **Video (with talking-head)**: 60-120 minutes per paper
+
+### Computational Requirements
+- **CPU**: Multi-core processor for parallel processing
+- **RAM**: 16GB minimum, 32GB recommended for large papers
+- **GPU**: Optional for standard outputs, required for talking-head (NVIDIA A6000 48GB)
+- **Storage**: 1-5GB per paper depending on components and quality settings
+
+### API Costs (Approximate)
+- **Website**: $0.50-2.00 per paper (GPT-4)
+- **Poster**: $0.30-1.00 per paper (GPT-4)
+- **Video**: $1.00-3.00 per paper (GPT-4)
+- **Complete package**: $2.00-6.00 per paper (GPT-4)
+
+## Troubleshooting
+
+### Common Issues
+
+**LaTeX parsing errors**:
+- Ensure LaTeX source compiles successfully: `pdflatex main.tex`
+- Check all referenced files are present
+- Verify no custom packages prevent parsing
+
+**Poor figure quality**:
+- Use vector formats (PDF, SVG, EPS) instead of rasters
+- Ensure raster images are 300+ DPI
+- Check figures render correctly in compiled PDF
+
+**Video generation failures**:
+- Verify sufficient disk space (5GB+ recommended)
+- Check all dependencies installed (LibreOffice, Poppler)
+- Review error logs in output directory
+
+**Poster layout issues**:
+- Verify poster dimensions are reasonable (24"-72" range)
+- Check content length (very long papers may need manual curation)
+- Ensure figures have appropriate resolution for poster size
+
+**API errors**:
+- Verify API keys in `.env` file
+- Check API credit balance
+- Ensure no rate limiting (wait and retry)
+
+## Platform-Specific Features
+
+### Social Media Optimization
+
+The system auto-detects target platforms:
+
+**Twitter/X** (English, numeric folder names):
+```bash
+mkdir -p input/001_twitter/
+# Generates English promotional content
+```
+
+**Xiaohongshu/小红书** (Chinese, alphanumeric folder names):
+```bash
+mkdir -p input/xhs_paper/
+# Generates Chinese promotional content
+```
+
+### Conference-Specific Formatting
+
+Specify conference requirements:
+- Standard poster sizes (4'×3', 5'×4', A0, A1)
+- Video abstract length limits (typically 3-5 minutes)
+- Institution branding requirements
+- Color scheme preferences
+
+## Integration and Deployment
+
+### Website Deployment
+Deploy generated websites to:
+- **GitHub Pages**: Free hosting with custom domain
+- **Academic hosting**: University web servers
+- **Personal servers**: AWS, DigitalOcean, etc.
+- **Netlify/Vercel**: Modern hosting with CI/CD
+
+### Poster Printing
+Print-ready files work with:
+- Professional poster printing services
+- University print shops
+- Online services (e.g., Spoonflower, VistaPrint)
+- Large format printers (if available)
+
+### Video Distribution
+Share videos on:
+- **YouTube**: Public or unlisted for maximum reach
+- **Institutional repositories**: University video platforms
+- **Conference platforms**: Virtual conference systems
+- **Social media**: Twitter, LinkedIn, ResearchGate
+
+## Advanced Usage
+
+### Batch Processing
+Process multiple papers efficiently:
+```bash
+# Organize papers in batch directory
+for paper in paper1 paper2 paper3; do
+ python pipeline_all.py \
+ --input-dir input/$paper \
+ --output-dir output/$paper \
+ --model-choice 1 &
+done
+wait
+```
+
+### Custom Branding
+Apply institution or lab branding:
+- Provide logo files in paper directory
+- Specify color schemes in configuration
+- Use custom templates (advanced)
+- Match conference theme requirements
+
+### Multi-Language Support
+Generate content in different languages:
+- Specify target language in configuration
+- System translates content appropriately
+- Selects appropriate voice for video narration
+- Adapts design conventions to culture
+
+## References and Resources
+
+This skill includes comprehensive reference documentation:
+
+- **`references/installation.md`**: Complete installation and configuration guide
+- **`references/paper2web.md`**: Detailed Paper2Web documentation with all features
+- **`references/paper2video.md`**: Comprehensive Paper2Video guide including talking-head setup
+- **`references/paper2poster.md`**: Complete Paper2Poster documentation with design templates
+- **`references/usage_examples.md`**: Real-world examples and workflow patterns
+
+**External Resources**:
+- GitHub Repository: https://github.com/YuhangChen1/Paper2All
+- Curated Dataset: Available on Hugging Face (13 research categories)
+- Benchmark Suite: Reference websites and evaluation metrics
+
+## Evaluation and Quality Metrics
+
+The Paper2All system includes built-in quality assessment:
+
+### Content Quality
+- **Completeness**: Coverage of paper content
+- **Accuracy**: Faithful representation of findings
+- **Clarity**: Accessibility and understandability
+- **Informativeness**: Key information prominence
+
+### Design Quality
+- **Aesthetics**: Visual appeal and professionalism
+- **Layout**: Balance, hierarchy, and organization
+- **Readability**: Text legibility and figure clarity
+- **Consistency**: Uniform styling and branding
+
+### Technical Quality
+- **Performance**: Load times, responsiveness
+- **Compatibility**: Cross-browser, cross-device support
+- **Accessibility**: WCAG compliance, screen reader support
+- **Standards**: Valid HTML/CSS, print-ready PDFs
+
+All outputs undergo automated quality checks before generation completes.
diff --git a/scientific-skills/paper-2-web/references/installation.md b/scientific-skills/paper-2-web/references/installation.md
new file mode 100644
index 0000000..37dce01
--- /dev/null
+++ b/scientific-skills/paper-2-web/references/installation.md
@@ -0,0 +1,141 @@
+# Installation and Configuration
+
+## System Requirements
+
+### Hardware Requirements
+- **GPU**: NVIDIA A6000 (48GB minimum) required for video generation with talking-head features
+- **CPU**: Multi-core processor recommended for PDF processing and document conversion
+- **RAM**: 16GB minimum, 32GB recommended for large papers
+
+### Software Requirements
+- **Python**: 3.11 or higher
+- **Conda**: Environment manager for dependency isolation
+- **LibreOffice**: Required for document format conversion (PDF to PPTX, etc.)
+- **Poppler utilities**: Required for PDF processing and manipulation
+
+## Installation Steps
+
+### 1. Clone the Repository
+```bash
+git clone https://github.com/YuhangChen1/Paper2All.git
+cd Paper2All
+```
+
+### 2. Create Conda Environment
+```bash
+conda create -n paper2all python=3.11
+conda activate paper2all
+```
+
+### 3. Install Dependencies
+```bash
+pip install -r requirements.txt
+```
+
+### 4. Install System Dependencies
+
+**Ubuntu/Debian:**
+```bash
+sudo apt-get install libreoffice poppler-utils
+```
+
+**macOS:**
+```bash
+brew install libreoffice poppler
+```
+
+**Windows:**
+- Download and install LibreOffice from https://www.libreoffice.org/
+- Download and install Poppler from https://github.com/oschwartz10612/poppler-windows
+
+## API Configuration
+
+Create a `.env` file in the project root with the following credentials:
+
+### Required API Keys
+
+**Option 1: OpenAI API**
+```
+OPENAI_API_KEY=your_openai_api_key_here
+```
+
+**Option 2: OpenRouter API** (alternative to OpenAI)
+```
+OPENROUTER_API_KEY=your_openrouter_api_key_here
+```
+
+### Optional API Keys
+
+**Google Search API** (for automatic logo discovery)
+```
+GOOGLE_API_KEY=your_google_api_key_here
+GOOGLE_CSE_ID=your_custom_search_engine_id_here
+```
+
+## Model Configuration
+
+The system supports multiple LLM backends:
+
+### Supported Models
+- GPT-4 (recommended for best quality)
+- GPT-4.1 (latest version)
+- GPT-3.5-turbo (faster, lower cost)
+- Claude models via OpenRouter
+- Other OpenRouter-supported models
+
+### Model Selection
+
+Specify models using the `--model-choice` parameter or `--model_name_t` and `--model_name_v` parameters:
+- Model choice 1: GPT-4 for all components
+- Model choice 2: GPT-4.1 for all components
+- Custom: Specify separate models for text and visual processing
+
+## Verification
+
+Test the installation:
+
+```bash
+python pipeline_all.py --help
+```
+
+If successful, you should see the help menu with all available options.
+
+## Troubleshooting
+
+### Common Issues
+
+**1. LibreOffice not found**
+- Ensure LibreOffice is installed and in your system PATH
+- Try running `libreoffice --version` to verify
+
+**2. Poppler utilities not found**
+- Verify installation with `pdftoppm -v`
+- Add Poppler bin directory to PATH if needed
+
+**3. GPU/CUDA errors for video generation**
+- Ensure NVIDIA drivers are up to date
+- Verify CUDA toolkit is installed
+- Check GPU memory with `nvidia-smi`
+
+**4. API key errors**
+- Verify `.env` file is in the project root
+- Check that API keys are valid and have sufficient credits
+- Ensure no extra spaces or quotes around keys in `.env`
+
+## Directory Structure
+
+After installation, organize your workspace:
+
+```
+Paper2All/
+├── .env # API credentials
+├── input/ # Place your paper files here
+│ └── paper_name/ # Each paper in its own directory
+│ └── main.tex # LaTeX source or PDF
+├── output/ # Generated outputs
+│ └── paper_name/
+│ ├── website/ # Generated website files
+│ ├── video/ # Generated video files
+│ └── poster/ # Generated poster files
+└── ...
+```
diff --git a/scientific-skills/paper-2-web/references/paper2poster.md b/scientific-skills/paper-2-web/references/paper2poster.md
new file mode 100644
index 0000000..a7f22d2
--- /dev/null
+++ b/scientific-skills/paper-2-web/references/paper2poster.md
@@ -0,0 +1,346 @@
+# Paper2Poster: Academic Poster Generation
+
+## Overview
+
+Paper2Poster automatically generates professional academic posters from research papers. The system extracts key content, designs visually appealing layouts, and creates print-ready posters suitable for conferences, symposiums, and academic presentations.
+
+## Core Capabilities
+
+### 1. Content Extraction
+- Identifies key findings and contributions
+- Extracts important figures and tables
+- Summarizes methodology
+- Highlights results and conclusions
+- Preserves citations and references
+
+### 2. Layout Design
+- Creates balanced, professional layouts
+- Optimizes content density and white space
+- Establishes clear visual hierarchy
+- Supports multiple poster sizes
+- Adapts to different content types
+
+### 3. Visual Design
+- Applies color schemes and branding
+- Optimizes typography for readability
+- Ensures figure quality and sizing
+- Creates cohesive visual identity
+- Maintains academic presentation standards
+
+## Usage
+
+### Basic Poster Generation
+
+```bash
+python pipeline_all.py \
+ --input-dir "path/to/papers" \
+ --output-dir "path/to/output" \
+ --model-choice 1 \
+ --generate-poster
+```
+
+### Custom Poster Dimensions
+
+```bash
+python pipeline_all.py \
+ --input-dir "path/to/papers" \
+ --output-dir "path/to/output" \
+ --model-choice 2 \
+ --generate-poster \
+ --poster-width-inches 60 \
+ --poster-height-inches 40
+```
+
+### Parameters
+
+**Basic Configuration:**
+- `--input-dir`: Directory containing paper files
+- `--output-dir`: Directory for generated posters
+- `--model-choice`: LLM model selection (1=GPT-4, 2=GPT-4.1)
+- `--generate-poster`: Enable poster generation
+
+**Poster Dimensions:**
+- `--poster-width-inches`: Width in inches (default: 48)
+- `--poster-height-inches`: Height in inches (default: 36)
+- `--poster-orientation`: Portrait or landscape (default: landscape)
+- `--poster-dpi`: Resolution in DPI (default: 300)
+
+**Design Options:**
+- `--poster-template`: Template style (default: modern)
+- `--color-scheme`: Color palette selection
+- `--institution-branding`: Include institution colors and logos
+- `--font-family`: Typography selection
+
+## Standard Poster Sizes
+
+### Conference Standard Sizes
+- **4' × 3'** (48" × 36"): Most common conference poster
+- **5' × 4'** (60" × 48"): Large format for major conferences
+- **3' × 4'** (36" × 48"): Portrait orientation for narrow spaces
+- **A0** (841mm × 1189mm): International standard
+- **A1** (594mm × 841mm): Compact conference poster
+
+### Custom Sizes
+The system supports any custom dimensions. Specify using:
+```bash
+--poster-width-inches [width] --poster-height-inches [height]
+```
+
+## Input Requirements
+
+### Supported Input Formats
+1. **LaTeX source** (preferred)
+ - Main `.tex` file with complete paper
+ - All figures and tables referenced
+ - Compiled successfully
+
+2. **PDF**
+ - High-quality PDF with embedded fonts
+ - Selectable text (not scanned)
+ - High-resolution figures
+
+### Required Content Elements
+- Title and authors
+- Abstract or summary
+- Methodology description
+- Key results
+- Conclusions
+- References (optional but recommended)
+
+### Recommended Assets
+- High-resolution figures (300 DPI minimum)
+- Vector graphics (PDF, SVG, EPS)
+- Institution logo
+- Author photos (optional)
+- QR codes for website/repo links
+
+## Output Structure
+
+```
+output/paper_name/poster/
+├── poster_final.pdf # Print-ready poster
+├── poster_final.png # High-res PNG version
+├── poster_preview.pdf # Low-res preview
+├── poster_source/ # Source files
+│ ├── layout.pptx # Editable PowerPoint
+│ ├── layout.svg # Vector graphics
+│ └── layout.json # Layout specification
+├── assets/ # Extracted assets
+│ ├── figures/ # Poster figures
+│ ├── logos/ # Institution logos
+│ └── qrcodes/ # Generated QR codes
+└── metadata/
+ ├── design_spec.json # Design specifications
+ └── content_map.json # Content organization
+```
+
+## Poster Layout Sections
+
+### Standard Sections
+1. **Header**
+ - Title (large, prominent)
+ - Authors and affiliations
+ - Institution logos
+ - Conference information
+
+2. **Introduction/Background**
+ - Problem statement
+ - Research motivation
+ - Brief literature context
+
+3. **Methods**
+ - Experimental design
+ - Key procedures
+ - Important parameters
+ - Visual workflow diagram
+
+4. **Results**
+ - Key findings (largest section)
+ - Primary figures and tables
+ - Statistical summaries
+ - Visual data representations
+
+5. **Conclusions**
+ - Main takeaways
+ - Implications
+ - Future work
+
+6. **References & Contact**
+ - Selected key references
+ - Author contact information
+ - QR codes for paper/website
+ - Acknowledgments
+
+## Design Templates
+
+### Modern Template (Default)
+- Clean, minimalist design
+- Bold colors for headers
+- Ample white space
+- Modern typography
+- Focus on visual hierarchy
+
+### Academic Template
+- Traditional academic styling
+- Conservative color palette
+- Dense information layout
+- Classic serif typography
+- Standard section organization
+
+### Visual Template
+- Image-focused layout
+- Large figure displays
+- Minimal text density
+- Infographic elements
+- Story-driven flow
+
+### Technical Template
+- Equation-friendly layout
+- Code snippet support
+- Detailed methodology sections
+- Technical figure emphasis
+- Engineering/CS aesthetic
+
+## Color Schemes
+
+### Predefined Schemes
+- **Institutional**: Uses institution branding colors
+- **Professional**: Navy blue and gray palette
+- **Vibrant**: Bold, eye-catching colors
+- **Nature**: Green and earth tones
+- **Tech**: Modern blue and cyan
+- **Warm**: Orange and red accents
+- **Cool**: Blue and purple tones
+
+### Custom Color Schemes
+Specify custom colors in configuration:
+```json
+{
+ "primary": "#1E3A8A",
+ "secondary": "#3B82F6",
+ "accent": "#F59E0B",
+ "background": "#FFFFFF",
+ "text": "#1F2937"
+}
+```
+
+## Typography Options
+
+### Font Families
+- **Sans-serif** (default): Clean, modern, highly readable
+- **Serif**: Traditional academic appearance
+- **Mixed**: Serif for body, sans-serif for headers
+- **Monospace**: For code and technical content
+
+### Size Hierarchy
+- **Title**: 72-96pt
+- **Section headers**: 48-60pt
+- **Subsection headers**: 36-48pt
+- **Body text**: 24-32pt
+- **Captions**: 18-24pt
+- **References**: 16-20pt
+
+## Quality Assurance
+
+### Automated Checks
+- **Text readability**: Minimum font size verification
+- **Color contrast**: Accessibility compliance
+- **Figure quality**: Resolution and clarity checks
+- **Layout balance**: Content distribution analysis
+- **Branding consistency**: Logo and color verification
+
+### Manual Review Checklist
+1. ☐ All figures are high resolution and clear
+2. ☐ Text is readable from 3-6 feet away
+3. ☐ Color scheme is professional and consistent
+4. ☐ No text overlaps or layout issues
+5. ☐ Institution logos are correct and high quality
+6. ☐ QR codes work and link to correct URLs
+7. ☐ Author information is accurate
+8. ☐ Key findings are prominently displayed
+9. ☐ References are properly formatted
+10. ☐ File is correct size and resolution for printing
+
+## Print Preparation
+
+### File Specifications
+- **Format**: PDF/X-1a or PDF/X-4 for professional printing
+- **Resolution**: 300 DPI minimum, 600 DPI for fine details
+- **Color mode**: CMYK for print (system auto-converts from RGB)
+- **Bleed**: 0.125" bleed on all sides (automatically added)
+- **Fonts**: All fonts embedded in PDF
+
+### Printing Recommendations
+1. **Print shop**: Use professional poster printing service
+2. **Paper type**: Matte or satin finish for academic posters
+3. **Backing**: Foam core or rigid backing for stability
+4. **Protection**: Lamination optional but recommended
+5. **Test print**: Print A4/Letter size preview first
+
+### Budget Options
+- **Standard**: $50-100 for 4'×3' poster at professional shop
+- **Economy**: $20-40 for print-only (no mounting)
+- **Premium**: $150-300 for high-end materials and mounting
+- **DIY**: <$10 for multiple pages tiled and assembled
+
+## Advanced Features
+
+### QR Code Generation
+Automatically generates QR codes for:
+- Paper PDF or DOI
+- Project website
+- GitHub repository
+- Data repository
+- Author profiles (ORCID, Google Scholar)
+
+### Institution Branding
+When enabled:
+- Extracts institution from author affiliations
+- Searches for official logos (requires Google Search API)
+- Applies institution color schemes
+- Matches brand guidelines
+
+### Interactive Elements (Digital Posters)
+For digital display or virtual conferences:
+- Clickable links and references
+- Embedded videos in figures
+- Interactive data visualizations
+- Animated transitions
+
+## Best Practices
+
+### Content Optimization
+1. **Focus on key findings**: Poster should tell story at a glance
+2. **Limit text**: Use bullet points, avoid paragraphs
+3. **Prioritize visuals**: Figures should dominate the space
+4. **Clear flow**: Guide viewer through logical progression
+5. **Highlight contributions**: Make novelty obvious
+
+### Design Optimization
+1. **Use contrast**: Ensure text is easily readable
+2. **Maintain hierarchy**: Size indicates importance
+3. **Balance content**: Avoid crowding any section
+4. **Consistent styling**: Same fonts, colors throughout
+5. **White space**: Don't fill every inch
+
+### Figure Optimization
+1. **Large enough**: Minimum 6" width for main figures
+2. **High resolution**: 300 DPI minimum
+3. **Clear labels**: Axis labels, legends readable
+4. **Remove clutter**: Simplify for poster format
+5. **Use captions**: Brief, informative descriptions
+
+## Limitations
+
+- Complex equations may need manual adjustment for readability
+- Very long papers may require content prioritization
+- Custom branding requires manual specification or API access
+- Multi-language support limited to common languages
+- 3D visualizations may lose quality in 2D poster format
+
+## Integration with Other Components
+
+Combine Paper2Poster with:
+- **Paper2Web**: Use matching visual design and color scheme
+- **Paper2Video**: Create poster walk-through video
+- **AutoPR**: Generate social media graphics from poster
diff --git a/scientific-skills/paper-2-web/references/paper2video.md b/scientific-skills/paper-2-web/references/paper2video.md
new file mode 100644
index 0000000..9cf4388
--- /dev/null
+++ b/scientific-skills/paper-2-web/references/paper2video.md
@@ -0,0 +1,305 @@
+# Paper2Video: Presentation Video Generation
+
+## Overview
+
+Paper2Video generates presentation videos from LaTeX sources, transforming academic papers into engaging video presentations. The system processes papers through multiple specialized modules to create professional presentation videos complete with slides, narration, and optional talking-head video.
+
+## Core Components
+
+### 1. Slide Generation Module
+- Extracts key content from paper structure
+- Creates visually appealing presentation slides
+- Organizes content in logical flow
+- Includes figures, tables, and equations
+- Optimizes text density for readability
+
+### 2. Subtitle Generation Module
+- Generates natural presentation script
+- Synchronizes text with slide transitions
+- Creates speaker notes and timing
+- Supports multiple languages
+- Optimizes for speech synthesis
+
+### 3. Speech Synthesis Module
+- Converts subtitles to natural-sounding speech
+- Supports multiple voices and accents
+- Controls pacing and emphasis
+- Generates audio track for video
+- Handles technical terminology
+
+### 4. Cursor Movement Module
+- Simulates presenter cursor movements
+- Highlights key points on slides
+- Guides viewer attention
+- Creates natural presentation flow
+- Synchronizes with narration
+
+### 5. Talking-Head Video Generation (Optional)
+- Uses Hallo2 for realistic presenter video
+- Lip-syncs with generated audio
+- Requires reference image or video
+- GPU-intensive (NVIDIA A6000 48GB minimum)
+- Creates engaging presenter presence
+
+## Usage
+
+### Basic Video Generation (Without Talking-Head)
+
+```bash
+python pipeline_light.py \
+ --model_name_t gpt-4.1 \
+ --model_name_v gpt-4.1 \
+ --result_dir /path/to/output \
+ --paper_latex_root /path/to/paper
+```
+
+### Full Video Generation (With Talking-Head)
+
+```bash
+python pipeline_all.py \
+ --input-dir "path/to/papers" \
+ --output-dir "path/to/output" \
+ --model-choice 1 \
+ --enable-talking-head
+```
+
+### Parameters
+
+**Model Configuration:**
+- `--model_name_t`: Model for text/subtitle generation (default: gpt-4.1)
+- `--model_name_v`: Model for visual/slide generation (default: gpt-4.1)
+- `--model-choice`: Preset model configuration (1=GPT-4, 2=GPT-4.1)
+
+**Input/Output:**
+- `--paper_latex_root`: Root directory of LaTeX paper source
+- `--result_dir` or `--output-dir`: Output directory for generated videos
+- `--input-dir`: Directory containing multiple papers to process
+
+**Video Options:**
+- `--enable-talking-head`: Enable talking-head video generation (requires GPU)
+- `--video-duration`: Target video duration in seconds (default: auto-calculated)
+- `--slides-per-minute`: Control presentation pacing (default: 2-3)
+- `--voice`: Voice selection for speech synthesis
+
+**Quality Settings:**
+- `--video-resolution`: Output resolution (default: 1920x1080)
+- `--video-fps`: Frame rate (default: 30)
+- `--audio-quality`: Audio bitrate (default: 192kbps)
+
+## Input Requirements
+
+### LaTeX Source Structure
+```
+paper_directory/
+├── main.tex # Main paper file
+├── sections/ # Section files (if split)
+│ ├── introduction.tex
+│ ├── methods.tex
+│ └── results.tex
+├── figures/ # Figure files
+│ ├── fig1.pdf
+│ ├── fig2.png
+│ └── ...
+├── tables/ # Table files
+└── bibliography.bib # References
+```
+
+### Required Elements
+- Valid LaTeX source that compiles
+- Proper section structure (abstract, introduction, methods, results, conclusion)
+- High-quality figures (vector formats preferred)
+- Complete bibliography
+
+### Optional Elements
+- Author photos for talking-head generation
+- Custom slide templates
+- Background music or sound effects
+- Institution branding assets
+
+## Output Structure
+
+```
+output/paper_name/video/
+├── final_video.mp4 # Complete presentation video
+├── slides/ # Generated slide images
+│ ├── slide_001.png
+│ ├── slide_002.png
+│ └── ...
+├── audio/ # Audio components
+│ ├── narration.mp3 # Speech synthesis output
+│ └── background.mp3 # Optional background audio
+├── subtitles/ # Subtitle files
+│ ├── subtitles.srt # Standard subtitle format
+│ └── subtitles.vtt # WebVTT format
+├── script/ # Presentation script
+│ ├── full_script.txt # Complete narration text
+│ └── slide_notes.json # Slide-by-slide notes
+└── metadata/ # Video metadata
+ ├── timings.json # Slide timing information
+ └── video_info.json # Video properties
+```
+
+## Video Generation Process
+
+### Phase 1: Content Analysis
+1. Parse LaTeX source structure
+2. Extract key concepts and findings
+3. Identify important figures and equations
+4. Determine logical presentation flow
+
+### Phase 2: Slide Creation
+1. Design slide layouts based on content
+2. Allocate content across appropriate number of slides
+3. Incorporate figures and visual elements
+4. Apply consistent styling and branding
+
+### Phase 3: Script Generation
+1. Write natural presentation narration
+2. Time script sections to slides
+3. Add transitions and emphasis
+4. Optimize for speech synthesis
+
+### Phase 4: Audio Production
+1. Generate speech from script
+2. Add emphasis and pacing
+3. Include pauses for slide transitions
+4. Mix with optional background audio
+
+### Phase 5: Video Assembly
+1. Combine slides with timing information
+2. Synchronize audio track
+3. Add cursor movements and highlights
+4. Generate talking-head video (if enabled)
+5. Render final video file
+
+## Customization Options
+
+### Presentation Style
+- **Academic**: Formal, detailed, comprehensive
+- **Conference**: Focused on key findings, faster pace
+- **Public**: Simplified language, engaging storytelling
+- **Tutorial**: Step-by-step explanation, educational focus
+
+### Voice Configuration
+Available voice options (via speech synthesis):
+- Multiple languages and accents
+- Male/female voice selection
+- Speaking rate adjustment
+- Pitch and tone customization
+
+### Visual Themes
+- Institution branding colors
+- Conference template matching
+- Custom backgrounds and fonts
+- Dark mode presentations
+
+## Quality Assessment
+
+### Content Quality Metrics
+- **Completeness**: Coverage of paper content
+- **Clarity**: Explanation quality and coherence
+- **Flow**: Logical progression of ideas
+- **Engagement**: Visual appeal and pacing
+
+### Technical Quality Metrics
+- **Audio quality**: Speech clarity and naturalness
+- **Video quality**: Resolution and encoding
+- **Synchronization**: Audio-visual alignment
+- **Timing**: Appropriate slide duration
+
+## Advanced Features
+
+### Multi-Language Support
+- Generate presentations in multiple languages
+- Automatic translation of script
+- Language-appropriate voice selection
+- Cultural adaptation of presentation style
+
+### Talking-Head Generation with Hallo2
+Requires:
+- NVIDIA A6000 GPU (48GB minimum)
+- Reference image or short video of presenter
+- Additional processing time (2-3x longer)
+
+Benefits:
+- More engaging presentation
+- Professional presenter appearance
+- Natural gestures and expressions
+- Lip-sync accuracy
+
+### Interactive Elements
+- Embedded clickable links
+- Navigation menu
+- Chapter markers
+- Supplementary material links
+
+## Best Practices
+
+### Input Preparation
+1. **Clean LaTeX source**: Remove unnecessary comments and artifacts
+2. **High-quality figures**: Use vector formats when possible
+3. **Clear structure**: Well-organized sections and subsections
+4. **Complete content**: Include all necessary files and references
+
+### Model Selection
+- **Text generation (model_name_t)**: GPT-4.1 for best script quality
+- **Visual generation (model_name_v)**: GPT-4.1 for optimal slide design
+- For faster processing with acceptable quality: GPT-3.5-turbo
+
+### Video Optimization
+1. **Target duration**: 10-15 minutes for conference talks, 30-45 for detailed presentations
+2. **Pacing**: 2-3 slides per minute for technical content
+3. **Resolution**: 1920x1080 for standard, 3840x2160 for high-quality
+4. **Audio**: 192kbps minimum for clear speech
+
+### Quality Review
+Before finalizing:
+1. Watch entire video for content accuracy
+2. Check audio synchronization with slides
+3. Verify figure quality and readability
+4. Test subtitle accuracy and timing
+5. Review cursor movements for natural flow
+
+## Performance Considerations
+
+### Processing Time
+- **Without talking-head**: 10-30 minutes per paper (depending on length)
+- **With talking-head**: 30-120 minutes per paper
+- **Factors**: Paper length, figure count, model speed, GPU availability
+
+### Resource Requirements
+- **CPU**: Multi-core recommended for parallel processing
+- **RAM**: 16GB minimum, 32GB for large papers
+- **GPU**: Optional for standard, required for talking-head (A6000 48GB)
+- **Storage**: 1-5GB per video depending on length and quality
+
+## Troubleshooting
+
+### Common Issues
+
+**1. LaTeX parsing errors**
+- Ensure LaTeX source compiles successfully
+- Check for special packages or custom commands
+- Verify all referenced files are present
+
+**2. Speech synthesis problems**
+- Check audio quality settings
+- Verify text is properly formatted
+- Test with different voice options
+
+**3. Video rendering failures**
+- Check available disk space
+- Verify all dependencies are installed
+- Review error logs for specific issues
+
+**4. Talking-head generation errors**
+- Confirm GPU memory (48GB required)
+- Check CUDA drivers are up to date
+- Verify reference image quality and format
+
+## Integration with Other Components
+
+Combine Paper2Video with:
+- **Paper2Web**: Embed video in generated website
+- **Paper2Poster**: Use matching visual style
+- **AutoPR**: Create promotional clips from full video
diff --git a/scientific-skills/paper-2-web/references/paper2web.md b/scientific-skills/paper-2-web/references/paper2web.md
new file mode 100644
index 0000000..276180c
--- /dev/null
+++ b/scientific-skills/paper-2-web/references/paper2web.md
@@ -0,0 +1,187 @@
+# Paper2Web: Academic Homepage Generation
+
+## Overview
+
+Paper2Web converts academic papers into interactive, explorable academic homepages. Unlike traditional approaches (direct generation, template-based, or HTML conversion), Paper2Web creates layout-aware, interactive websites through an iterative refinement process.
+
+## Core Capabilities
+
+### 1. Layout-Aware Generation
+- Analyzes paper structure and content organization
+- Creates responsive, multi-section layouts
+- Adapts design based on paper type (research article, review, preprint, etc.)
+
+### 2. Interactive Elements
+- Expandable sections for detailed content
+- Interactive figures and tables
+- Embedded citations and references
+- Navigation menu for easy browsing
+- Mobile-responsive design
+
+### 3. Content Refinement
+The system uses an iterative pipeline:
+1. Initial content extraction and structuring
+2. Layout generation with visual hierarchy
+3. Interactive element integration
+4. Aesthetic refinement
+5. Quality assessment and validation
+
+## Usage
+
+### Basic Website Generation
+
+```bash
+python pipeline_all.py \
+ --input-dir "path/to/papers" \
+ --output-dir "path/to/output" \
+ --model-choice 1
+```
+
+### Parameters
+
+- `--input-dir`: Directory containing paper files (PDF or LaTeX)
+- `--output-dir`: Directory for generated website files
+- `--model-choice`: LLM model selection (1=GPT-4, 2=GPT-4.1)
+- `--enable-logo-search`: Use Google Search API to find institution logos (optional)
+
+### Input Format Requirements
+
+**Supported Input Formats:**
+1. **LaTeX source** (preferred for best results)
+ - Main file: `main.tex`
+ - Include all referenced figures, tables, and bibliography files
+ - Organize in a single directory per paper
+
+2. **PDF files**
+ - High-quality PDF with selectable text
+ - Embedded figures should be high resolution
+ - Proper section headers and structure
+
+**Directory Structure:**
+```
+input/
+└── paper_name/
+ ├── main.tex # LaTeX source
+ ├── bibliography.bib # References
+ ├── figures/ # Figure files
+ │ ├── fig1.png
+ │ └── fig2.pdf
+ └── tables/ # Table files
+```
+
+## Output Structure
+
+Generated websites include:
+
+```
+output/paper_name/website/
+├── index.html # Main webpage
+├── styles.css # Styling
+├── script.js # Interactive features
+├── assets/ # Images and media
+│ ├── figures/
+│ └── logos/
+└── data/ # Structured data (optional)
+```
+
+## Customization Options
+
+### Visual Design
+The generated websites automatically include:
+- Professional color schemes based on paper content
+- Typography optimized for readability
+- Consistent spacing and visual hierarchy
+- Dark mode support (optional)
+
+### Content Sections
+Standard sections include:
+- Abstract
+- Key findings/contributions
+- Methodology overview
+- Results and visualizations
+- Discussion and implications
+- References and citations
+- Author information and affiliations
+
+Additional sections are automatically added based on paper content:
+- Code repositories
+- Dataset links
+- Supplementary materials
+- Related publications
+
+## Quality Assessment
+
+Paper2Web includes built-in evaluation:
+
+### Aesthetic Metrics
+- Layout balance and spacing
+- Color harmony
+- Typography consistency
+- Visual hierarchy effectiveness
+
+### Informativeness Metrics
+- Content completeness
+- Key finding clarity
+- Method explanation adequacy
+- Results presentation quality
+
+### Technical Metrics
+- Page load time
+- Mobile responsiveness
+- Browser compatibility
+- Accessibility compliance
+
+## Advanced Features
+
+### Logo Discovery
+When enabled with Google Search API:
+- Automatically finds institution logos
+- Matches author affiliations
+- Downloads and optimizes logo images
+- Integrates into website header
+
+### Citation Integration
+- Interactive reference list
+- Hover previews for citations
+- Links to DOI and external sources
+- Citation count tracking (if available)
+
+### Figure Enhancement
+- High-resolution figure rendering
+- Zoom and pan functionality
+- Caption and description integration
+- Multi-panel figure navigation
+
+## Best Practices
+
+### Input Preparation
+1. **Use LaTeX when possible**: Provides best structure extraction
+2. **Include all assets**: Figures, tables, and bibliography files
+3. **Clean formatting**: Remove compilation artifacts and temporary files
+4. **High-quality figures**: Use vector formats (PDF, SVG) when available
+
+### Model Selection
+- **GPT-4**: Best balance of quality and cost
+- **GPT-4.1**: Latest features, higher cost
+- **GPT-3.5-turbo**: Faster processing, acceptable for simple papers
+
+### Output Optimization
+1. Review generated content for accuracy
+2. Check that all figures render correctly
+3. Test interactive elements functionality
+4. Verify mobile responsiveness
+5. Validate external links
+
+## Limitations
+
+- Complex mathematical equations may require manual review
+- Multi-column layouts in PDF may affect extraction quality
+- Large papers (>50 pages) may require extended processing time
+- Some specialized figure types may need manual adjustment
+
+## Integration with Other Components
+
+Paper2Web can be combined with:
+- **Paper2Video**: Generate companion video for the website
+- **Paper2Poster**: Create matching poster design
+- **AutoPR**: Generate promotional content linking to website
diff --git a/scientific-skills/paper-2-web/references/usage_examples.md b/scientific-skills/paper-2-web/references/usage_examples.md
new file mode 100644
index 0000000..dcafcb3
--- /dev/null
+++ b/scientific-skills/paper-2-web/references/usage_examples.md
@@ -0,0 +1,436 @@
+# Usage Examples and Workflows
+
+## Complete Workflow Examples
+
+### Example 1: Conference Presentation Package
+
+**Scenario**: Preparing for a major conference presentation with website, poster, and video.
+
+**User Request**: "I need to create a complete presentation package for my NeurIPS paper submission. Generate a website, poster, and video presentation."
+
+**Workflow**:
+
+```bash
+# Step 1: Organize paper files
+mkdir -p input/neurips2025_paper
+cp main.tex input/neurips2025_paper/
+cp -r figures/ input/neurips2025_paper/
+cp -r tables/ input/neurips2025_paper/
+cp bibliography.bib input/neurips2025_paper/
+
+# Step 2: Generate all components
+python pipeline_all.py \
+ --input-dir input/neurips2025_paper \
+ --output-dir output/ \
+ --model-choice 1 \
+ --generate-website \
+ --generate-poster \
+ --generate-video \
+ --poster-width-inches 48 \
+ --poster-height-inches 36 \
+ --enable-logo-search
+
+# Step 3: Review outputs
+ls -R output/neurips2025_paper/
+# - website/index.html
+# - poster/poster_final.pdf
+# - video/final_video.mp4
+```
+
+**Output**:
+- Interactive website showcasing research
+- 4'×3' conference poster (print-ready)
+- 12-minute presentation video
+- Processing time: ~45 minutes (without talking-head)
+
+---
+
+### Example 2: Quick Website for Preprint
+
+**Scenario**: Creating an explorable homepage for a bioRxiv preprint.
+
+**User Request**: "Convert my genomics preprint to an interactive website to accompany the bioRxiv submission."
+
+**Workflow**:
+
+```bash
+# Using PDF input (LaTeX not available)
+python pipeline_all.py \
+ --input-dir papers/genomics_preprint/ \
+ --output-dir output/genomics_web/ \
+ --model-choice 1 \
+ --generate-website
+
+# Deploy to GitHub Pages or personal server
+cd output/genomics_web/website/
+# Add link to bioRxiv paper, data repositories, code
+# Upload to hosting service
+```
+
+**Tips**:
+- Include links to bioRxiv DOI
+- Add GitHub repository links
+- Include data availability section
+- Embed interactive visualizations if possible
+
+---
+
+### Example 3: Video Abstract for Journal Submission
+
+**Scenario**: Creating a video abstract for a journal that encourages multimedia submissions.
+
+**User Request**: "Generate a 5-minute video abstract for my Nature Communications submission."
+
+**Workflow**:
+
+```bash
+# Generate concise video focusing on key findings
+python pipeline_light.py \
+ --model_name_t gpt-4.1 \
+ --model_name_v gpt-4.1 \
+ --result_dir output/video_abstract/ \
+ --paper_latex_root papers/nature_comms/ \
+ --video-duration 300 \
+ --slides-per-minute 3
+
+# Optional: Add custom intro/outro slides
+# Optional: Include talking-head for introduction
+```
+
+**Output**:
+- 5-minute video abstract
+- Focus on visual results
+- Clear, accessible narration
+- Journal-ready format
+
+---
+
+### Example 4: Multi-Paper Website Generation
+
+**Scenario**: Creating websites for multiple papers from a research group.
+
+**User Request**: "Generate websites for all 5 papers our lab published this year."
+
+**Workflow**:
+
+```bash
+# Organize papers
+mkdir -p batch_input/
+# Create subdirectories: paper1/, paper2/, paper3/, paper4/, paper5/
+# Each with their LaTeX sources
+
+# Batch process
+python pipeline_all.py \
+ --input-dir batch_input/ \
+ --output-dir batch_output/ \
+ --model-choice 1 \
+ --generate-website \
+ --enable-logo-search
+
+# Creates:
+# batch_output/paper1/website/
+# batch_output/paper2/website/
+# batch_output/paper3/website/
+# batch_output/paper4/website/
+# batch_output/paper5/website/
+```
+
+**Best Practice**:
+- Use consistent naming conventions
+- Process overnight for large batches
+- Review each website for accuracy
+- Deploy to unified lab website
+
+---
+
+### Example 5: Poster for Virtual Conference
+
+**Scenario**: Creating a digital poster for a virtual conference with interactive elements.
+
+**User Request**: "Create a poster for the virtual ISMB conference with clickable links to code and data."
+
+**Workflow**:
+
+```bash
+# Generate poster with QR codes and links
+python pipeline_all.py \
+ --input-dir papers/ismb_submission/ \
+ --output-dir output/ismb_poster/ \
+ --model-choice 1 \
+ --generate-poster \
+ --poster-width-inches 48 \
+ --poster-height-inches 36 \
+ --enable-qr-codes
+
+# Manually add QR codes to:
+# - GitHub repository
+# - Interactive results dashboard
+# - Supplementary data
+# - Video presentation
+```
+
+**Digital Enhancements**:
+- PDF with embedded hyperlinks
+- High-resolution PNG for virtual platform
+- Separate PDF with video links for download
+
+---
+
+### Example 6: Promotional Video Clip
+
+**Scenario**: Creating a short promotional video for social media.
+
+**User Request**: "Generate a 2-minute highlight video of our Cell paper for Twitter."
+
+**Workflow**:
+
+```bash
+# Generate short, engaging video
+python pipeline_light.py \
+ --model_name_t gpt-4.1 \
+ --model_name_v gpt-4.1 \
+ --result_dir output/promo_video/ \
+ --paper_latex_root papers/cell_paper/ \
+ --video-duration 120 \
+ --presentation-style public
+
+# Post-process:
+# - Extract key 30-second clip for Twitter
+# - Add captions for sound-off viewing
+# - Optimize file size for social media
+```
+
+**Social Media Optimization**:
+- Square format (1:1) for Instagram
+- Horizontal format (16:9) for Twitter/LinkedIn
+- Vertical format (9:16) for TikTok/Stories
+- Add text overlays for key findings
+
+---
+
+## Common Use Case Patterns
+
+### Pattern 1: LaTeX Paper → Full Package
+
+**Input**: LaTeX source with all assets
+**Output**: Website + Poster + Video
+**Time**: 45-90 minutes
+**Best for**: Major publications, conference presentations
+
+```bash
+python pipeline_all.py \
+ --input-dir [latex_dir] \
+ --output-dir [output_dir] \
+ --model-choice 1 \
+ --generate-website \
+ --generate-poster \
+ --generate-video
+```
+
+---
+
+### Pattern 2: PDF → Interactive Website
+
+**Input**: Published PDF paper
+**Output**: Explorable website
+**Time**: 15-30 minutes
+**Best for**: Post-publication promotion, preprint enhancement
+
+```bash
+python pipeline_all.py \
+ --input-dir [pdf_dir] \
+ --output-dir [output_dir] \
+ --model-choice 1 \
+ --generate-website
+```
+
+---
+
+### Pattern 3: LaTeX → Conference Poster
+
+**Input**: LaTeX paper
+**Output**: Print-ready poster (custom size)
+**Time**: 10-20 minutes
+**Best for**: Conference poster sessions
+
+```bash
+python pipeline_all.py \
+ --input-dir [latex_dir] \
+ --output-dir [output_dir] \
+ --model-choice 1 \
+ --generate-poster \
+ --poster-width-inches [width] \
+ --poster-height-inches [height]
+```
+
+---
+
+### Pattern 4: LaTeX → Presentation Video
+
+**Input**: LaTeX paper
+**Output**: Narrated presentation video
+**Time**: 20-60 minutes (without talking-head)
+**Best for**: Video abstracts, online presentations, course materials
+
+```bash
+python pipeline_light.py \
+ --model_name_t gpt-4.1 \
+ --model_name_v gpt-4.1 \
+ --result_dir [output_dir] \
+ --paper_latex_root [latex_dir]
+```
+
+---
+
+## Platform-Specific Outputs
+
+### Twitter/X Promotional Content
+
+The system auto-detects Twitter targeting for numeric folder names:
+
+```bash
+# Create Twitter-optimized content
+mkdir -p input/001_twitter_post/
+# System generates English promotional content
+```
+
+**Generated Output**:
+- Short, engaging summary
+- Key figure highlights
+- Hashtag recommendations
+- Thread-ready format
+
+---
+
+### Xiaohongshu (小红书) Content
+
+For Chinese social media, use alphanumeric folder names:
+
+```bash
+# Create Xiaohongshu-optimized content
+mkdir -p input/xhs_genomics/
+# System generates Chinese promotional content
+```
+
+**Generated Output**:
+- Chinese language content
+- Platform-appropriate formatting
+- Visual-first presentation
+- Engagement optimizations
+
+---
+
+## Troubleshooting Common Scenarios
+
+### Scenario: Large Paper (>50 pages)
+
+**Challenge**: Processing time and content selection
+**Solution**:
+```bash
+# Option 1: Focus on key sections
+# Edit LaTeX to comment out less critical sections
+
+# Option 2: Process in parts
+# Generate website for overview
+# Generate separate detailed videos for methods/results
+
+# Option 3: Use faster model for initial pass
+# Review and regenerate critical components with better model
+```
+
+---
+
+### Scenario: Complex Mathematical Content
+
+**Challenge**: Equations may not render perfectly
+**Solution**:
+- Use LaTeX input (not PDF) for best equation handling
+- Review generated content for equation accuracy
+- Manually adjust complex equations if needed
+- Consider using figure screenshots for critical equations
+
+---
+
+### Scenario: Non-Standard Paper Structure
+
+**Challenge**: Paper doesn't follow standard IMRAD format
+**Solution**:
+- Provide custom section guidance in paper metadata
+- Review generated structure and adjust
+- Use more powerful model (GPT-4.1) for better adaptation
+- Consider manual section annotation in LaTeX comments
+
+---
+
+### Scenario: Limited API Budget
+
+**Challenge**: Reducing costs while maintaining quality
+**Solution**:
+```bash
+# Use GPT-3.5-turbo for simple papers
+python pipeline_all.py \
+ --input-dir [paper_dir] \
+ --output-dir [output_dir] \
+ --model-choice 3
+
+# Generate only needed components
+# Website-only (cheapest)
+# Poster-only (moderate)
+# Video without talking-head (moderate)
+```
+
+---
+
+### Scenario: Tight Deadline
+
+**Challenge**: Need outputs quickly
+**Solution**:
+```bash
+# Parallel processing if multiple papers
+# Use faster models (GPT-3.5-turbo)
+# Generate only essential component first
+# Skip optional features (logo search, talking-head)
+
+python pipeline_light.py \
+ --model_name_t gpt-3.5-turbo \
+ --model_name_v gpt-3.5-turbo \
+ --result_dir [output_dir] \
+ --paper_latex_root [latex_dir]
+```
+
+**Priority Order**:
+1. Website (fastest, most versatile)
+2. Poster (moderate speed, print deadline)
+3. Video (slowest, can be generated later)
+
+---
+
+## Quality Optimization Tips
+
+### For Best Website Results
+1. Use LaTeX input with all assets
+2. Include high-resolution figures
+3. Ensure paper has clear section structure
+4. Enable logo search for professional appearance
+5. Review and test all interactive elements
+
+### For Best Poster Results
+1. Provide high-resolution figures (300+ DPI)
+2. Specify exact poster dimensions needed
+3. Include institution branding information
+4. Use professional color scheme
+5. Test print small preview before full poster
+
+### For Best Video Results
+1. Use LaTeX for clearest content extraction
+2. Specify target duration appropriately
+3. Review script before video generation
+4. Choose appropriate presentation style
+5. Test audio quality and pacing
+
+### For Best Overall Results
+1. Start with clean, well-organized LaTeX source
+2. Use GPT-4 or GPT-4.1 for highest quality
+3. Review all outputs before finalizing
+4. Iterate on any component that needs adjustment
+5. Combine components for cohesive presentation package
diff --git a/scientific-skills/peer-review/SKILL.md b/scientific-skills/peer-review/SKILL.md
new file mode 100644
index 0000000..5a6a691
--- /dev/null
+++ b/scientific-skills/peer-review/SKILL.md
@@ -0,0 +1,565 @@
+---
+name: peer-review
+description: "Systematic peer review toolkit. Evaluate methodology, statistics, design, reproducibility, ethics, figure integrity, reporting standards, for manuscript and grant review across disciplines."
+allowed-tools: [Read, Write, Edit, Bash]
+---
+
+# Scientific Critical Evaluation and Peer Review
+
+## Overview
+
+Peer review is a systematic process for evaluating scientific manuscripts. Assess methodology, statistics, design, reproducibility, ethics, and reporting standards. Apply this skill for manuscript and grant review across disciplines with constructive, rigorous evaluation.
+
+## When to Use This Skill
+
+This skill should be used when:
+- Conducting peer review of scientific manuscripts for journals
+- Evaluating grant proposals and research applications
+- Assessing methodology and experimental design rigor
+- Reviewing statistical analyses and reporting standards
+- Evaluating reproducibility and data availability
+- Checking compliance with reporting guidelines (CONSORT, STROBE, PRISMA)
+- Providing constructive feedback on scientific writing
+
+## Visual Enhancement with Scientific Schematics
+
+**When creating documents with this skill, always consider adding scientific diagrams and schematics to enhance visual communication.**
+
+If your document does not already contain schematics or diagrams:
+- Use the **scientific-schematics** skill to generate AI-powered publication-quality diagrams
+- Simply describe your desired diagram in natural language
+- Nano Banana Pro will automatically generate, review, and refine the schematic
+
+**For new documents:** Scientific schematics should be generated by default to visually represent key concepts, workflows, architectures, or relationships described in the text.
+
+**How to generate schematics:**
+```bash
+python scripts/generate_schematic.py "your diagram description" -o figures/output.png
+```
+
+The AI will automatically:
+- Create publication-quality images with proper formatting
+- Review and refine through multiple iterations
+- Ensure accessibility (colorblind-friendly, high contrast)
+- Save outputs in the figures/ directory
+
+**When to add schematics:**
+- Peer review workflow diagrams
+- Evaluation criteria decision trees
+- Review process flowcharts
+- Methodology assessment frameworks
+- Quality assessment visualizations
+- Reporting guidelines compliance diagrams
+- Any complex concept that benefits from visualization
+
+For detailed guidance on creating schematics, refer to the scientific-schematics skill documentation.
+
+---
+
+## Peer Review Workflow
+
+Conduct peer review systematically through the following stages, adapting depth and focus based on the manuscript type and discipline.
+
+### Stage 1: Initial Assessment
+
+Begin with a high-level evaluation to determine the manuscript's scope, novelty, and overall quality.
+
+**Key Questions:**
+- What is the central research question or hypothesis?
+- What are the main findings and conclusions?
+- Is the work scientifically sound and significant?
+- Is the work appropriate for the intended venue?
+- Are there any immediate major flaws that would preclude publication?
+
+**Output:** Brief summary (2-3 sentences) capturing the manuscript's essence and initial impression.
+
+### Stage 2: Detailed Section-by-Section Review
+
+Conduct a thorough evaluation of each manuscript section, documenting specific concerns and strengths.
+
+#### Abstract and Title
+- **Accuracy:** Does the abstract accurately reflect the study's content and conclusions?
+- **Clarity:** Is the title specific, accurate, and informative?
+- **Completeness:** Are key findings and methods summarized appropriately?
+- **Accessibility:** Is the abstract comprehensible to a broad scientific audience?
+
+#### Introduction
+- **Context:** Is the background information adequate and current?
+- **Rationale:** Is the research question clearly motivated and justified?
+- **Novelty:** Is the work's originality and significance clearly articulated?
+- **Literature:** Are relevant prior studies appropriately cited?
+- **Objectives:** Are research aims/hypotheses clearly stated?
+
+#### Methods
+- **Reproducibility:** Can another researcher replicate the study from the description provided?
+- **Rigor:** Are the methods appropriate for addressing the research questions?
+- **Detail:** Are protocols, reagents, equipment, and parameters sufficiently described?
+- **Ethics:** Are ethical approvals, consent, and data handling properly documented?
+- **Statistics:** Are statistical methods appropriate, clearly described, and justified?
+- **Validation:** Are controls, replicates, and validation approaches adequate?
+
+**Critical elements to verify:**
+- Sample sizes and power calculations
+- Randomization and blinding procedures
+- Inclusion/exclusion criteria
+- Data collection protocols
+- Computational methods and software versions
+- Statistical tests and correction for multiple comparisons
+
+#### Results
+- **Presentation:** Are results presented logically and clearly?
+- **Figures/Tables:** Are visualizations appropriate, clear, and properly labeled?
+- **Statistics:** Are statistical results properly reported (effect sizes, confidence intervals, p-values)?
+- **Objectivity:** Are results presented without over-interpretation?
+- **Completeness:** Are all relevant results included, including negative results?
+- **Reproducibility:** Are raw data or summary statistics provided?
+
+**Common issues to identify:**
+- Selective reporting of results
+- Inappropriate statistical tests
+- Missing error bars or measures of variability
+- Over-fitting or circular analysis
+- Batch effects or confounding variables
+- Missing controls or validation experiments
+
+#### Discussion
+- **Interpretation:** Are conclusions supported by the data?
+- **Limitations:** Are study limitations acknowledged and discussed?
+- **Context:** Are findings placed appropriately within existing literature?
+- **Speculation:** Is speculation clearly distinguished from data-supported conclusions?
+- **Significance:** Are implications and importance clearly articulated?
+- **Future directions:** Are next steps or unanswered questions discussed?
+
+**Red flags:**
+- Overstated conclusions
+- Ignoring contradictory evidence
+- Causal claims from correlational data
+- Inadequate discussion of limitations
+- Mechanistic claims without mechanistic evidence
+
+#### References
+- **Completeness:** Are key relevant papers cited?
+- **Currency:** Are recent important studies included?
+- **Balance:** Are contrary viewpoints appropriately cited?
+- **Accuracy:** Are citations accurate and appropriate?
+- **Self-citation:** Is there excessive or inappropriate self-citation?
+
+### Stage 3: Methodological and Statistical Rigor
+
+Evaluate the technical quality and rigor of the research with particular attention to common pitfalls.
+
+**Statistical Assessment:**
+- Are statistical assumptions met (normality, independence, homoscedasticity)?
+- Are effect sizes reported alongside p-values?
+- Is multiple testing correction applied appropriately?
+- Are confidence intervals provided?
+- Is sample size justified with power analysis?
+- Are parametric vs. non-parametric tests chosen appropriately?
+- Are missing data handled properly?
+- Are exploratory vs. confirmatory analyses distinguished?
+
+**Experimental Design:**
+- Are controls appropriate and adequate?
+- Is replication sufficient (biological and technical)?
+- Are potential confounders identified and controlled?
+- Is randomization properly implemented?
+- Are blinding procedures adequate?
+- Is the experimental design optimal for the research question?
+
+**Computational/Bioinformatics:**
+- Are computational methods clearly described and justified?
+- Are software versions and parameters documented?
+- Is code made available for reproducibility?
+- Are algorithms and models validated appropriately?
+- Are assumptions of computational methods met?
+- Is batch correction applied appropriately?
+
+### Stage 4: Reproducibility and Transparency
+
+Assess whether the research meets modern standards for reproducibility and open science.
+
+**Data Availability:**
+- Are raw data deposited in appropriate repositories?
+- Are accession numbers provided for public databases?
+- Are data sharing restrictions justified (e.g., patient privacy)?
+- Are data formats standard and accessible?
+
+**Code and Materials:**
+- Is analysis code made available (GitHub, Zenodo, etc.)?
+- Are unique materials available or described sufficiently for recreation?
+- Are protocols detailed in sufficient depth?
+
+**Reporting Standards:**
+- Does the manuscript follow discipline-specific reporting guidelines (CONSORT, PRISMA, ARRIVE, MIAME, MINSEQE, etc.)?
+- See `references/reporting_standards.md` for common guidelines
+- Are all elements of the appropriate checklist addressed?
+
+### Stage 5: Figure and Data Presentation
+
+Evaluate the quality, clarity, and integrity of data visualization.
+
+**Quality Checks:**
+- Are figures high resolution and clearly labeled?
+- Are axes properly labeled with units?
+- Are error bars defined (SD, SEM, CI)?
+- Are statistical significance indicators explained?
+- Are color schemes appropriate and accessible (colorblind-friendly)?
+- Are scale bars included for images?
+- Is data visualization appropriate for the data type?
+
+**Integrity Checks:**
+- Are there signs of image manipulation (duplications, splicing)?
+- Are Western blots and gels appropriately presented?
+- Are representative images truly representative?
+- Are all conditions shown (no selective presentation)?
+
+**Clarity:**
+- Can figures stand alone with their legends?
+- Is the message of each figure immediately clear?
+- Are there redundant figures or panels?
+- Would data be better presented as tables or figures?
+
+### Stage 6: Ethical Considerations
+
+Verify that the research meets ethical standards and guidelines.
+
+**Human Subjects:**
+- Is IRB/ethics approval documented?
+- Is informed consent described?
+- Are vulnerable populations appropriately protected?
+- Is patient privacy adequately protected?
+- Are potential conflicts of interest disclosed?
+
+**Animal Research:**
+- Is IACUC or equivalent approval documented?
+- Are procedures humane and justified?
+- Are the 3Rs (replacement, reduction, refinement) considered?
+- Are euthanasia methods appropriate?
+
+**Research Integrity:**
+- Are there concerns about data fabrication or falsification?
+- Is authorship appropriate and justified?
+- Are competing interests disclosed?
+- Is funding source disclosed?
+- Are there concerns about plagiarism or duplicate publication?
+
+### Stage 7: Writing Quality and Clarity
+
+Assess the manuscript's clarity, organization, and accessibility.
+
+**Structure and Organization:**
+- Is the manuscript logically organized?
+- Do sections flow coherently?
+- Are transitions between ideas clear?
+- Is the narrative compelling and clear?
+
+**Writing Quality:**
+- Is the language clear, precise, and concise?
+- Are jargon and acronyms minimized and defined?
+- Is grammar and spelling correct?
+- Are sentences unnecessarily complex?
+- Is the passive voice overused?
+
+**Accessibility:**
+- Can a non-specialist understand the main findings?
+- Are technical terms explained?
+- Is the significance clear to a broad audience?
+
+## Structuring Peer Review Reports
+
+Organize feedback in a hierarchical structure that prioritizes issues and provides actionable guidance.
+
+### Summary Statement
+
+Provide a concise overall assessment (1-2 paragraphs):
+- Brief synopsis of the research
+- Overall recommendation (accept, minor revisions, major revisions, reject)
+- Key strengths (2-3 bullet points)
+- Key weaknesses (2-3 bullet points)
+- Bottom-line assessment of significance and soundness
+
+### Major Comments
+
+List critical issues that significantly impact the manuscript's validity, interpretability, or significance. Number these sequentially for easy reference.
+
+**Major comments typically include:**
+- Fundamental methodological flaws
+- Inappropriate statistical analyses
+- Unsupported or overstated conclusions
+- Missing critical controls or experiments
+- Serious reproducibility concerns
+- Major gaps in literature coverage
+- Ethical concerns
+
+**For each major comment:**
+1. Clearly state the issue
+2. Explain why it's problematic
+3. Suggest specific solutions or additional experiments
+4. Indicate if addressing it is essential for publication
+
+### Minor Comments
+
+List less critical issues that would improve clarity, completeness, or presentation. Number these sequentially.
+
+**Minor comments typically include:**
+- Unclear figure labels or legends
+- Missing methodological details
+- Typographical or grammatical errors
+- Suggestions for improved data presentation
+- Minor statistical reporting issues
+- Supplementary analyses that would strengthen conclusions
+- Requests for clarification
+
+**For each minor comment:**
+1. Identify the specific location (section, paragraph, figure)
+2. State the issue clearly
+3. Suggest how to address it
+
+### Specific Line-by-Line Comments (Optional)
+
+For manuscripts requiring detailed feedback, provide section-specific or line-by-line comments:
+- Reference specific page/line numbers or sections
+- Note factual errors, unclear statements, or missing citations
+- Suggest specific edits for clarity
+
+### Questions for Authors
+
+List specific questions that need clarification:
+- Methodological details that are unclear
+- Seemingly contradictory results
+- Missing information needed to evaluate the work
+- Requests for additional data or analyses
+
+## Tone and Approach
+
+Maintain a constructive, professional, and collegial tone throughout the review.
+
+**Best Practices:**
+- **Be constructive:** Frame criticism as opportunities for improvement
+- **Be specific:** Provide concrete examples and actionable suggestions
+- **Be balanced:** Acknowledge strengths as well as weaknesses
+- **Be respectful:** Remember that authors have invested significant effort
+- **Be objective:** Focus on the science, not the scientists
+- **Be thorough:** Don't overlook issues, but prioritize appropriately
+- **Be clear:** Avoid ambiguous or vague criticism
+
+**Avoid:**
+- Personal attacks or dismissive language
+- Sarcasm or condescension
+- Vague criticism without specific examples
+- Requesting unnecessary experiments beyond the scope
+- Demanding adherence to personal preferences vs. best practices
+- Revealing your identity if reviewing is double-blind
+
+## Special Considerations by Manuscript Type
+
+### Original Research Articles
+- Emphasize rigor, reproducibility, and novelty
+- Assess significance and impact
+- Verify that conclusions are data-driven
+- Check for complete methods and appropriate controls
+
+### Reviews and Meta-Analyses
+- Evaluate comprehensiveness of literature coverage
+- Assess search strategy and inclusion/exclusion criteria
+- Verify systematic approach and lack of bias
+- Check for critical analysis vs. mere summarization
+- For meta-analyses, evaluate statistical approach and heterogeneity
+
+### Methods Papers
+- Emphasize validation and comparison to existing methods
+- Assess reproducibility and availability of protocols/code
+- Evaluate improvements over existing approaches
+- Check for sufficient detail for implementation
+
+### Short Reports/Letters
+- Adapt expectations for brevity
+- Ensure core findings are still rigorous and significant
+- Verify that format is appropriate for findings
+
+### Preprints
+- Recognize that these have not undergone formal peer review
+- May be less polished than journal submissions
+- Still apply rigorous standards for scientific validity
+- Consider providing constructive feedback to help authors improve before journal submission
+
+### Presentations and Slide Decks
+
+**⚠️ CRITICAL: For presentations, NEVER read the PDF directly. ALWAYS convert to images first.**
+
+When reviewing scientific presentations (PowerPoint, Beamer, slide decks):
+
+#### Mandatory Image-Based Review Workflow
+
+**NEVER attempt to read presentation PDFs directly** - this causes buffer overflow errors and doesn't show visual formatting issues.
+
+**Required Process:**
+1. Convert PDF to images using Python:
+ ```bash
+ python skills/scientific-slides/scripts/pdf_to_images.py presentation.pdf review/slide --dpi 150
+ # Creates: review/slide-001.jpg, review/slide-002.jpg, etc.
+ ```
+2. Read and inspect EACH slide image file sequentially
+3. Document issues with specific slide numbers
+4. Provide feedback on visual formatting and content
+
+**Print when starting review:**
+```
+[HH:MM:SS] PEER REVIEW: Presentation detected - converting to images for review
+[HH:MM:SS] PDF REVIEW: NEVER reading PDF directly - using image-based inspection
+```
+
+#### Presentation-Specific Evaluation Criteria
+
+**Visual Design and Readability:**
+- [ ] Text is large enough (minimum 18pt, ideally 24pt+ for body text)
+- [ ] High contrast between text and background (4.5:1 minimum, 7:1 preferred)
+- [ ] Color scheme is professional and colorblind-accessible
+- [ ] Consistent visual design across all slides
+- [ ] White space is adequate (not cramped)
+- [ ] Fonts are clear and professional
+
+**Layout and Formatting (Check EVERY Slide Image):**
+- [ ] No text overflow or truncation at slide edges
+- [ ] No element overlaps (text over images, overlapping shapes)
+- [ ] Titles are consistently positioned
+- [ ] Content is properly aligned
+- [ ] Bullets and text are not cut off
+- [ ] Figures fit within slide boundaries
+- [ ] Captions and labels are visible and readable
+
+**Content Quality:**
+- [ ] One main idea per slide (not overloaded)
+- [ ] Minimal text (3-6 bullets per slide maximum)
+- [ ] Bullet points are concise (5-7 words each)
+- [ ] Figures are simplified and clear (not copy-pasted from papers)
+- [ ] Data visualizations have large, readable labels
+- [ ] Citations are present and properly formatted
+- [ ] Results/data slides dominate the presentation (40-50% of content)
+
+**Structure and Flow:**
+- [ ] Clear narrative arc (introduction → methods → results → discussion)
+- [ ] Logical progression between slides
+- [ ] Slide count appropriate for talk duration (~1 slide per minute)
+- [ ] Title slide includes authors, affiliation, date
+- [ ] Introduction cites relevant background literature (3-5 papers)
+- [ ] Discussion cites comparison papers (3-5 papers)
+- [ ] Conclusions slide summarizes key findings
+- [ ] Acknowledgments/funding slide at end
+
+**Scientific Content:**
+- [ ] Research question clearly stated
+- [ ] Methods adequately summarized (not excessive detail)
+- [ ] Results presented logically with clear visualizations
+- [ ] Statistical significance indicated appropriately
+- [ ] Conclusions supported by data shown
+- [ ] Limitations acknowledged where appropriate
+- [ ] Future directions or broader impact discussed
+
+**Common Presentation Issues to Flag:**
+
+**Critical Issues (Must Fix):**
+- Text overflow making content unreadable
+- Font sizes too small (<18pt)
+- Element overlaps obscuring data
+- Insufficient contrast (text hard to read)
+- Figures too complex or illegible
+- No citations (completely unsupported claims)
+- Slide count drastically mismatched to duration
+
+**Major Issues (Should Fix):**
+- Inconsistent design across slides
+- Too much text (walls of text, not bullets)
+- Poorly simplified figures (axis labels too small)
+- Cramped layout with insufficient white space
+- Missing key structural elements (no conclusion slide)
+- Poor color choices (not colorblind-safe)
+- Minimal results content (<30% of slides)
+
+**Minor Issues (Suggestions for Improvement):**
+- Could use more visuals/diagrams
+- Some slides slightly text-heavy
+- Minor alignment inconsistencies
+- Could benefit from more white space
+- Additional citations would strengthen claims
+- Color scheme could be more modern
+
+#### Review Report Format for Presentations
+
+**Summary Statement:**
+- Overall impression of presentation quality
+- Appropriateness for target audience and duration
+- Key strengths (visual design, content, clarity)
+- Key weaknesses (formatting issues, content gaps)
+- Recommendation (ready to present, minor revisions, major revisions)
+
+**Layout and Formatting Issues (By Slide Number):**
+```
+Slide 3: Text overflow - bullet point 4 extends beyond right margin
+Slide 7: Element overlap - figure overlaps with caption text
+Slide 12: Font size - axis labels too small to read from distance
+Slide 18: Alignment - title not centered
+```
+
+**Content and Structure Feedback:**
+- Adequacy of background context and citations
+- Clarity of research question and objectives
+- Quality of methods summary
+- Effectiveness of results presentation
+- Strength of conclusions and implications
+
+**Design and Accessibility:**
+- Overall visual appeal and professionalism
+- Color contrast and readability
+- Colorblind accessibility
+- Consistency across slides
+
+**Timing and Scope:**
+- Whether slide count matches intended duration
+- Appropriate level of detail for talk type
+- Balance between sections
+
+#### Example Image-Based Review Process
+
+```
+[14:30:00] PEER REVIEW: Starting review of presentation
+[14:30:05] PEER REVIEW: Presentation detected - converting to images
+[14:30:10] PDF REVIEW: Running pdf_to_images.py on presentation.pdf
+[14:30:15] PDF REVIEW: Converted 25 slides to images in review/ directory
+[14:30:20] PDF REVIEW: Inspecting slide 1/25 - title slide
+[14:30:25] PDF REVIEW: Inspecting slide 2/25 - introduction
+...
+[14:35:40] PDF REVIEW: Inspecting slide 25/25 - acknowledgments
+[14:35:45] PDF REVIEW: Completed image-based review
+[14:35:50] PEER REVIEW: Found 8 layout issues, 3 content issues
+[14:35:55] PEER REVIEW: Generating structured feedback by slide number
+```
+
+**Remember:** For presentations, the visual inspection via images is MANDATORY. Never attempt to read presentation PDFs as text - it will fail and miss all visual formatting issues.
+
+## Resources
+
+This skill includes reference materials to support comprehensive peer review:
+
+### references/reporting_standards.md
+Guidelines for major reporting standards across disciplines (CONSORT, PRISMA, ARRIVE, MIAME, STROBE, etc.) to evaluate completeness of methods and results reporting.
+
+### references/common_issues.md
+Catalog of frequent methodological and statistical issues encountered in peer review, with guidance on identifying and addressing them.
+
+## Final Checklist
+
+Before finalizing the review, verify:
+
+- [ ] Summary statement clearly conveys overall assessment
+- [ ] Major concerns are clearly identified and justified
+- [ ] Suggested revisions are specific and actionable
+- [ ] Minor issues are noted but properly categorized
+- [ ] Statistical methods have been evaluated
+- [ ] Reproducibility and data availability assessed
+- [ ] Ethical considerations verified
+- [ ] Figures and tables evaluated for quality and integrity
+- [ ] Writing quality assessed
+- [ ] Tone is constructive and professional throughout
+- [ ] Review is thorough but proportionate to manuscript scope
+- [ ] Recommendation is consistent with identified issues
diff --git a/scientific-skills/peer-review/references/common_issues.md b/scientific-skills/peer-review/references/common_issues.md
new file mode 100644
index 0000000..ec648c2
--- /dev/null
+++ b/scientific-skills/peer-review/references/common_issues.md
@@ -0,0 +1,552 @@
+# Common Methodological and Statistical Issues in Scientific Manuscripts
+
+This document catalogs frequent issues encountered during peer review, organized by category. Use this as a reference to identify potential problems and provide constructive feedback.
+
+## Statistical Issues
+
+### 1. P-Value Misuse and Misinterpretation
+
+**Common Problems:**
+- P-hacking (selective reporting of significant results)
+- Multiple testing without correction (familywise error rate inflation)
+- Interpreting non-significance as proof of no effect
+- Focusing exclusively on p-values without effect sizes
+- Dichotomizing continuous p-values at arbitrary thresholds (p=0.049 vs p=0.051)
+- Confusing statistical significance with biological/clinical significance
+
+**How to Identify:**
+- Suspiciously high proportion of p-values just below 0.05
+- Many tests performed but no correction mentioned
+- Statements like "no difference was found" from non-significant results
+- No effect sizes or confidence intervals reported
+- Language suggesting p-values indicate strength of effect
+
+**What to Recommend:**
+- Report effect sizes with confidence intervals
+- Apply appropriate multiple testing corrections (Bonferroni, FDR, Holm-Bonferroni)
+- Interpret non-significance cautiously (lack of evidence ≠ evidence of lack)
+- Pre-register analyses to avoid p-hacking
+- Consider equivalence testing for "no difference" claims
+
+### 2. Inappropriate Statistical Tests
+
+**Common Problems:**
+- Using parametric tests when assumptions are violated (non-normal data, unequal variances)
+- Analyzing paired data with unpaired tests
+- Using t-tests for multiple groups instead of ANOVA with post-hoc tests
+- Treating ordinal data as continuous
+- Ignoring repeated measures structure
+- Using correlation when regression is more appropriate
+
+**How to Identify:**
+- No mention of assumption checking
+- Small sample sizes with parametric tests
+- Multiple pairwise t-tests instead of ANOVA
+- Likert scales analyzed with t-tests
+- Time-series data analyzed without accounting for repeated measures
+
+**What to Recommend:**
+- Check assumptions explicitly (normality tests, Q-Q plots)
+- Use non-parametric alternatives when appropriate
+- Apply proper corrections for multiple comparisons after ANOVA
+- Use mixed-effects models for repeated measures
+- Consider ordinal regression for ordinal outcomes
+
+### 3. Sample Size and Power Issues
+
+**Common Problems:**
+- No sample size justification or power calculation
+- Underpowered studies claiming "no effect"
+- Post-hoc power calculations (which are uninformative)
+- Stopping rules not pre-specified
+- Unequal group sizes without justification
+
+**How to Identify:**
+- Small sample sizes (n<30 per group for typical designs)
+- No mention of power analysis in methods
+- Statements about post-hoc power
+- Wide confidence intervals suggesting imprecision
+- Claims of "no effect" with large p-values and small n
+
+**What to Recommend:**
+- Conduct a priori power analysis based on expected effect size
+- Report achieved power or precision (confidence interval width)
+- Acknowledge when studies are underpowered
+- Consider effect sizes and confidence intervals for interpretation
+- Pre-register sample size and stopping rules
+
+### 4. Missing Data Problems
+
+**Common Problems:**
+- Complete case analysis without justification (listwise deletion)
+- Not reporting extent or pattern of missingness
+- Assuming data are missing completely at random (MCAR) without testing
+- Inappropriate imputation methods
+- Not performing sensitivity analyses
+
+**How to Identify:**
+- Different n values across analyses without explanation
+- No discussion of missing data
+- Participants "excluded from analysis"
+- Simple mean imputation used
+- No sensitivity analyses comparing complete vs. imputed data
+
+**What to Recommend:**
+- Report extent and patterns of missingness
+- Test MCAR assumption (Little's test)
+- Use appropriate methods (multiple imputation, maximum likelihood)
+- Perform sensitivity analyses
+- Consider intention-to-treat analysis for trials
+
+### 5. Circular Analysis and Double-Dipping
+
+**Common Problems:**
+- Using the same data for selection and inference
+- Defining ROIs based on contrast then testing that contrast in same ROI
+- Selecting outliers then testing for differences
+- Post-hoc subgroup analyses presented as planned
+- HARKing (Hypothesizing After Results are Known)
+
+**How to Identify:**
+- ROIs or features selected based on results
+- Unexpected subgroup analyses
+- Post-hoc analyses not clearly labeled as exploratory
+- No data-independent validation
+- Introduction that perfectly predicts findings
+
+**What to Recommend:**
+- Use independent datasets for selection and testing
+- Pre-register analyses and hypotheses
+- Clearly distinguish confirmatory vs. exploratory analyses
+- Use cross-validation or hold-out datasets
+- Correct for selection bias
+
+### 6. Pseudoreplication
+
+**Common Problems:**
+- Technical replicates treated as biological replicates
+- Multiple measurements from same subject treated as independent
+- Clustered data analyzed without accounting for clustering
+- Non-independence in spatial or temporal data
+
+**How to Identify:**
+- n defined as number of measurements rather than biological units
+- Multiple cells from same animal counted as independent
+- Repeated measures not acknowledged
+- No mention of random effects or clustering
+
+**What to Recommend:**
+- Define n as biological replicates (animals, patients, independent samples)
+- Use mixed-effects models for nested or clustered data
+- Account for repeated measures explicitly
+- Average technical replicates before analysis
+- Report both technical and biological replication
+
+## Experimental Design Issues
+
+### 7. Lack of Appropriate Controls
+
+**Common Problems:**
+- Missing negative controls
+- Missing positive controls for validation
+- No vehicle controls for drug studies
+- No time-matched controls for longitudinal studies
+- No batch controls
+
+**How to Identify:**
+- Methods section lists only experimental groups
+- No mention of controls in figures
+- Unclear baseline or reference condition
+- Cross-batch comparisons without controls
+
+**What to Recommend:**
+- Include negative controls to assess specificity
+- Include positive controls to validate methods
+- Use vehicle controls matched to experimental treatment
+- Include sham surgery controls for surgical interventions
+- Include batch controls for cross-batch comparisons
+
+### 8. Confounding Variables
+
+**Common Problems:**
+- Systematic differences between groups besides intervention
+- Batch effects not controlled or corrected
+- Order effects in sequential experiments
+- Time-of-day effects not controlled
+- Experimenter effects not blinded
+
+**How to Identify:**
+- Groups differ in multiple characteristics
+- Samples processed in different batches by group
+- No randomization of sample order
+- No mention of blinding
+- Baseline characteristics differ between groups
+
+**What to Recommend:**
+- Randomize experimental units to conditions
+- Block on known confounders
+- Randomize sample processing order
+- Use blinding to minimize bias
+- Perform batch correction if needed
+- Report and adjust for baseline differences
+
+### 9. Insufficient Replication
+
+**Common Problems:**
+- Single experiment without replication
+- Technical replicates mistaken for biological replication
+- Small n justified by "typical for the field"
+- No independent validation of key findings
+- Cherry-picking representative examples
+
+**How to Identify:**
+- Methods state "experiment performed once"
+- n=3 with no justification
+- "Representative image shown"
+- Key claims based on single experiment
+- No validation in independent dataset
+
+**What to Recommend:**
+- Perform independent biological replicates (typically ≥3)
+- Validate key findings in independent cohorts
+- Report all replicates, not just representative examples
+- Conduct power analysis to justify sample size
+- Show individual data points, not just summary statistics
+
+## Reproducibility Issues
+
+### 10. Insufficient Methodological Detail
+
+**Common Problems:**
+- Methods not described in sufficient detail for replication
+- Key reagents not specified (vendor, catalog number)
+- Software versions and parameters not reported
+- Antibodies not validated
+- Cell line authentication not verified
+
+**How to Identify:**
+- Vague descriptions ("standard protocols were used")
+- No information on reagent sources
+- Generic software mentioned without versions
+- No antibody validation information
+- Cell lines not authenticated
+
+**What to Recommend:**
+- Provide detailed protocols or cite specific protocols
+- Include reagent vendors, catalog numbers, lot numbers
+- Report software versions and all parameters
+- Include antibody validation (Western blot, specificity tests)
+- Report cell line authentication method (STR profiling)
+- Make protocols available (protocols.io, supplementary materials)
+
+### 11. Data and Code Availability
+
+**Common Problems:**
+- No data availability statement
+- "Data available upon request" (often unfulfilled)
+- No code provided for computational analyses
+- Custom software not made available
+- No clear documentation
+
+**How to Identify:**
+- Missing data availability statement
+- No repository accession numbers
+- Computational methods with no code
+- Custom pipelines without access
+- No README or documentation
+
+**What to Recommend:**
+- Deposit raw data in appropriate repositories (GEO, SRA, Dryad, Zenodo)
+- Share analysis code on GitHub or similar
+- Provide clear documentation and README files
+- Include requirements.txt or environment files
+- Make custom software available with installation instructions
+- Use DOIs for permanent data citation
+
+### 12. Lack of Method Validation
+
+**Common Problems:**
+- New methods not compared to gold standard
+- Assays not validated for specificity, sensitivity, linearity
+- No spike-in controls
+- Cross-reactivity not tested
+- Detection limits not established
+
+**How to Identify:**
+- Novel assays presented without validation
+- No comparison to existing methods
+- No positive/negative controls shown
+- Claims of specificity without evidence
+- No standard curves or controls
+
+**What to Recommend:**
+- Validate new methods against established approaches
+- Show specificity (knockdown/knockout controls)
+- Demonstrate linearity and dynamic range
+- Include positive and negative controls
+- Report limits of detection and quantification
+- Show reproducibility across replicates and operators
+
+## Interpretation Issues
+
+### 13. Overstatement of Results
+
+**Common Problems:**
+- Causal language for correlational data
+- Mechanistic claims without mechanistic evidence
+- Extrapolating beyond data (species, conditions, populations)
+- Claiming "first to show" without thorough literature review
+- Overgeneralizing from limited samples
+
+**How to Identify:**
+- "X causes Y" from observational data
+- Mechanism proposed without direct testing
+- Mouse data presented as relevant to humans without caveats
+- Claims of novelty with missing citations
+- Broad claims from narrow samples
+
+**What to Recommend:**
+- Use appropriate language ("associated with" vs. "caused by")
+- Distinguish correlation from causation
+- Acknowledge limitations of model systems
+- Provide thorough literature context
+- Be specific about generalizability
+- Propose mechanisms as hypotheses, not conclusions
+
+### 14. Cherry-Picking and Selective Reporting
+
+**Common Problems:**
+- Reporting only significant results
+- Showing "representative" images that may not be typical
+- Excluding outliers without justification
+- Not reporting negative or contradictory findings
+- Switching between different statistical approaches
+
+**How to Identify:**
+- All reported results are significant
+- "Representative of 3 experiments" with no quantification
+- Data exclusions mentioned in results but not methods
+- Supplementary data contradicts main findings
+- Multiple analysis approaches with only one reported
+
+**What to Recommend:**
+- Report all planned analyses regardless of outcome
+- Quantify and show variability across replicates
+- Pre-specify outlier exclusion criteria
+- Include negative results
+- Pre-register analysis plan
+- Report effect sizes and confidence intervals for all comparisons
+
+### 15. Ignoring Alternative Explanations
+
+**Common Problems:**
+- Preferred explanation presented without considering alternatives
+- Contradictory evidence dismissed without discussion
+- Off-target effects not considered
+- Confounding variables not acknowledged
+- Limitations section minimal or absent
+
+**How to Identify:**
+- Single interpretation presented as fact
+- Prior contradictory findings not cited or discussed
+- No consideration of alternative mechanisms
+- No discussion of limitations
+- Specificity assumed without controls
+
+**What to Recommend:**
+- Discuss alternative explanations
+- Address contradictory findings from literature
+- Include appropriate specificity controls
+- Acknowledge and discuss limitations thoroughly
+- Consider and test alternative hypotheses
+
+## Figure and Data Presentation Issues
+
+### 16. Inappropriate Data Visualization
+
+**Common Problems:**
+- Bar graphs for continuous data (hiding distributions)
+- No error bars or error bars not defined
+- Truncated y-axes exaggerating differences
+- Dual y-axes creating misleading comparisons
+- Too many significant figures
+- Colors not colorblind-friendly
+
+**How to Identify:**
+- Bar graphs with few data points
+- Unclear what error bars represent (SD, SEM, CI?)
+- Y-axis doesn't start at zero for ratio/percentage data
+- Left and right y-axes with different scales
+- Values reported to excessive precision (p=0.04562)
+- Red-green color schemes
+
+**What to Recommend:**
+- Show individual data points with scatter/box/violin plots
+- Always define error bars (SD, SEM, 95% CI)
+- Start y-axis at zero or indicate breaks clearly
+- Avoid dual y-axes; use separate panels instead
+- Report appropriate significant figures
+- Use colorblind-friendly palettes (viridis, colorbrewer)
+- Include sample sizes in figure legends
+
+### 17. Image Manipulation Concerns
+
+**Common Problems:**
+- Excessive contrast/brightness adjustment
+- Spliced gels or images without indication
+- Duplicated images or panels
+- Uneven background in Western blots
+- Selective cropping
+- Over-processed microscopy images
+
+**How to Identify:**
+- Suspicious patterns or discontinuities
+- Very high contrast with no background
+- Similar features in different panels
+- Straight lines suggesting splicing
+- Inconsistent backgrounds
+- Loss of detail suggesting over-processing
+
+**What to Recommend:**
+- Apply adjustments uniformly across images
+- Indicate spliced gels with dividing lines
+- Show full, uncropped images in supplementary materials
+- Provide original images if requested
+- Follow journal image integrity policies
+- Use appropriate image analysis tools
+
+## Study Design Issues
+
+### 18. Poorly Defined Hypotheses and Outcomes
+
+**Common Problems:**
+- No clear hypothesis stated
+- Primary outcome not specified
+- Multiple outcomes without correction
+- Outcomes changed after data collection
+- Fishing expeditions presented as hypothesis-driven
+
+**How to Identify:**
+- Introduction doesn't state clear testable hypothesis
+- Multiple outcomes with unclear hierarchy
+- Outcomes in results don't match those in methods
+- Exploratory study presented as confirmatory
+- Many tests with no multiple testing correction
+
+**What to Recommend:**
+- State clear, testable hypotheses
+- Designate primary and secondary outcomes a priori
+- Pre-register studies when possible
+- Apply appropriate corrections for multiple outcomes
+- Clearly distinguish exploratory from confirmatory analyses
+- Report all pre-specified outcomes
+
+### 19. Baseline Imbalance and Selection Bias
+
+**Common Problems:**
+- Groups differ at baseline
+- Selection criteria applied differentially
+- Healthy volunteer bias
+- Survivorship bias
+- Indication bias in observational studies
+
+**How to Identify:**
+- Table 1 shows significant baseline differences
+- Inclusion criteria different between groups
+- Response rate <50% with no analysis
+- Analysis only includes completers
+- Groups self-selected rather than randomized
+
+**What to Recommend:**
+- Report baseline characteristics in Table 1
+- Use randomization to ensure balance
+- Adjust for baseline differences in analysis
+- Report response rates and compare responders vs. non-responders
+- Consider propensity score matching for observational data
+- Use intention-to-treat analysis
+
+### 20. Temporal and Batch Effects
+
+**Common Problems:**
+- Samples processed in batches by condition
+- Temporal trends not accounted for
+- Instrument drift over time
+- Different operators for different groups
+- Reagent lot changes between groups
+
+**How to Identify:**
+- All treatment samples processed on same day
+- Controls from different time period
+- No mention of batch or time effects
+- Different technicians for groups
+- Long study duration with no temporal analysis
+
+**What to Recommend:**
+- Randomize samples across batches/time
+- Include batch as covariate in analysis
+- Perform batch correction (ComBat, limma)
+- Include quality control samples across batches
+- Report and test for temporal trends
+- Balance operators across conditions
+
+## Reporting Issues
+
+### 21. Incomplete Statistical Reporting
+
+**Common Problems:**
+- Test statistics not reported
+- Degrees of freedom missing
+- Exact p-values replaced with inequalities (p<0.05)
+- No confidence intervals
+- No effect sizes
+- Sample sizes not reported per group
+
+**How to Identify:**
+- Only p-values given with no test statistics
+- p-values reported as p<0.05 rather than exact values
+- No measures of uncertainty
+- Effect magnitude unclear
+- n reported for total but not per group
+
+**What to Recommend:**
+- Report complete test statistics (t, F, χ², etc. with df)
+- Report exact p-values (except p<0.001)
+- Include 95% confidence intervals
+- Report effect sizes (Cohen's d, odds ratios, correlation coefficients)
+- Report n for each group in every analysis
+- Consider CONSORT-style flow diagram
+
+### 22. Methods-Results Mismatch
+
+**Common Problems:**
+- Methods describe analyses not performed
+- Results include analyses not described in methods
+- Different sample sizes in methods vs. results
+- Methods mention controls not shown
+- Statistical methods don't match what was done
+
+**How to Identify:**
+- Analyses in results without methodological description
+- Methods describe experiments not in results
+- Numbers don't match between sections
+- Controls mentioned but not shown
+- Different software mentioned than used
+
+**What to Recommend:**
+- Ensure complete concordance between methods and results
+- Describe all analyses performed in methods
+- Remove methodological descriptions of experiments not performed
+- Verify all numbers are consistent
+- Update methods to match actual analyses conducted
+
+## How to Use This Reference
+
+When reviewing manuscripts:
+1. Read through methods and results systematically
+2. Check for common issues in each category
+3. Note specific problems with evidence
+4. Provide constructive suggestions for improvement
+5. Distinguish major issues (affect validity) from minor issues (affect clarity)
+6. Prioritize reproducibility and transparency
+
+This is not an exhaustive list but covers the most frequently encountered issues. Always consider the specific context and discipline when evaluating potential problems.
diff --git a/scientific-skills/peer-review/references/reporting_standards.md b/scientific-skills/peer-review/references/reporting_standards.md
new file mode 100644
index 0000000..0d995b9
--- /dev/null
+++ b/scientific-skills/peer-review/references/reporting_standards.md
@@ -0,0 +1,290 @@
+# Scientific Reporting Standards and Guidelines
+
+This document catalogs major reporting standards and guidelines across scientific disciplines. When reviewing manuscripts, verify that authors have followed the appropriate guidelines for their study type and discipline.
+
+## Clinical Trials and Medical Research
+
+### CONSORT (Consolidated Standards of Reporting Trials)
+**Purpose:** Randomized controlled trials (RCTs)
+**Key Requirements:**
+- Trial design, participants, and interventions clearly described
+- Primary and secondary outcomes specified
+- Sample size calculation and statistical methods
+- Participant flow through trial (enrollment, allocation, follow-up, analysis)
+- Baseline characteristics of participants
+- Numbers analyzed in each group
+- Outcomes and estimation with confidence intervals
+- Adverse events
+- Trial registration number and protocol access
+
+**Reference:** http://www.consort-statement.org/
+
+### STROBE (Strengthening the Reporting of Observational Studies in Epidemiology)
+**Purpose:** Observational studies (cohort, case-control, cross-sectional)
+**Key Requirements:**
+- Study design clearly stated
+- Setting, eligibility criteria, and participant sources
+- Variables clearly defined
+- Data sources and measurement methods
+- Bias assessment
+- Sample size justification
+- Statistical methods including handling of missing data
+- Participant flow and characteristics
+- Main results with confidence intervals
+- Limitations discussed
+
+**Reference:** https://www.strobe-statement.org/
+
+### PRISMA (Preferred Reporting Items for Systematic Reviews and Meta-Analyses)
+**Purpose:** Systematic reviews and meta-analyses
+**Key Requirements:**
+- Protocol registration
+- Systematic search strategy across multiple databases
+- Inclusion/exclusion criteria
+- Study selection process
+- Data extraction methods
+- Quality assessment of included studies
+- Statistical methods for meta-analysis
+- Assessment of publication bias
+- Heterogeneity assessment
+- PRISMA flow diagram showing study selection
+- Summary of findings tables
+
+**Reference:** http://www.prisma-statement.org/
+
+### SPIRIT (Standard Protocol Items: Recommendations for Interventional Trials)
+**Purpose:** Clinical trial protocols
+**Key Requirements:**
+- Administrative information (title, registration, funding)
+- Introduction (rationale, objectives)
+- Methods (design, participants, interventions, outcomes, sample size)
+- Ethics and dissemination
+- Trial schedule and assessments
+
+**Reference:** https://www.spirit-statement.org/
+
+### CARE (CAse REport guidelines)
+**Purpose:** Case reports
+**Key Requirements:**
+- Patient information and demographics
+- Clinical findings
+- Timeline of events
+- Diagnostic assessment
+- Therapeutic interventions
+- Follow-up and outcomes
+- Patient perspective
+- Informed consent
+
+**Reference:** https://www.care-statement.org/
+
+## Animal Research
+
+### ARRIVE (Animal Research: Reporting of In Vivo Experiments)
+**Purpose:** Studies involving animal research
+**Key Requirements:**
+- Title indicates study involves animals
+- Abstract provides accurate summary
+- Background and objectives clearly stated
+- Ethical statement and approval
+- Housing and husbandry details
+- Animal details (species, strain, sex, age, weight)
+- Experimental procedures in detail
+- Experimental animals (number, allocation, welfare assessment)
+- Statistical methods appropriate
+- Exclusion criteria stated
+- Sample size determination
+- Randomization and blinding described
+- Outcome measures defined
+- Adverse events reported
+
+**Reference:** https://arriveguidelines.org/
+
+## Genomics and Molecular Biology
+
+### MIAME (Minimum Information About a Microarray Experiment)
+**Purpose:** Microarray experiments
+**Key Requirements:**
+- Experimental design clearly described
+- Array design information
+- Samples (origin, preparation, labeling)
+- Hybridization procedures and parameters
+- Image acquisition and quantification
+- Normalization and data transformation
+- Raw and processed data availability
+- Database accession numbers
+
+**Reference:** http://fged.org/projects/miame/
+
+### MINSEQE (Minimum Information about a high-throughput Nucleotide Sequencing Experiment)
+**Purpose:** High-throughput sequencing (RNA-seq, ChIP-seq, etc.)
+**Key Requirements:**
+- Experimental design and biological context
+- Sample information (source, preparation, QC)
+- Library preparation (protocol, adapters, size selection)
+- Sequencing platform and parameters
+- Data processing pipeline (alignment, quantification, normalization)
+- Quality control metrics
+- Raw data deposition (SRA, GEO, ENA)
+- Processed data and analysis code availability
+
+### MIGS/MIMS (Minimum Information about a Genome/Metagenome Sequence)
+**Purpose:** Genome and metagenome sequencing
+**Key Requirements:**
+- Sample origin and environmental context
+- Sequencing methods and coverage
+- Assembly methods and quality metrics
+- Annotation approach
+- Quality control and contamination screening
+- Data deposition in INSDC databases
+
+**Reference:** https://gensc.org/
+
+## Structural Biology
+
+### PDB (Protein Data Bank) Deposition Requirements
+**Purpose:** Macromolecular structure determination
+**Key Requirements:**
+- Atomic coordinates deposited
+- Structure factors for X-ray structures
+- Restraints and experimental data for NMR
+- EM maps and metadata for cryo-EM
+- Model quality validation metrics
+- Experimental conditions (crystallization, sample preparation)
+- Data collection parameters
+- Refinement statistics
+
+**Reference:** https://www.wwpdb.org/
+
+## Proteomics and Mass Spectrometry
+
+### MIAPE (Minimum Information About a Proteomics Experiment)
+**Purpose:** Proteomics experiments
+**Key Requirements:**
+- Sample processing and fractionation
+- Separation methods (2D gel, LC)
+- Mass spectrometry parameters (instrument, acquisition)
+- Database search and validation parameters
+- Peptide and protein identification criteria
+- Quantification methods
+- Statistical analysis
+- Data deposition (PRIDE, PeptideAtlas)
+
+**Reference:** http://www.psidev.info/
+
+## Neuroscience
+
+### COBIDAS (Committee on Best Practices in Data Analysis and Sharing)
+**Purpose:** MRI and fMRI studies
+**Key Requirements:**
+- Scanner and sequence parameters
+- Preprocessing pipeline details
+- Software versions and parameters
+- Statistical analysis approach
+- Multiple comparison correction
+- ROI definitions
+- Data sharing (raw data, analysis scripts)
+
+**Reference:** https://www.humanbrainmapping.org/cobidas
+
+## Flow Cytometry
+
+### MIFlowCyt (Minimum Information about a Flow Cytometry Experiment)
+**Purpose:** Flow cytometry experiments
+**Key Requirements:**
+- Experimental overview and purpose
+- Sample characteristics and preparation
+- Instrument information and settings
+- Reagents (antibodies, fluorophores, concentrations)
+- Compensation and controls
+- Gating strategy
+- Data analysis approach
+- Data availability
+
+**Reference:** http://flowcyt.org/
+
+## Ecology and Environmental Science
+
+### MIAPPE (Minimum Information About a Plant Phenotyping Experiment)
+**Purpose:** Plant phenotyping studies
+**Key Requirements:**
+- Investigation and study metadata
+- Biological material information
+- Environmental parameters
+- Experimental design and factors
+- Phenotypic measurements and methods
+- Data file descriptions
+
+**Reference:** https://www.miappe.org/
+
+## Chemistry and Chemical Biology
+
+### MIRIBEL (Minimum Information Reporting in Bio-Nano Experimental Literature)
+**Purpose:** Nanomaterial characterization
+**Key Requirements:**
+- Nanomaterial composition and structure
+- Size, shape, and morphology characterization
+- Surface chemistry and functionalization
+- Purity and stability
+- Experimental conditions
+- Characterization methods
+
+## Quality Assessment and Bias
+
+### CAMARADES (Collaborative Approach to Meta-Analysis and Review of Animal Data from Experimental Studies)
+**Purpose:** Quality assessment for animal studies in systematic reviews
+**Key Items:**
+- Publication in peer-reviewed journal
+- Statement of temperature control
+- Randomization to treatment
+- Blinded assessment of outcome
+- Avoidance of anesthetic with marked intrinsic properties
+- Use of appropriate animal model
+- Sample size calculation
+- Compliance with regulatory requirements
+- Statement of conflict of interest
+- Study pre-registration
+
+### SYRCLE's Risk of Bias Tool
+**Purpose:** Assessing risk of bias in animal intervention studies
+**Domains:**
+- Selection bias (sequence generation, baseline characteristics, allocation concealment)
+- Performance bias (random housing, blinding of personnel)
+- Detection bias (random outcome assessment, blinding of assessors)
+- Attrition bias (incomplete outcome data)
+- Reporting bias (selective outcome reporting)
+- Other sources of bias
+
+## General Principles Across Guidelines
+
+### Common Requirements
+1. **Transparency:** All methods, materials, and analyses fully described
+2. **Reproducibility:** Sufficient detail for independent replication
+3. **Data Availability:** Raw data and analysis code shared or deposited
+4. **Registration:** Studies pre-registered where applicable
+5. **Ethics:** Appropriate approvals and consent documented
+6. **Conflicts of Interest:** Disclosed for all authors
+7. **Statistical Rigor:** Methods appropriate and fully described
+8. **Completeness:** All outcomes reported, including negative results
+
+### Red Flags for Non-Compliance
+- Methods section lacks critical details
+- No mention of following reporting guidelines
+- Data availability statement missing or vague
+- No database accession numbers for omics data
+- No trial registration for clinical studies
+- Sample size not justified
+- Statistical methods inadequately described
+- Missing flow diagrams (CONSORT, PRISMA)
+- Selective reporting of outcomes
+
+## How to Use This Reference
+
+When reviewing a manuscript:
+1. Identify the study type and discipline
+2. Find the relevant reporting guideline(s)
+3. Check if authors mention following the guideline
+4. Verify that key requirements are addressed
+5. Note any missing elements in your review
+6. Suggest the appropriate guideline if not mentioned
+
+Many journals require authors to complete reporting checklists at submission. Reviewers should verify compliance even if a checklist was submitted.
diff --git a/scientific-skills/pptx-posters/SKILL.md b/scientific-skills/pptx-posters/SKILL.md
new file mode 100644
index 0000000..3ba3ef9
--- /dev/null
+++ b/scientific-skills/pptx-posters/SKILL.md
@@ -0,0 +1,958 @@
+---
+name: latex-posters
+description: "Create professional research posters in LaTeX using beamerposter, tikzposter, or baposter. Support for conference presentations, academic posters, and scientific communication. Includes layout design, color schemes, multi-column formats, figure integration, and poster-specific best practices for visual communication."
+allowed-tools: [Read, Write, Edit, Bash]
+---
+
+# LaTeX Research Posters
+
+## Overview
+
+Research posters are a critical medium for scientific communication at conferences, symposia, and academic events. This skill provides comprehensive guidance for creating professional, visually appealing research posters using LaTeX packages. Generate publication-quality posters with proper layout, typography, color schemes, and visual hierarchy.
+
+## When to Use This Skill
+
+This skill should be used when:
+- Creating research posters for conferences, symposia, or poster sessions
+- Designing academic posters for university events or thesis defenses
+- Preparing visual summaries of research for public engagement
+- Converting scientific papers into poster format
+- Creating template posters for research groups or departments
+- Designing posters that comply with specific conference size requirements (A0, A1, 36×48", etc.)
+- Building posters with complex multi-column layouts
+- Integrating figures, tables, equations, and citations in poster format
+
+## Visual Enhancement with Scientific Schematics
+
+**⚠️ MANDATORY: Every research poster MUST include at least 2-3 AI-generated figures using the scientific-schematics skill.**
+
+This is not optional. Posters are primarily visual media - text-heavy posters fail to communicate effectively. Before finalizing any poster:
+1. Generate at minimum TWO schematics or diagrams
+2. Target 3-4 figures for comprehensive posters (methodology flowchart, key results visualization, conceptual framework)
+3. Figures should occupy 40-50% of poster area
+
+**How to generate figures:**
+- Use the **scientific-schematics** skill to generate AI-powered publication-quality diagrams
+- Simply describe your desired diagram in natural language
+- Nano Banana Pro will automatically generate, review, and refine the schematic
+
+**How to generate schematics:**
+```bash
+python scripts/generate_schematic.py "your diagram description" -o figures/output.png
+```
+
+The AI will automatically:
+- Create publication-quality images with proper formatting
+- Review and refine through multiple iterations
+- Ensure accessibility (colorblind-friendly, high contrast)
+- Save outputs in the figures/ directory
+
+**When to add schematics:**
+- Research methodology flowcharts for poster content
+- Conceptual framework diagrams
+- Experimental design visualizations
+- Data analysis pipeline diagrams
+- System architecture diagrams
+- Biological pathway illustrations
+- Any complex concept that benefits from visualization
+
+For detailed guidance on creating schematics, refer to the scientific-schematics skill documentation.
+
+---
+
+## Core Capabilities
+
+### 1. LaTeX Poster Packages
+
+Support for three major LaTeX poster packages, each with distinct advantages. For detailed comparison and package-specific guidance, refer to `references/latex_poster_packages.md`.
+
+**beamerposter**:
+- Extension of the Beamer presentation class
+- Familiar syntax for Beamer users
+- Excellent theme support and customization
+- Best for: Traditional academic posters, institutional branding
+
+**tikzposter**:
+- Modern, flexible design with TikZ integration
+- Built-in color themes and layout templates
+- Extensive customization through TikZ commands
+- Best for: Colorful, modern designs, custom graphics
+
+**baposter**:
+- Box-based layout system
+- Automatic spacing and positioning
+- Professional-looking default styles
+- Best for: Multi-column layouts, consistent spacing
+
+### 2. Poster Layout and Structure
+
+Create effective poster layouts following visual communication principles. For comprehensive layout guidance, refer to `references/poster_layout_design.md`.
+
+**Common Poster Sections**:
+- **Header/Title**: Title, authors, affiliations, logos
+- **Introduction/Background**: Research context and motivation
+- **Methods/Approach**: Methodology and experimental design
+- **Results**: Key findings with figures and data visualizations
+- **Conclusions**: Main takeaways and implications
+- **References**: Key citations (typically abbreviated)
+- **Acknowledgments**: Funding, collaborators, institutions
+
+**Layout Strategies**:
+- **Column-based layouts**: 2-column, 3-column, or 4-column grids
+- **Block-based layouts**: Flexible arrangement of content blocks
+- **Z-pattern flow**: Guide readers through content logically
+- **Visual hierarchy**: Use size, color, and spacing to emphasize key points
+
+### 3. Design Principles for Research Posters
+
+Apply evidence-based design principles for maximum impact. For detailed design guidance, refer to `references/poster_design_principles.md`.
+
+**Typography**:
+- Title: 72-120pt for visibility from distance
+- Section headers: 48-72pt
+- Body text: 24-36pt minimum for readability from 4-6 feet
+- Use sans-serif fonts (Arial, Helvetica, Calibri) for clarity
+- Limit to 2-3 font families maximum
+
+**Color and Contrast**:
+- Use high-contrast color schemes for readability
+- Institutional color palettes for branding
+- Color-blind friendly palettes (avoid red-green combinations)
+- White space is active space—don't overcrowd
+
+**Visual Elements**:
+- High-resolution figures (300 DPI minimum for print)
+- Large, clear labels on all figures
+- Consistent figure styling throughout
+- Strategic use of icons and graphics
+- Balance text with visual content (40-50% visual recommended)
+
+**Content Guidelines**:
+- **Less is more**: 300-800 words total recommended
+- Bullet points over paragraphs for scannability
+- Clear, concise messaging
+- Self-explanatory figures with minimal text explanation
+- QR codes for supplementary materials or online resources
+
+### 4. Standard Poster Sizes
+
+Support for international and conference-specific poster dimensions:
+
+**International Standards**:
+- A0 (841 × 1189 mm / 33.1 × 46.8 inches) - Most common European standard
+- A1 (594 × 841 mm / 23.4 × 33.1 inches) - Smaller format
+- A2 (420 × 594 mm / 16.5 × 23.4 inches) - Compact posters
+
+**North American Standards**:
+- 36 × 48 inches (914 × 1219 mm) - Common US conference size
+- 42 × 56 inches (1067 × 1422 mm) - Large format
+- 48 × 72 inches (1219 × 1829 mm) - Extra large
+
+**Orientation**:
+- Portrait (vertical) - Most common, traditional
+- Landscape (horizontal) - Better for wide content, timelines
+
+### 5. Package-Specific Templates
+
+Provide ready-to-use templates for each major package. Templates available in `assets/` directory.
+
+**beamerposter Templates**:
+- `beamerposter_classic.tex` - Traditional academic style
+- `beamerposter_modern.tex` - Clean, minimal design
+- `beamerposter_colorful.tex` - Vibrant theme with blocks
+
+**tikzposter Templates**:
+- `tikzposter_default.tex` - Standard tikzposter layout
+- `tikzposter_rays.tex` - Modern design with ray theme
+- `tikzposter_wave.tex` - Professional wave-style theme
+
+**baposter Templates**:
+- `baposter_portrait.tex` - Classic portrait layout
+- `baposter_landscape.tex` - Landscape multi-column
+- `baposter_minimal.tex` - Minimalist design
+
+### 6. Figure and Image Integration
+
+Optimize visual content for poster presentations:
+
+**Best Practices**:
+- Use vector graphics (PDF, SVG) when possible for scalability
+- Raster images: minimum 300 DPI at final print size
+- Consistent image styling (borders, captions, sizes)
+- Group related figures together
+- Use subfigures for comparisons
+
+**LaTeX Figure Commands**:
+```latex
+% Include graphics package
+\usepackage{graphicx}
+
+% Simple figure
+\includegraphics[width=0.8\linewidth]{figure.pdf}
+
+% Figure with caption in tikzposter
+\block{Results}{
+ \begin{tikzfigure}
+ \includegraphics[width=0.9\linewidth]{results.png}
+ \end{tikzfigure}
+}
+
+% Multiple subfigures
+\usepackage{subcaption}
+\begin{figure}
+ \begin{subfigure}{0.48\linewidth}
+ \includegraphics[width=\linewidth]{fig1.pdf}
+ \caption{Condition A}
+ \end{subfigure}
+ \begin{subfigure}{0.48\linewidth}
+ \includegraphics[width=\linewidth]{fig2.pdf}
+ \caption{Condition B}
+ \end{subfigure}
+\end{figure}
+```
+
+### 7. Color Schemes and Themes
+
+Provide professional color palettes for various contexts:
+
+**Academic Institution Colors**:
+- Match university or department branding
+- Use official color codes (RGB, CMYK, or LaTeX color definitions)
+
+**Scientific Color Palettes** (color-blind friendly):
+- Viridis: Professional gradient from purple to yellow
+- ColorBrewer: Research-tested palettes for data visualization
+- IBM Color Blind Safe: Accessible corporate palette
+
+**Package-Specific Theme Selection**:
+
+**beamerposter**:
+```latex
+\usetheme{Berlin}
+\usecolortheme{beaver}
+```
+
+**tikzposter**:
+```latex
+\usetheme{Rays}
+\usecolorstyle{Denmark}
+```
+
+**baposter**:
+```latex
+\begin{poster}{
+ background=plain,
+ bgColorOne=white,
+ headerColorOne=blue!70,
+ textborder=rounded
+}
+```
+
+### 8. Typography and Text Formatting
+
+Ensure readability and visual appeal:
+
+**Font Selection**:
+```latex
+% Sans-serif fonts recommended for posters
+\usepackage{helvet} % Helvetica
+\usepackage{avant} % Avant Garde
+\usepackage{sfmath} % Sans-serif math fonts
+
+% Set default to sans-serif
+\renewcommand{\familydefault}{\sfdefault}
+```
+
+**Text Sizing**:
+```latex
+% Adjust text sizes for visibility
+\setbeamerfont{title}{size=\VeryHuge}
+\setbeamerfont{author}{size=\Large}
+\setbeamerfont{institute}{size=\normalsize}
+```
+
+**Emphasis and Highlighting**:
+- Use bold for key terms: `\textbf{important}`
+- Color highlights sparingly: `\textcolor{blue}{highlight}`
+- Boxes for critical information
+- Avoid italics (harder to read from distance)
+
+### 9. QR Codes and Interactive Elements
+
+Enhance poster interactivity for modern conferences:
+
+**QR Code Integration**:
+```latex
+\usepackage{qrcode}
+
+% Link to paper, code repository, or supplementary materials
+\qrcode[height=2cm]{https://github.com/username/project}
+
+% QR code with caption
+\begin{center}
+ \qrcode[height=3cm]{https://doi.org/10.1234/paper}\\
+ \small Scan for full paper
+\end{center}
+```
+
+**Digital Enhancements**:
+- Link to GitHub repositories for code
+- Link to video presentations or demos
+- Link to interactive web visualizations
+- Link to supplementary data or appendices
+
+### 10. Compilation and Output
+
+Generate high-quality PDF output for printing or digital display:
+
+**Compilation Commands**:
+```bash
+# Basic compilation
+pdflatex poster.tex
+
+# With bibliography
+pdflatex poster.tex
+bibtex poster
+pdflatex poster.tex
+pdflatex poster.tex
+
+# For beamer-based posters
+lualatex poster.tex # Better font support
+xelatex poster.tex # Unicode and modern fonts
+```
+
+**Ensuring Full Page Coverage**:
+
+Posters should use the entire page without excessive margins. Configure packages correctly:
+
+**beamerposter - Full Page Setup**:
+```latex
+\documentclass[final,t]{beamer}
+\usepackage[size=a0,scale=1.4,orientation=portrait]{beamerposter}
+
+% Remove default beamer margins
+\setbeamersize{text margin left=0mm, text margin right=0mm}
+
+% Use geometry for precise control
+\usepackage[margin=10mm]{geometry} % 10mm margins all around
+
+% Remove navigation symbols
+\setbeamertemplate{navigation symbols}{}
+
+% Remove footline and headline if not needed
+\setbeamertemplate{footline}{}
+\setbeamertemplate{headline}{}
+```
+
+**tikzposter - Full Page Setup**:
+```latex
+\documentclass[
+ 25pt, % Font scaling
+ a0paper, % Paper size
+ portrait, % Orientation
+ margin=10mm, % Outer margins (minimal)
+ innermargin=15mm, % Space inside blocks
+ blockverticalspace=15mm, % Space between blocks
+ colspace=15mm, % Space between columns
+ subcolspace=8mm % Space between subcolumns
+]{tikzposter}
+
+% This ensures content fills the page
+```
+
+**baposter - Full Page Setup**:
+```latex
+\documentclass[a0paper,portrait,fontscale=0.285]{baposter}
+
+\begin{poster}{
+ grid=false,
+ columns=3,
+ colspacing=1.5em, % Space between columns
+ eyecatcher=true,
+ background=plain,
+ bgColorOne=white,
+ borderColor=blue!50,
+ headerheight=0.12\textheight, % 12% for header
+ textborder=roundedleft,
+ headerborder=closed,
+ boxheaderheight=2em % Consistent box header heights
+}
+% Content here
+\end{poster}
+```
+
+**Common Issues and Fixes**:
+
+**Problem**: Large white margins around poster
+```latex
+% Fix for beamerposter
+\setbeamersize{text margin left=5mm, text margin right=5mm}
+
+% Fix for tikzposter
+\documentclass[..., margin=5mm, innermargin=10mm]{tikzposter}
+
+% Fix for baposter - adjust in document class
+\documentclass[a0paper, margin=5mm]{baposter}
+```
+
+**Problem**: Content doesn't fill vertical space
+```latex
+% Use \vfill between sections to distribute space
+\block{Introduction}{...}
+\vfill
+\block{Methods}{...}
+\vfill
+\block{Results}{...}
+
+% Or manually adjust block spacing
+\vspace{1cm} % Add space between specific blocks
+```
+
+**Problem**: Poster extends beyond page boundaries
+```latex
+% Check total width calculation
+% For 3 columns with spacing:
+% Total = 3×columnwidth + 2×colspace + 2×margins
+% Ensure this equals \paperwidth
+
+% Debug by adding visible page boundary
+\usepackage{eso-pic}
+\AddToShipoutPictureBG{
+ \AtPageLowerLeft{
+ \put(0,0){\framebox(\LenToUnit{\paperwidth},\LenToUnit{\paperheight}){}}
+ }
+}
+```
+
+**Print Preparation**:
+- Generate PDF/X-1a for professional printing
+- Embed all fonts
+- Convert colors to CMYK if required
+- Check resolution of all images (minimum 300 DPI)
+- Add bleed area if required by printer (usually 3-5mm)
+- Verify page size matches requirements exactly
+
+**Digital Display**:
+- RGB color space for screen display
+- Optimize file size for email/web
+- Test readability on different screens
+
+### 11. PDF Review and Quality Control
+
+**CRITICAL**: Always review the generated PDF before printing or presenting. Use this systematic checklist:
+
+**Step 1: Page Size Verification**
+```bash
+# Check PDF dimensions (should match poster size exactly)
+pdfinfo poster.pdf | grep "Page size"
+
+# Expected outputs:
+# A0: 2384 x 3370 points (841 x 1189 mm)
+# 36x48": 2592 x 3456 points
+# A1: 1684 x 2384 points (594 x 841 mm)
+```
+
+**Step 2: Visual Inspection Checklist**
+
+Open PDF at 100% zoom and check:
+
+**Layout and Spacing**:
+- [ ] Content fills entire page (no large white margins)
+- [ ] Consistent spacing between columns
+- [ ] Consistent spacing between blocks/sections
+- [ ] All elements aligned properly (use ruler tool)
+- [ ] No overlapping text or figures
+- [ ] White space evenly distributed
+
+**Typography**:
+- [ ] Title clearly visible and large (72pt+)
+- [ ] Section headers readable (48-72pt)
+- [ ] Body text readable at 100% zoom (24-36pt minimum)
+- [ ] No text cutoff or running off edges
+- [ ] Consistent font usage throughout
+- [ ] All special characters render correctly (symbols, Greek letters)
+
+**Visual Elements**:
+- [ ] All figures display correctly
+- [ ] No pixelated or blurry images
+- [ ] Figure captions present and readable
+- [ ] Colors render as expected (not washed out or too dark)
+- [ ] Logos display clearly
+- [ ] QR codes visible and scannable
+
+**Content Completeness**:
+- [ ] Title and authors complete
+- [ ] All sections present (Intro, Methods, Results, Conclusions)
+- [ ] References included
+- [ ] Contact information visible
+- [ ] Acknowledgments (if applicable)
+- [ ] No placeholder text remaining (Lorem ipsum, TODO, etc.)
+
+**Technical Quality**:
+- [ ] No LaTeX compilation warnings in important areas
+- [ ] All citations resolved (no [?] marks)
+- [ ] All cross-references working
+- [ ] Page boundaries correct (no content cut off)
+
+**Step 3: Reduced-Scale Print Test**
+
+**Essential Pre-Printing Test**:
+```bash
+# Create reduced-size test print (25% of final size)
+# This simulates viewing full poster from ~8-10 feet
+
+# For A0 poster, print on A4 paper (24.7% scale)
+# For 36x48" poster, print on letter paper (~25% scale)
+```
+
+**Print Test Checklist**:
+- [ ] Title readable from 6 feet away
+- [ ] Section headers readable from 4 feet away
+- [ ] Body text readable from 2 feet away
+- [ ] Figures clear and understandable
+- [ ] Colors printed accurately
+- [ ] No obvious design flaws
+
+**Step 4: Digital Quality Checks**
+
+**Font Embedding Verification**:
+```bash
+# Check that all fonts are embedded (required for printing)
+pdffonts poster.pdf
+
+# All fonts should show "yes" in "emb" column
+# If any show "no", recompile with:
+pdflatex -dEmbedAllFonts=true poster.tex
+```
+
+**Image Resolution Check**:
+```bash
+# Extract image information
+pdfimages -list poster.pdf
+
+# Check that all images are at least 300 DPI
+# Formula: DPI = pixels / (inches in poster)
+# For A0 width (33.1"): 300 DPI = 9930 pixels minimum
+```
+
+**File Size Optimization**:
+```bash
+# For email/web, compress if needed (>50MB)
+gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 \
+ -dPDFSETTINGS=/printer -dNOPAUSE -dQUIET -dBATCH \
+ -sOutputFile=poster_compressed.pdf poster.pdf
+
+# For printing, keep original (no compression)
+```
+
+**Step 5: Accessibility Check**
+
+**Color Contrast Verification**:
+- [ ] Text-background contrast ratio ≥ 4.5:1 (WCAG AA)
+- [ ] Important elements contrast ratio ≥ 7:1 (WCAG AAA)
+- Test online: https://webaim.org/resources/contrastchecker/
+
+**Color Blindness Simulation**:
+- [ ] View PDF through color blindness simulator
+- [ ] Information not lost with red-green simulation
+- [ ] Use Coblis (color-blindness.com) or similar tool
+
+**Step 6: Content Proofreading**
+
+**Systematic Review**:
+- [ ] Spell-check all text
+- [ ] Verify all author names and affiliations
+- [ ] Check all numbers and statistics for accuracy
+- [ ] Confirm all citations are correct
+- [ ] Review figure labels and captions
+- [ ] Check for typos in headers and titles
+
+**Peer Review**:
+- [ ] Ask colleague to review poster
+- [ ] 30-second test: Can they identify main message?
+- [ ] 5-minute review: Do they understand conclusions?
+- [ ] Note any confusing elements
+
+**Step 7: Technical Validation**
+
+**LaTeX Compilation Log Review**:
+```bash
+# Check for warnings in .log file
+grep -i "warning\|error\|overfull\|underfull" poster.log
+
+# Common issues to fix:
+# - Overfull hbox: Text extending beyond margins
+# - Underfull hbox: Excessive spacing
+# - Missing references: Citations not resolved
+# - Missing figures: Image files not found
+```
+
+**Fix Common Warnings**:
+```latex
+% Overfull hbox (text too wide)
+\usepackage{microtype} % Better spacing
+\sloppy % Allow slightly looser spacing
+\hyphenation{long-word} % Manual hyphenation
+
+% Missing fonts
+\usepackage[T1]{fontenc} % Better font encoding
+
+% Image not found
+% Ensure paths are correct and files exist
+\graphicspath{{./figures/}{./images/}}
+```
+
+**Step 8: Final Pre-Print Checklist**
+
+**Before Sending to Printer**:
+- [ ] PDF size exactly matches requirements (check with pdfinfo)
+- [ ] All fonts embedded (check with pdffonts)
+- [ ] Color mode correct (RGB for screen, CMYK for print if required)
+- [ ] Bleed area added if required (usually 3-5mm)
+- [ ] Crop marks visible if required
+- [ ] Test print completed and reviewed
+- [ ] File naming clear: [LastName]_[Conference]_Poster.pdf
+- [ ] Backup copy saved
+
+**Printing Specifications to Confirm**:
+- [ ] Paper type (matte vs. glossy)
+- [ ] Printing method (inkjet, large format, fabric)
+- [ ] Color profile (provided to printer if required)
+- [ ] Delivery deadline and shipping address
+- [ ] Tube or flat packaging preference
+
+**Digital Presentation Checklist**:
+- [ ] PDF size optimized (<10MB for email)
+- [ ] Tested on multiple PDF viewers (Adobe, Preview, etc.)
+- [ ] Displays correctly on different screens
+- [ ] QR codes tested and functional
+- [ ] Alternative formats prepared (PNG for social media)
+
+**Review Script** (Available in `scripts/review_poster.sh`):
+```bash
+#!/bin/bash
+# Automated poster PDF review script
+
+echo "Poster PDF Quality Check"
+echo "======================="
+
+# Check file exists
+if [ ! -f "$1" ]; then
+ echo "Error: File not found"
+ exit 1
+fi
+
+echo "File: $1"
+echo ""
+
+# Check page size
+echo "1. Page Dimensions:"
+pdfinfo "$1" | grep "Page size"
+echo ""
+
+# Check fonts
+echo "2. Font Embedding:"
+pdffonts "$1" | head -20
+echo ""
+
+# Check file size
+echo "3. File Size:"
+ls -lh "$1" | awk '{print $5}'
+echo ""
+
+# Count pages (should be 1 for poster)
+echo "4. Page Count:"
+pdfinfo "$1" | grep "Pages"
+echo ""
+
+echo "Manual checks required:"
+echo "- Visual inspection at 100% zoom"
+echo "- Reduced-scale print test (25%)"
+echo "- Color contrast verification"
+echo "- Proofreading for typos"
+```
+
+**Common PDF Issues and Solutions**:
+
+| Issue | Cause | Solution |
+|-------|-------|----------|
+| Large white margins | Incorrect margin settings | Reduce margin in documentclass |
+| Content cut off | Exceeds page boundaries | Check total width/height calculations |
+| Blurry images | Low resolution (<300 DPI) | Replace with higher resolution images |
+| Missing fonts | Fonts not embedded | Compile with -dEmbedAllFonts=true |
+| Wrong page size | Incorrect paper size setting | Verify documentclass paper size |
+| Colors look wrong | RGB vs CMYK mismatch | Convert color space for print |
+| File too large (>50MB) | Uncompressed images | Optimize images or compress PDF |
+| QR codes don't work | Too small or low resolution | Minimum 2×2cm, high contrast |
+
+### 11. Common Poster Content Patterns
+
+Effective content organization for different research types:
+
+**Experimental Research Poster**:
+1. Title and authors
+2. Introduction: Problem and hypothesis
+3. Methods: Experimental design (with diagram)
+4. Results: Key findings (2-4 main figures)
+5. Conclusions: Main takeaways (3-5 bullet points)
+6. Future work (optional)
+7. References and acknowledgments
+
+**Computational/Modeling Poster**:
+1. Title and authors
+2. Motivation: Problem statement
+3. Approach: Algorithm or model (with flowchart)
+4. Implementation: Technical details
+5. Results: Performance metrics and comparisons
+6. Applications: Use cases
+7. Code availability (QR code to GitHub)
+8. References
+
+**Review/Survey Poster**:
+1. Title and authors
+2. Scope: Topic overview
+3. Methods: Literature search strategy
+4. Key findings: Main themes (organized by category)
+5. Trends: Visualizations of publication patterns
+6. Gaps: Identified research needs
+7. Conclusions: Summary and implications
+8. References
+
+### 12. Accessibility and Inclusive Design
+
+Design posters that are accessible to diverse audiences:
+
+**Color Blindness Considerations**:
+- Avoid red-green combinations (most common color blindness)
+- Use patterns or shapes in addition to color
+- Test with color-blindness simulators
+- Provide high contrast (WCAG AA standard: 4.5:1 minimum)
+
+**Visual Impairment Accommodations**:
+- Large, clear fonts (minimum 24pt body text)
+- High contrast text and background
+- Clear visual hierarchy
+- Avoid complex textures or patterns in backgrounds
+
+**Language and Content**:
+- Clear, concise language
+- Define acronyms and jargon
+- International audience considerations
+- Consider multilingual QR code options for global conferences
+
+### 13. Poster Presentation Best Practices
+
+Guidance beyond LaTeX for effective poster sessions:
+
+**Content Strategy**:
+- Tell a story, don't just list facts
+- Focus on 1-3 main messages
+- Use visual abstract or graphical summary
+- Leave room for conversation (don't over-explain)
+
+**Physical Presentation Tips**:
+- Bring printed handouts or business cards with QR code
+- Prepare 30-second, 2-minute, and 5-minute verbal summaries
+- Stand to the side, not blocking the poster
+- Engage viewers with open-ended questions
+
+**Digital Backups**:
+- Save poster as PDF on mobile device
+- Prepare digital version for email sharing
+- Create social media-friendly image version
+- Have backup printed copy or digital display option
+
+## Workflow for Poster Creation
+
+### Stage 1: Planning and Content Development
+
+1. **Determine poster requirements**:
+ - Conference size specifications (A0, 36×48", etc.)
+ - Orientation (portrait vs. landscape)
+ - Submission deadlines and format requirements
+
+2. **Develop content outline**:
+ - Identify 1-3 core messages
+ - Select key figures (typically 3-6 main visuals)
+ - Draft concise text for each section (bullet points preferred)
+ - Aim for 300-800 words total
+
+3. **Choose LaTeX package**:
+ - beamerposter: If familiar with Beamer, need institutional themes
+ - tikzposter: For modern, colorful designs with flexibility
+ - baposter: For structured, professional multi-column layouts
+
+### Stage 2: Design and Layout
+
+1. **Select or create template**:
+ - Start with provided templates in `assets/`
+ - Customize color scheme to match branding
+ - Configure page size and orientation
+
+2. **Design layout structure**:
+ - Plan column structure (2, 3, or 4 columns)
+ - Map content flow (typically left-to-right, top-to-bottom)
+ - Allocate space for title (10-15%), content (70-80%), footer (5-10%)
+
+3. **Set typography**:
+ - Configure font sizes for different hierarchy levels
+ - Ensure minimum 24pt body text
+ - Test readability from 4-6 feet distance
+
+### Stage 3: Content Integration
+
+1. **Create poster header**:
+ - Title (concise, descriptive, 10-15 words)
+ - Authors and affiliations
+ - Institution logos (high-resolution)
+ - Conference logo if required
+
+2. **Populate content sections**:
+ - Keep text minimal and scannable
+ - Use bullet points, not paragraphs
+ - Write in active voice
+ - Integrate figures with clear captions
+
+3. **Add visual elements**:
+ - High-resolution figures (300 DPI minimum)
+ - Consistent styling across all figures
+ - Color-coded elements for emphasis
+ - QR codes for supplementary materials
+
+4. **Include references**:
+ - Cite key papers only (5-10 references typical)
+ - Use abbreviated citation style
+ - Consider QR code to full bibliography
+
+### Stage 4: Refinement and Testing
+
+1. **Review and iterate**:
+ - Check for typos and errors
+ - Verify all figures are high resolution
+ - Ensure consistent formatting
+ - Confirm color scheme works well together
+
+2. **Test readability**:
+ - Print at 25% scale and read from 2-3 feet (simulates poster from 8-12 feet)
+ - Check color on different monitors
+ - Verify QR codes function correctly
+ - Ask colleague to review
+
+3. **Optimize for printing**:
+ - Embed all fonts in PDF
+ - Verify image resolution
+ - Check PDF size requirements
+ - Include bleed area if required
+
+### Stage 5: Compilation and Delivery
+
+1. **Compile final PDF**:
+ ```bash
+ pdflatex poster.tex
+ # Or for better font support:
+ lualatex poster.tex
+ ```
+
+2. **Verify output quality**:
+ - Check all elements are visible and correctly positioned
+ - Zoom to 100% and inspect figure quality
+ - Verify colors match expectations
+ - Confirm PDF opens correctly on different viewers
+
+3. **Prepare for printing**:
+ - Export as PDF/X-1a if required
+ - Save backup copies
+ - Get test print on regular paper first
+ - Order professional printing 2-3 days before deadline
+
+4. **Create supplementary materials**:
+ - Save PNG/JPG version for social media
+ - Create handout version (8.5×11" summary)
+ - Prepare digital version for email sharing
+
+## Integration with Other Skills
+
+This skill works effectively with:
+- **Scientific Writing**: For developing poster content from papers
+- **Figure Creation**: For generating high-quality visualizations
+- **Literature Review**: For contextualizing research
+- **Data Analysis**: For creating result figures and charts
+
+## Common Pitfalls to Avoid
+
+**Design Mistakes**:
+- ❌ Too much text (over 1000 words)
+- ❌ Font sizes too small (under 24pt body text)
+- ❌ Low-contrast color combinations
+- ❌ Cluttered layout with no white space
+- ❌ Inconsistent styling across sections
+- ❌ Poor quality or pixelated images
+
+**Content Mistakes**:
+- ❌ No clear narrative or message
+- ❌ Too many research questions or objectives
+- ❌ Overuse of jargon without definitions
+- ❌ Results without context or interpretation
+- ❌ Missing author contact information
+
+**Technical Mistakes**:
+- ❌ Wrong poster dimensions for conference requirements
+- ❌ RGB colors sent to CMYK printer (color shift)
+- ❌ Fonts not embedded in PDF
+- ❌ File size too large for submission portal
+- ❌ QR codes too small or not tested
+
+**Best Practices**:
+- ✅ Follow conference size specifications exactly
+- ✅ Test print at reduced scale before final printing
+- ✅ Use high-contrast, accessible color schemes
+- ✅ Keep text minimal and highly scannable
+- ✅ Include clear contact information and QR codes
+- ✅ Balance text and visuals (40-50% visual content)
+- ✅ Proofread carefully (errors are magnified on posters!)
+
+## Package Installation
+
+Ensure required LaTeX packages are installed:
+
+```bash
+# For TeX Live (Linux/Mac)
+tlmgr install beamerposter tikzposter baposter
+
+# For MiKTeX (Windows)
+# Packages typically auto-install on first use
+
+# Additional recommended packages
+tlmgr install qrcode graphics xcolor tcolorbox subcaption
+```
+
+## Scripts and Automation
+
+Helper scripts available in `scripts/` directory:
+
+- `compile_poster.sh`: Automated compilation with error handling
+- `generate_template.py`: Interactive template generator
+- `resize_images.py`: Batch image optimization for posters
+- `poster_checklist.py`: Pre-submission validation tool
+
+## References
+
+Comprehensive reference files for detailed guidance:
+
+- `references/latex_poster_packages.md`: Detailed comparison of beamerposter, tikzposter, and baposter with examples
+- `references/poster_layout_design.md`: Layout principles, grid systems, and visual flow
+- `references/poster_design_principles.md`: Typography, color theory, visual hierarchy, and accessibility
+- `references/poster_content_guide.md`: Content organization, writing style, and section-specific guidance
+
+## Templates
+
+Ready-to-use poster templates in `assets/` directory:
+
+- beamerposter templates (classic, modern, colorful)
+- tikzposter templates (default, rays, wave, envelope)
+- baposter templates (portrait, landscape, minimal)
+- Example posters from various scientific disciplines
+- Color scheme definitions and institutional templates
+
+Load these templates and customize for your specific research and conference requirements.
+
diff --git a/scientific-skills/pptx-posters/assets/poster_html_template.html b/scientific-skills/pptx-posters/assets/poster_html_template.html
new file mode 100644
index 0000000..dfe151b
--- /dev/null
+++ b/scientific-skills/pptx-posters/assets/poster_html_template.html
@@ -0,0 +1,257 @@
+
+
+
+
+Research Poster Template - 36x48 inches
+
+
+
+
+
+
+
+
+
+
Introduction
+
+

+
Background: Context about your research problem.
+
Objective: What you aimed to accomplish.
+
+
+
+
Methods
+
+

+
+ - Study design overview
+ - Key methodology
+ - Analysis approach
+
+
+
+
+
+
+
+
Results
+
+
+
Key Finding: Your main result in one sentence
+
+
+

+
+ - Finding 1: Description (p < 0.001)
+ - Finding 2: Description with effect size
+
+
+
+
+
+
+
+
Discussion
+
+
+ - Interpretation of findings
+ - Comparison to prior work
+ - Practical applications
+
+
+
+
+
Conclusions
+
+
+ - Conclusion 1: Clear takeaway
+ - Conclusion 2: Clear takeaway
+ - Future: Next steps
+
+
+
+
+
Acknowledgments
+
+
Funded by Grant #XXX. Thanks to collaborators.
+
+
+
+
+
+
+
+
+
diff --git a/scientific-skills/pptx-posters/assets/poster_quality_checklist.md b/scientific-skills/pptx-posters/assets/poster_quality_checklist.md
new file mode 100644
index 0000000..9338688
--- /dev/null
+++ b/scientific-skills/pptx-posters/assets/poster_quality_checklist.md
@@ -0,0 +1,358 @@
+# Research Poster Quality Checklist
+
+Use this comprehensive checklist before printing or presenting your research poster.
+
+## Pre-Compilation Checks
+
+### Content Completeness
+- [ ] Title is concise and descriptive (10-15 words)
+- [ ] All author names spelled correctly
+- [ ] Affiliations complete and accurate
+- [ ] Contact email address included
+- [ ] All sections present: Introduction, Methods, Results, Conclusions
+- [ ] References cited (5-10 key citations)
+- [ ] Acknowledgments included (funding, collaborators)
+- [ ] No placeholder text remaining (TODO, Lorem ipsum, etc.)
+
+### Visual Content
+- [ ] All figures prepared and high resolution (300+ DPI)
+- [ ] Figure captions written and descriptive
+- [ ] Logos available (university, funding agencies)
+- [ ] QR codes generated and tested
+- [ ] Icons/graphics sourced (if used)
+
+### LaTeX Configuration
+- [ ] Correct paper size specified (A0, A1, 36×48", etc.)
+- [ ] Correct orientation (portrait/landscape)
+- [ ] Minimal margins configured (5-15mm)
+- [ ] Font sizes appropriate (title 72pt+, body 24pt+)
+- [ ] Color scheme defined
+- [ ] All packages installed and working
+
+## Compilation Checks
+
+### Successful Compilation
+- [ ] PDF compiles without errors
+- [ ] No critical warnings in .log file
+- [ ] All citations resolved (no [?] marks)
+- [ ] All cross-references working
+- [ ] Bibliography generated correctly (if using BibTeX)
+
+### Warning Review
+Run in terminal: `grep -i "warning\|overfull\|underfull" poster.log`
+
+- [ ] No overfull hbox warnings (text too wide)
+- [ ] No underfull hbox warnings (excessive spacing)
+- [ ] No missing figure warnings
+- [ ] No missing font warnings
+- [ ] No undefined reference warnings
+
+## PDF Quality Checks
+
+### Automated Checks
+
+Run: `./scripts/review_poster.sh poster.pdf` or manually verify:
+
+#### Page Specifications
+```bash
+pdfinfo poster.pdf | grep "Page size"
+```
+- [ ] Page size matches requirements exactly
+- [ ] Single page document (not multi-page)
+- [ ] Correct orientation
+
+#### Font Embedding
+```bash
+pdffonts poster.pdf
+```
+- [ ] All fonts show "yes" in "emb" column
+- [ ] No bitmap fonts (should be Type 1 or TrueType)
+
+#### Image Quality
+```bash
+pdfimages -list poster.pdf
+```
+- [ ] All images at least 300 DPI
+- [ ] No JPEG artifacts in figures
+- [ ] Vector graphics used where possible
+
+#### File Size
+```bash
+ls -lh poster.pdf
+```
+- [ ] Reasonable size (2-50 MB typical)
+- [ ] Not too large for email (<50 MB) if sharing digitally
+- [ ] Not suspiciously small (<1 MB - may indicate low quality)
+
+## Visual Inspection (100% Zoom)
+
+### Layout and Spacing
+- [ ] Content fills entire page (no excessive white margins)
+- [ ] Consistent spacing between columns (1-2cm)
+- [ ] Consistent spacing between blocks (1-2cm)
+- [ ] All elements aligned to grid
+- [ ] No overlapping text or figures
+- [ ] White space evenly distributed (30-40% total)
+- [ ] Visual balance across poster (no heavy/empty areas)
+
+### Typography
+- [ ] Title readable and prominent (72-120pt)
+- [ ] Section headers clear (48-72pt)
+- [ ] Body text large enough (24-36pt minimum, 30pt+ recommended)
+- [ ] Captions readable (18-24pt)
+- [ ] No text running off edges
+- [ ] Consistent font usage throughout
+- [ ] Line spacing adequate (1.2-1.5×)
+- [ ] No awkward hyphenation or word breaks
+- [ ] All special characters render correctly (Greek, math symbols)
+
+### Visual Elements
+- [ ] All figures display correctly
+- [ ] No pixelated or blurry images
+- [ ] Figure resolution high (zoom to 200% to verify)
+- [ ] Figure labels large and clear
+- [ ] Graph axes labeled with units
+- [ ] Color schemes consistent across figures
+- [ ] Legends readable and well-positioned
+- [ ] Logos crisp and professional
+- [ ] QR codes sharp and high-contrast (minimum 2×2cm)
+- [ ] No visual artifacts or rendering errors
+
+### Colors
+- [ ] Colors render as intended (not washed out)
+- [ ] High contrast between text and background (≥4.5:1)
+- [ ] Color scheme harmonious
+- [ ] Colors appropriate for printing (not too bright/neon)
+- [ ] Institutional colors used correctly
+- [ ] Color-blind friendly palette (avoid red-green only)
+
+### Content
+- [ ] Title complete and correctly positioned
+- [ ] All author names and affiliations visible
+- [ ] All sections present and labeled
+- [ ] Results section has figures/data
+- [ ] Conclusions clearly stated
+- [ ] References formatted consistently
+- [ ] Contact information clearly visible
+- [ ] No missing content
+
+## Reduced-Scale Print Test (CRITICAL)
+
+### Test Print Preparation
+Print poster at 25% scale:
+- A0 poster → Print on A4 paper
+- 36×48" poster → Print on Letter paper
+- A1 poster → Print on A5 paper
+
+### Readability from Distance
+
+**From 6 feet (2 meters):**
+- [ ] Title clearly readable
+- [ ] Authors identifiable
+- [ ] Main figures visible
+
+**From 4 feet (1.2 meters):**
+- [ ] Section headers readable
+- [ ] Figure captions readable
+- [ ] Key results visible
+
+**From 2 feet (0.6 meters):**
+- [ ] Body text readable
+- [ ] References readable
+- [ ] All details clear
+
+### Print Quality
+- [ ] Colors accurate (match screen expectations)
+- [ ] No banding or color shifts
+- [ ] Sharp edges (not blurry)
+- [ ] Consistent print density
+- [ ] No printer artifacts
+
+## Content Proofreading
+
+### Text Accuracy
+- [ ] Spell-checked all text
+- [ ] Grammar checked
+- [ ] All author names spelled correctly
+- [ ] All affiliations accurate
+- [ ] Email address correct
+- [ ] No typos in title or headers
+
+### Scientific Accuracy
+- [ ] All numbers and statistics verified
+- [ ] Units included and correct
+- [ ] Statistical significance correctly indicated
+- [ ] Sample sizes (n=) reported
+- [ ] Figure numbering consistent
+- [ ] Citations accurate and complete
+- [ ] Methodology accurately described
+- [ ] Results match figures/data
+- [ ] Conclusions supported by data
+
+### Consistency
+- [ ] Terminology consistent throughout
+- [ ] Abbreviations defined at first use
+- [ ] Consistent notation (italics for genes, etc.)
+- [ ] Consistent units (don't mix metric/imperial)
+- [ ] Consistent decimal places
+- [ ] Consistent citation format
+
+## Accessibility Checks
+
+### Color Contrast
+Test at: https://webaim.org/resources/contrastchecker/
+
+- [ ] Title-background contrast ≥ 7:1
+- [ ] Body text-background contrast ≥ 4.5:1
+- [ ] All text meets WCAG AA standard minimum
+
+### Color Blindness
+Test with simulator: https://www.color-blindness.com/coblis-color-blindness-simulator/
+
+- [ ] Information not lost with deuteranopia (red-green)
+- [ ] Key distinctions visible with protanopia
+- [ ] Patterns/shapes used in addition to color
+- [ ] No critical info conveyed by color alone
+
+### Visual Clarity
+- [ ] Clear visual hierarchy (size, weight, position)
+- [ ] Logical reading order
+- [ ] Grouping of related elements obvious
+- [ ] Important info emphasized appropriately
+
+## Peer Review
+
+### 30-Second Test
+Show poster to colleague for 30 seconds, then ask:
+- [ ] They can identify the research topic
+- [ ] They can state the main finding
+- [ ] They remember the key figure
+
+### 5-Minute Review
+Ask colleague to read poster (5 minutes), then ask:
+- [ ] They understand the research question
+- [ ] They can explain the approach
+- [ ] They can summarize the conclusions
+- [ ] They identify what makes it novel/important
+
+### Feedback
+- [ ] Noted any confusing elements
+- [ ] Identified any unclear figures
+- [ ] Checked for jargon that needs definition
+- [ ] Verified logical flow
+
+## Pre-Printing Final Checks
+
+### Technical Specifications
+- [ ] PDF size exactly matches conference requirements
+- [ ] Orientation correct (portrait vs landscape)
+- [ ] All fonts embedded (verified with pdffonts)
+- [ ] Color space correct (RGB for screen, CMYK if printer requires)
+- [ ] Resolution adequate (300+ DPI for all images)
+- [ ] Bleed area added if required (typically 3-5mm)
+- [ ] Crop marks visible if required
+- [ ] File naming convention followed
+
+### Printer Communication
+- [ ] Confirmed paper type (matte vs glossy)
+- [ ] Confirmed poster size
+- [ ] Provided color profile if required
+- [ ] Verified delivery deadline
+- [ ] Confirmed shipping/pickup arrangements
+- [ ] Discussed backup plan if issues arise
+
+### Backup and Storage
+- [ ] PDF saved with clear filename: `LastName_Conference_Poster.pdf`
+- [ ] Source .tex file backed up
+- [ ] All figure files backed up
+- [ ] Copy saved to cloud storage
+- [ ] Copy saved on USB drive for conference
+- [ ] Digital version ready to email if requested
+
+## Digital Presentation Checks
+
+If presenting digitally or sharing online:
+
+### File Optimization
+- [ ] PDF compressed if >10MB (for email)
+- [ ] Test opens in Adobe Reader
+- [ ] Test opens in Preview (Mac)
+- [ ] Test opens in browser PDF viewers
+- [ ] Test on mobile devices
+
+### Interactive Elements
+- [ ] All QR codes tested and functional
+- [ ] QR codes link to correct URLs
+- [ ] Hyperlinks work (if included)
+- [ ] Links open in new tabs/windows appropriately
+
+### Alternative Formats
+- [ ] PNG version created for social media (if needed)
+- [ ] Thumbnail image created
+- [ ] Poster description/abstract prepared
+- [ ] Hashtags and social media text ready
+
+## Conference-Specific
+
+### Requirements Verification
+- [ ] Poster size matches conference specifications exactly
+- [ ] Orientation matches requirements
+- [ ] File format correct (usually PDF)
+- [ ] Submission deadline met
+- [ ] File naming convention followed
+- [ ] Abstract/description submitted if required
+
+### Physical Preparation
+- [ ] Poster printed and inspected
+- [ ] Backup printed copy prepared
+- [ ] Push pins/mounting materials ready
+- [ ] Poster tube or flat portfolio for transport
+- [ ] Business cards/handouts prepared
+- [ ] Digital backup on laptop/phone
+
+### Presentation Preparation
+- [ ] 30-second elevator pitch prepared
+- [ ] 2-minute summary prepared
+- [ ] 5-minute detailed explanation prepared
+- [ ] Anticipated questions considered
+- [ ] Follow-up materials ready (QR code to paper, etc.)
+
+## Final Sign-Off
+
+Date: ________________
+
+Poster Title: _______________________________________________
+
+Conference: _______________________________________________
+
+Reviewed by: _______________________________________________
+
+All critical items checked: [ ]
+
+Ready for printing: [ ]
+
+Ready for presentation: [ ]
+
+Notes/Issues to address:
+_________________________________________________________
+_________________________________________________________
+_________________________________________________________
+
+---
+
+## Quick Reference: Common Issues
+
+| Issue | Quick Fix |
+|-------|-----------|
+| Large white margins | Reduce margin in documentclass: `margin=5mm` |
+| Text too small | Increase scale: `scale=1.5` in beamerposter |
+| Blurry figures | Use vector graphics (PDF) or higher resolution (600+ DPI) |
+| Colors wrong | Check RGB vs CMYK, test print before final |
+| Fonts not embedded | Compile with: `pdflatex -dEmbedAllFonts=true` |
+| Content cut off | Check total width: columns + spacing + margins = pagewidth |
+| QR codes don't scan | Increase size (min 2×2cm), ensure high contrast |
+| File too large | Compress: `gs -sDEVICE=pdfwrite -dPDFSETTINGS=/printer ...` |
+
+## Checklist Version
+Version 1.0 - For use with LaTeX poster packages (beamerposter, tikzposter, baposter)
+
diff --git a/scientific-skills/pptx-posters/references/poster_content_guide.md b/scientific-skills/pptx-posters/references/poster_content_guide.md
new file mode 100644
index 0000000..dd97de4
--- /dev/null
+++ b/scientific-skills/pptx-posters/references/poster_content_guide.md
@@ -0,0 +1,748 @@
+# Research Poster Content Guide
+
+## Overview
+
+Content is king in research posters. This guide covers writing strategies, section-specific guidance, visual-text balance, and best practices for communicating research effectively in poster format.
+
+## Core Content Principles
+
+### 1. The 3-5 Minute Rule
+
+**Reality**: Most viewers spend 3-5 minutes at your poster
+- **1 minute**: Scanning from distance (title, figures)
+- **2-4 minutes**: Reading key points up close
+- **5+ minutes**: Engaged conversation (if interested)
+
+**Design Implication**: Poster must work at three levels:
+1. **Distance view** (6-10 feet): Title and main figure visible
+2. **Browse view** (3-6 feet): Section headers and key results readable
+3. **Detail view** (1-3 feet): Full content accessible
+
+### 2. Tell a Story, Not a Paper
+
+**Poster ≠ Condensed Paper**
+
+**Paper approach** (❌):
+- Comprehensive literature review
+- Detailed methodology
+- All results presented
+- Lengthy discussion
+- 50+ references
+
+**Poster approach** (✅):
+- One sentence background
+- Visual methods diagram
+- 3-5 key results
+- 3-4 bullet point conclusions
+- 5-10 key references
+
+**Story Arc for Posters**:
+```
+Hook (Problem) → Approach → Discovery → Impact
+```
+
+**Example**:
+- **Hook**: "Antibiotic resistance threatens millions of lives annually"
+- **Approach**: "We developed an AI system to predict resistance patterns"
+- **Discovery**: "Our model achieves 87% accuracy, 20% better than existing methods"
+- **Impact**: "Could reduce treatment failures by identifying resistance earlier"
+
+### 3. The 800-Word Maximum
+
+**Word Count Guidelines**:
+- **Ideal**: 300-500 words
+- **Maximum**: 800 words
+- **Hard limit**: 1000 words (beyond this, poster is unreadable)
+
+**Word Budget by Section**:
+| Section | Word Count | % of Total |
+|---------|-----------|------------|
+| Introduction/Background | 50-100 | 15% |
+| Methods | 100-150 | 25% |
+| Results (text) | 100-200 | 25% |
+| Discussion/Conclusions | 100-150 | 25% |
+| References/Acknowledgments | 50-100 | 10% |
+
+**Counting Tool**:
+```latex
+% Add word count to poster (remove for final)
+\usepackage{texcount}
+% Compile with: texcount -inc poster.tex
+```
+
+### 4. Visual-to-Text Ratio
+
+**Optimal Balance**: 40-50% visual content, 50-60% text+white space
+
+**Visual Content Includes**:
+- Figures and graphs
+- Photos and images
+- Diagrams and flowcharts
+- Icons and symbols
+- Color blocks and design elements
+
+**Too Text-Heavy** (❌):
+- Wall of text
+- Small figures
+- Intimidating to viewers
+- Low engagement
+
+**Well-Balanced** (✅):
+- Clear figures dominate
+- Text supports visuals
+- Easy to scan
+- Inviting appearance
+
+## Section-Specific Content Guidance
+
+### Title
+
+**Purpose**: Capture attention, convey topic, establish credibility
+
+**Characteristics of Effective Titles**:
+- **Concise**: 10-15 words maximum
+- **Descriptive**: Clearly states research topic
+- **Active**: Uses strong verbs when possible
+- **Specific**: Avoids vague terms
+- **Jargon-aware**: Balances field-specific terms with accessibility
+
+**Title Formulas**:
+
+**1. Descriptive**:
+```
+[Method/Approach] for [Problem/Application]
+
+Example: "Deep Learning for Early Detection of Alzheimer's Disease"
+```
+
+**2. Question**:
+```
+[Research Question]?
+
+Example: "Can Microbiome Diversity Predict Treatment Response?"
+```
+
+**3. Assertion**:
+```
+[Finding] in [Context]
+
+Example: "Novel Mechanism Identified in Drug Resistance Pathways"
+```
+
+**4. Colon Format**:
+```
+[Topic]: [Specific Approach/Finding]
+
+Example: "Urban Heat Islands: A Machine Learning Framework for Mitigation"
+```
+
+**Avoid**:
+- ❌ Generic titles: "A Study of X"
+- ❌ Overly cute or clever wordplay (confuses message)
+- ❌ Excessive jargon: "Utilization of CRISPR-Cas9..."
+- ❌ Unnecessarily long: "Investigation of the potential role of..."
+
+**LaTeX Title Formatting**:
+```latex
+% Emphasize key words with bold
+\title{Deep Learning for \textbf{Early Detection} of Alzheimer's Disease}
+
+% Two-line titles for long names
+\title{Machine Learning Framework for\\Urban Heat Island Mitigation}
+
+% Avoid ALL CAPS (harder to read)
+```
+
+### Authors and Affiliations
+
+**Best Practices**:
+- **Presenting author**: Bold, underline, or asterisk
+- **Corresponding author**: Include email
+- **Affiliations**: Superscript numbers or symbols
+- **Institutional logos**: 2-4 maximum
+
+**Format Examples**:
+```latex
+% Simple format
+\author{\textbf{Jane Smith}\textsuperscript{1}, John Doe\textsuperscript{2}}
+\institute{
+ \textsuperscript{1}University of Example,
+ \textsuperscript{2}Research Institute
+}
+
+% With contact
+\author{Jane Smith\textsuperscript{1,*}}
+\institute{
+ \textsuperscript{1}Department, University\\
+ \textsuperscript{*}jane.smith@university.edu
+}
+```
+
+### Introduction/Background
+
+**Purpose**: Establish context, motivate research, state objective
+
+**Structure** (50-100 words):
+1. **Problem statement** (1-2 sentences): What's the issue?
+2. **Knowledge gap** (1-2 sentences): What's unknown/unsolved?
+3. **Research objective** (1 sentence): What did you do?
+
+**Example** (95 words):
+```
+Antibiotic resistance causes 700,000 deaths annually, projected to reach
+10 million by 2050. Current diagnostic methods require 48-72 hours,
+delaying appropriate treatment. Machine learning offers potential for
+rapid resistance prediction, but existing models lack generalizability
+across bacterial species.
+
+We developed a transformer-based deep learning model to predict antibiotic
+resistance from genomic sequences across multiple pathogen species. Our
+approach integrates evolutionary information and protein structure to
+improve cross-species accuracy.
+```
+
+**Visual Support**:
+- Conceptual diagram showing problem
+- Infographic with statistics
+- Image of application context
+
+**Common Mistakes**:
+- ❌ Extensive literature review
+- ❌ Too much background detail
+- ❌ Undefined acronyms at first use
+- ❌ Missing clear objective statement
+
+### Methods
+
+**Purpose**: Describe approach sufficiently for understanding (not replication)
+
+**Key Question**: "How did you do it?" not "How could someone else replicate it?"
+
+**Content Strategy**:
+- **Prioritize**: Visual methods diagram > text description
+- **Include**: Study design, key procedures, analysis approach
+- **Omit**: Detailed protocols, routine procedures, specific reagent details
+
+**Visual Methods (Highly Recommended)**:
+```latex
+% Flowchart of study design
+\begin{tikzpicture}[node distance=2cm]
+ \node (start) [box] {Data Collection\\n=1,000 samples};
+ \node (process) [box, below of=start] {Preprocessing\\Quality Control};
+ \node (analysis) [box, below of=process] {Statistical Analysis\\Mixed Models};
+ \node (end) [box, below of=analysis] {Validation\\Independent Cohort};
+
+ \draw [arrow] (start) -- (process);
+ \draw [arrow] (process) -- (analysis);
+ \draw [arrow] (analysis) -- (end);
+\end{tikzpicture}
+```
+
+**Text Methods** (50-150 words):
+
+**For Experimental Studies**:
+```
+Methods
+• Study design: Randomized controlled trial (n=200)
+• Participants: Adults aged 18-65 with Type 2 diabetes
+• Intervention: 12-week exercise program vs. standard care
+• Outcomes: HbA1c (primary), insulin sensitivity (secondary)
+• Analysis: Linear mixed models, intention-to-treat
+```
+
+**For Computational Studies**:
+```
+Methods
+• Dataset: 10,000 labeled images from ImageNet
+• Architecture: ResNet-50 with custom attention mechanism
+• Training: 100 epochs, Adam optimizer, learning rate 0.001
+• Validation: 5-fold cross-validation
+• Comparison: Baseline CNN, VGG-16, Inception-v3
+```
+
+**Format Options**:
+- **Bullet points**: Quick scanning (recommended)
+- **Numbered list**: Sequential procedures
+- **Diagram + brief text**: Ideal combination
+- **Table**: Multiple conditions or parameters
+
+### Results
+
+**Purpose**: Present key findings visually and clearly
+
+**Golden Rule**: Show, don't tell
+
+**Content Allocation**:
+- **Figures**: 70-80% of Results section
+- **Text**: 20-30% (brief descriptions, statistics)
+
+**How Many Results**:
+- **Ideal**: 3-5 main findings
+- **Maximum**: 6-7 distinct results
+- **Focus**: Primary outcomes, most impactful findings
+
+**Figure Selection Criteria**:
+1. Does it support the main message?
+2. Is it self-explanatory with caption?
+3. Can it be understood in 10 seconds?
+4. Does it add information beyond text?
+
+**Figure Captions**:
+- **Descriptive**: Explain what is shown
+- **Standalone**: Understandable without reading full poster
+- **Statistical**: Include significance indicators, sample sizes
+- **Concise**: 1-3 sentences
+
+**Example Caption**:
+```latex
+\caption{Treatment significantly improved outcomes.
+Mean±SD shown for control (blue, n=45) and treatment (orange, n=47) groups.
+**p<0.01, ***p<0.001 (two-tailed t-test).}
+```
+
+**Text Support for Results** (100-200 words):
+- State main finding per figure
+- Include key statistics
+- Note trends or patterns
+- Avoid detailed interpretation (save for Discussion)
+
+**Example Results Text**:
+```
+Key Findings
+• Model achieved 87% accuracy on test set (vs. 73% baseline)
+• Performance consistent across 5 bacterial species (p<0.001)
+• Prediction speed: <30 seconds per isolate
+• Feature importance: protein structure (42%), sequence (35%),
+ evolutionary conservation (23%)
+```
+
+**Data Presentation Formats**:
+
+**1. Bar Charts**: Comparing categories
+```latex
+\begin{tikzpicture}
+ \begin{axis}[
+ ybar,
+ ylabel=Accuracy (\%),
+ symbolic x coords={Baseline, Model A, Our Method},
+ xtick=data,
+ nodes near coords
+ ]
+ \addplot coordinates {(Baseline,73) (Model A,81) (Our Method,87)};
+ \end{axis}
+\end{tikzpicture}
+```
+
+**2. Line Graphs**: Trends over time
+**3. Scatter Plots**: Correlations
+**4. Heatmaps**: Matrix data, clustering
+**5. Box Plots**: Distributions, comparisons
+**6. ROC Curves**: Classification performance
+
+### Discussion/Conclusions
+
+**Purpose**: Interpret findings, state implications, acknowledge limitations
+
+**Structure** (100-150 words):
+
+**1. Main Conclusions** (50-75 words):
+- 3-5 bullet points
+- Clear, specific takeaways
+- Linked to research objectives
+
+**Example**:
+```
+Conclusions
+• First cross-species model for antibiotic resistance prediction
+ achieving >85% accuracy
+• Protein structure integration critical for generalizability
+ (improved accuracy by 14%)
+• Prediction speed enables clinical decision support within
+ consultation timeframe
+• Potential to reduce inappropriate antibiotic use by 20-30%
+```
+
+**2. Limitations** (25-50 words, optional but recommended):
+- Acknowledge key constraints
+- Brief, honest
+- Shows scientific rigor
+
+**Example**:
+```
+Limitations
+• Training data limited to 5 bacterial species
+• Requires genomic sequencing (not widely available)
+• Validation needed in prospective clinical trials
+```
+
+**3. Future Directions** (25-50 words, optional):
+- Next steps
+- Broader implications
+- Call to action
+
+**Example**:
+```
+Next Steps
+• Expand to 20+ additional species
+• Develop point-of-care sequencing integration
+• Launch multi-center clinical validation study (2025)
+```
+
+**Avoid**:
+- ❌ Overstating findings: "This revolutionary breakthrough..."
+- ❌ Extensive comparison to other work
+- ❌ New results in Discussion
+- ❌ Vague conclusions: "Further research is needed"
+
+### References
+
+**How Many**: 5-10 key citations
+
+**Selection Criteria**:
+- Include seminal work in the field
+- Recent relevant studies (last 5 years)
+- Methods cited in your poster
+- Controversial claims that need support
+
+**Format**: Abbreviated, consistent style
+
+**Examples**:
+
+**Numbered (Vancouver)**:
+```
+References
+1. Smith et al. (2023). Nature. 615:234-240.
+2. Jones & Lee (2024). Science. 383:112-118.
+3. Chen et al. (2022). Cell. 185:456-470.
+```
+
+**Author-Year (APA)**:
+```
+References
+Smith, J. et al. (2023). Title. Nature, 615, 234-240.
+Jones, A., & Lee, B. (2024). Title. Science, 383, 112-118.
+```
+
+**Minimal (For Space Constraints)**:
+```
+Key References: Smith (Nature 2023), Jones (Science 2024),
+Chen (Cell 2022). Full bibliography: [QR Code]
+```
+
+**Alternative**: QR code linking to full reference list
+
+### Acknowledgments
+
+**Include**:
+- Funding sources (with grant numbers)
+- Major collaborators
+- Core facilities used
+- Dataset sources
+
+**Format** (25-50 words):
+```
+Acknowledgments
+Funded by NIH Grant R01-123456 and NSF Award 7890123.
+We thank Dr. X for data access, the Y Core Facility for
+sequencing, and Z for helpful discussions.
+```
+
+### Contact Information
+
+**Essential Elements**:
+- Name of presenting/corresponding author
+- Email address
+- Optional: Lab website, Twitter/X, LinkedIn, ORCID
+
+**Format**:
+```
+Contact: Jane Smith, jane.smith@university.edu
+Lab: smithlab.university.edu | Twitter: @smithlab
+```
+
+**QR Code Alternative**:
+- Link to personal/lab website
+- Link to paper preprint/publication
+- Link to code repository (GitHub)
+- Link to supplementary materials
+
+## Writing Style for Posters
+
+### Active vs. Passive Voice
+
+**Prefer Active Voice** (more engaging, clearer):
+- ✅ "We developed a model..."
+- ✅ "The treatment reduced symptoms..."
+
+**Passive Voice** (when appropriate):
+- ✅ "Samples were collected from..."
+- ✅ "Data were analyzed using..."
+
+### Sentence Length
+
+**Keep Sentences Short**:
+- **Ideal**: 10-15 words per sentence
+- **Maximum**: 20-25 words
+- **Avoid**: >30 words (hard to follow)
+
+**Example Revision**:
+- ❌ Long: "We performed a comprehensive analysis of gene expression data from 500 patients with colorectal cancer using RNA sequencing and identified 47 differentially expressed genes associated with treatment response." (31 words)
+- ✅ Short: "We analyzed RNA sequencing data from 500 colorectal cancer patients. We identified 47 genes associated with treatment response." (19 words total, two sentences)
+
+### Bullet Points vs. Paragraphs
+
+**Use Bullet Points For**:
+- ✅ Lists of items or findings
+- ✅ Key conclusions
+- ✅ Methods steps
+- ✅ Study characteristics
+
+**Use Short Paragraphs For**:
+- ✅ Narrative flow (Introduction)
+- ✅ Complex explanations
+- ✅ Connected ideas
+
+**Bullet Point Best Practices**:
+- Start with action verbs or nouns
+- Parallel structure throughout list
+- 3-7 bullets per list (not too many)
+- Brief (1-2 lines each)
+
+**Example**:
+```
+Methods
+• Participants: 200 adults (18-65 years)
+• Design: Double-blind RCT (12 weeks)
+• Intervention: Daily 30-min exercise
+• Control: Standard care
+• Analysis: Mixed models (SPSS v.28)
+```
+
+### Acronyms and Jargon
+
+**First Use Rule**: Define at first appearance
+```
+We used machine learning (ML) to analyze... Later, ML predicted...
+```
+
+**Common Acronyms**: May not need definition if universal to field
+- DNA, RNA, MRI, CT, PCR (in biomedical context)
+- AI, ML, CNN (in computer science context)
+
+**Avoid Excessive Jargon**:
+- ❌ "Utilized" → ✅ "Used"
+- ❌ "Implement utilization of" → ✅ "Use"
+- ❌ "A majority of" → ✅ "Most"
+
+### Numbers and Statistics
+
+**Present Statistics Clearly**:
+- Always include measure of variability (SD, SE, CI)
+- Report sample sizes: n=50
+- Indicate significance: p<0.05, p<0.01, p<0.001
+- Use symbols consistently: * for p<0.05, ** for p<0.01
+
+**Format Numbers**:
+- Round appropriately (avoid false precision)
+- Use consistent decimal places
+- Include units: 25 mg/dL, 37°C
+- Large numbers: 1,000 or 1000 (be consistent)
+
+**Example**:
+```
+Treatment increased response by 23.5% (95% CI: 18.2-28.8%, p<0.001, n=150)
+```
+
+## Visual-Text Integration
+
+### Figure-Text Relationship
+
+**Figure First, Text Second**:
+1. Design poster around key figures
+2. Add text to support and explain visuals
+3. Ensure figures can stand alone
+
+**Text Placement Relative to Figures**:
+- **Above**: Context, "What you're about to see"
+- **Below**: Explanation, statistics, caption
+- **Beside**: Comparison, interpretation
+
+### Callouts and Annotations
+
+**On-Figure Annotations**:
+```latex
+\begin{tikzpicture}
+ \node[inner sep=0] (img) {\includegraphics[width=10cm]{figure.pdf}};
+ \draw[->, thick, red] (8,5) -- (6,3) node[left] {Key region};
+ \draw[red, thick] (3,2) circle (1cm) node[above=1.2cm] {Anomaly};
+\end{tikzpicture}
+```
+
+**Callout Boxes**:
+```latex
+\begin{tcolorbox}[colback=yellow!10, colframe=orange!80,
+ title=Key Finding]
+Our method reduces errors by 34\% compared to state-of-the-art.
+\end{tcolorbox}
+```
+
+### Icons for Section Headers
+
+**Visual Section Markers**:
+```latex
+\usepackage{fontawesome5}
+
+\block{\faFlask~Introduction}{...}
+\block{\faCog~Methods}{...}
+\block{\faChartBar~Results}{...}
+\block{\faLightbulb~Conclusions}{...}
+```
+
+## Content Adaptation Strategies
+
+### From Paper to Poster
+
+**Condensation Process**:
+
+**1. Identify Core Message** (The Elevator Pitch):
+- What's the one thing you want people to remember?
+- If you had 30 seconds, what would you say?
+
+**2. Select Key Results**:
+- Choose 3-5 most impactful findings
+- Omit supporting/secondary results
+- Focus on figures with strong visual impact
+
+**3. Simplify Methods**:
+- Visual flowchart > text description
+- Omit routine procedures
+- Include only essential parameters
+
+**4. Trim Literature Review**:
+- One sentence background
+- One sentence gap/motivation
+- One sentence your contribution
+
+**5. Condense Discussion**:
+- Main conclusions only
+- Brief limitations
+- One sentence future direction
+
+### For Different Audiences
+
+**Specialist Audience** (Same Field):
+- Can use field-specific jargon
+- Less background needed
+- Focus on novel methodology
+- Emphasize nuanced findings
+
+**General Scientific Audience**:
+- Define key terms
+- More context/background
+- Broader implications
+- Visual metaphors helpful
+
+**Public/Lay Audience**:
+- Minimal jargon, all defined
+- Extensive context
+- Real-world applications
+- Analogies and simple language
+
+**Example Adaptation**:
+
+**Specialist**: "CRISPR-Cas9 knockout of BRCA1 induced synthetic lethality with PARP inhibitors"
+
+**General**: "We used gene editing to make cancer cells vulnerable to existing drugs"
+
+**Public**: "We found a way to make cancer treatments work better by targeting specific genetic weaknesses"
+
+## Quality Control Checklist
+
+### Content Review
+
+**Clarity**:
+- [ ] Main message immediately clear
+- [ ] All acronyms defined
+- [ ] Sentences short and direct
+- [ ] No unnecessary jargon
+
+**Completeness**:
+- [ ] Research question/objective stated
+- [ ] Methods sufficiently described
+- [ ] Key results presented
+- [ ] Conclusions drawn
+- [ ] Limitations acknowledged
+
+**Accuracy**:
+- [ ] All statistics correct
+- [ ] Figure captions accurate
+- [ ] References properly cited
+- [ ] No overstated claims
+
+**Engagement**:
+- [ ] Compelling title
+- [ ] Visual interest
+- [ ] Clear take-home message
+- [ ] Conversation starters
+
+### Readability Testing
+
+**Distance Test**:
+- Print at 25% scale
+- View from 2-3 feet (simulates 8-12 feet for full poster)
+- Can you read: Title? Section headers? Body text?
+
+**Scan Test**:
+- Give poster to colleague for 30 seconds
+- Ask: "What is this poster about?"
+- They should identify: Topic, approach, main finding
+
+**Detail Test**:
+- Ask colleague to read poster thoroughly (5 min)
+- Ask: "What are the key conclusions?"
+- Verify understanding matches your intent
+
+## Common Content Mistakes
+
+**1. Too Much Text**
+- ❌ >1000 words
+- ❌ Long paragraphs
+- ❌ Full paper condensed
+- ✅ 300-800 words, bullet points, key findings only
+
+**2. Unclear Message**
+- ❌ Multiple unrelated findings
+- ❌ No clear conclusion
+- ❌ Vague implications
+- ✅ 1-3 main points, explicit conclusions
+
+**3. Methods Overkill**
+- ❌ Detailed protocols
+- ❌ All parameters listed
+- ❌ Routine procedures described
+- ✅ Visual flowchart, key details only
+
+**4. Poor Figure Integration**
+- ❌ Figures without context
+- ❌ Unclear captions
+- ❌ Text doesn't reference figures
+- ✅ Figures central, well-captioned, text integrated
+
+**5. Missing Context**
+- ❌ No background
+- ❌ Undefined acronyms
+- ❌ Assumes expert knowledge
+- ✅ Brief context, definitions, accessible to broader audience
+
+## Conclusion
+
+Effective poster content:
+- **Concise**: 300-800 words maximum
+- **Visual**: 40-50% figures and graphics
+- **Clear**: One main message, 3-5 key findings
+- **Engaging**: Compelling story, not just facts
+- **Accessible**: Appropriate for target audience
+- **Actionable**: Clear implications and next steps
+
+Remember: Your poster is a conversation starter, not a comprehensive treatise. Design content to intrigue, engage, and invite discussion.
+
diff --git a/scientific-skills/pptx-posters/references/poster_design_principles.md b/scientific-skills/pptx-posters/references/poster_design_principles.md
new file mode 100644
index 0000000..2454bff
--- /dev/null
+++ b/scientific-skills/pptx-posters/references/poster_design_principles.md
@@ -0,0 +1,806 @@
+# Research Poster Design Principles
+
+## Overview
+
+Effective poster design balances visual appeal, readability, and scientific content. This guide covers typography, color theory, visual hierarchy, accessibility, and evidence-based design principles for research posters.
+
+## Core Design Principles
+
+### 1. Visual Hierarchy
+
+Guide viewers through content in logical order using size, color, position, and contrast.
+
+**Hierarchy Levels**:
+
+1. **Primary (Title)**: Largest, most prominent
+ - Size: 72-120pt
+ - Position: Top center or top spanning
+ - Weight: Bold
+ - Purpose: Capture attention from 20+ feet
+
+2. **Secondary (Section Headers)**: Organize content
+ - Size: 48-72pt
+ - Weight: Bold or semi-bold
+ - Purpose: Section navigation, readable from 10 feet
+
+3. **Tertiary (Body Text)**: Main content
+ - Size: 24-36pt minimum
+ - Weight: Regular
+ - Purpose: Detailed information, readable from 4-6 feet
+
+4. **Quaternary (Captions, References)**: Supporting info
+ - Size: 18-24pt
+ - Weight: Regular or light
+ - Purpose: Context and attribution
+
+**Implementation**:
+```latex
+% Define hierarchy in LaTeX
+\setbeamerfont{title}{size=\VeryHuge,series=\bfseries} % 90pt+
+\setbeamerfont{block title}{size=\Huge,series=\bfseries} % 60pt
+\setbeamerfont{block body}{size=\LARGE} % 30pt
+\setbeamerfont{caption}{size=\large} % 24pt
+```
+
+### 2. White Space (Negative Space)
+
+Empty space is not wasted space—it enhances readability and guides attention.
+
+**White Space Functions**:
+- **Breathing room**: Prevents overwhelming viewers
+- **Grouping**: Shows which elements belong together
+- **Focus**: Draws attention to important elements
+- **Flow**: Creates visual pathways through content
+
+**Guidelines**:
+- Minimum 5-10% margins on all sides
+- Consistent spacing between blocks (1-2cm)
+- Space around figures equal to or greater than border width
+- Group related items closely, separate unrelated items
+- Don't fill every inch—aim for 40-60% text coverage
+
+**LaTeX Implementation**:
+```latex
+% beamerposter spacing
+\setbeamertemplate{block begin}{
+ \vskip2ex % Space before block
+ ...
+}
+
+% tikzposter spacing
+\documentclass[..., blockverticalspace=15mm, colspace=15mm]{tikzposter}
+
+% Manual spacing
+\vspace{2cm} % Vertical space
+\hspace{1cm} % Horizontal space
+```
+
+### 3. Alignment and Grid Systems
+
+Proper alignment creates professional, organized appearance.
+
+**Alignment Types**:
+- **Left-aligned text**: Most readable for body text (Western audiences)
+- **Center-aligned**: Headers, titles, symmetric layouts
+- **Right-aligned**: Rarely used, special cases only
+- **Justified**: Avoid (creates uneven spacing)
+
+**Grid Systems**:
+- **2-column**: Simple, traditional, good for narrative flow
+- **3-column**: Most common, balanced, versatile
+- **4-column**: Complex, information-dense, requires careful design
+- **Asymmetric**: Creative, modern, requires expertise
+
+**Best Practices**:
+- Align block edges to invisible grid lines
+- Keep consistent column widths (unless intentionally asymmetric)
+- Align similar elements (all figures, all text blocks)
+- Use consistent margins throughout
+
+### 4. Visual Flow and Reading Patterns
+
+Design for natural eye movement and logical content progression.
+
+**Common Reading Patterns**:
+
+**Z-Pattern (Landscape posters)**:
+```
+Start → → → Top Right
+ ↓
+Middle Left → → Middle
+ ↓
+Bottom Left → → → End
+```
+
+**F-Pattern (Portrait posters)**:
+```
+Title → → → →
+↓
+Section 1 → →
+↓
+Section 2 → →
+↓
+Section 3 → →
+↓
+Conclusion → →
+```
+
+**Gutenberg Diagram**:
+```
+Primary Area Strong Fallow
+(top-left) (top-right)
+ ↓ ↓
+Weak Fallow Terminal Area
+(bottom-left) (bottom-right)
+```
+
+**Implementation Strategy**:
+1. Place most important content in "hot zones" (top-left, center)
+2. Create visual paths with arrows, lines, or color
+3. Use numbering for sequential information (Methods steps)
+4. Design left-to-right, top-to-bottom flow (Western audiences)
+5. Position conclusions prominently (bottom-right is natural endpoint)
+
+## Typography
+
+### Font Selection
+
+**Recommended Fonts**:
+
+**Sans-Serif (Recommended for posters)**:
+- **Helvetica**: Clean, professional, widely available
+- **Arial**: Similar to Helvetica, universal compatibility
+- **Calibri**: Modern, friendly, good readability
+- **Open Sans**: Contemporary, excellent web and print
+- **Roboto**: Modern, Google design, highly readable
+- **Lato**: Warm, professional, works at all sizes
+
+**Serif (Use sparingly)**:
+- **Times New Roman**: Traditional, formal
+- **Garamond**: Elegant, good for humanities
+- **Georgia**: Designed for screens, readable
+
+**Avoid**:
+- ❌ Comic Sans (unprofessional)
+- ❌ Decorative or script fonts (illegible from distance)
+- ❌ Mixing more than 2-3 font families
+
+**LaTeX Implementation**:
+```latex
+% Helvetica (sans-serif)
+\usepackage{helvet}
+\renewcommand{\familydefault}{\sfdefault}
+
+% Arial-like
+\usepackage{avant}
+\renewcommand{\familydefault}{\sfdefault}
+
+% Modern fonts with fontspec (requires LuaLaTeX/XeLaTeX)
+\usepackage{fontspec}
+\setmainfont{Helvetica Neue}
+\setsansfont{Open Sans}
+```
+
+### Font Sizing
+
+**Absolute Minimum Sizes** (readable from 4-6 feet):
+- Title: 72pt+ (85-120pt recommended)
+- Section headers: 48-72pt
+- Body text: 24-36pt (30pt+ recommended)
+- Captions/small text: 18-24pt
+- References: 16-20pt minimum
+
+**Testing Readability**:
+- Print at 25% scale
+- Read from 2-3 feet distance
+- If legible, full-scale poster will be readable from 8-12 feet
+
+**Size Conversion**:
+| LaTeX Command | Approximate Size | Use Case |
+|---------------|------------------|----------|
+| `\tiny` | 10pt | Avoid on posters |
+| `\small` | 16pt | Minimal use only |
+| `\normalsize` | 20pt | References (scaled up) |
+| `\large` | 24pt | Captions, small text |
+| `\Large` | 28pt | Body text (minimum) |
+| `\LARGE` | 32pt | Body text (recommended) |
+| `\huge` | 36pt | Subheadings |
+| `\Huge` | 48pt | Section headers |
+| `\VeryHuge` | 72pt+ | Title |
+
+### Text Formatting Best Practices
+
+**Use**:
+- ✅ **Bold** for emphasis and headers
+- ✅ Short paragraphs (3-5 lines maximum)
+- ✅ Bullet points for lists
+- ✅ Adequate line spacing (1.2-1.5)
+- ✅ High contrast (dark text on light background)
+
+**Avoid**:
+- ❌ Italics from distance (hard to read)
+- ❌ ALL CAPS FOR LONG TEXT (SLOW TO READ)
+- ❌ Underlines (old-fashioned, interferes with descenders)
+- ❌ Long paragraphs (> 6 lines)
+- ❌ Light text on light backgrounds
+
+**Line Spacing**:
+```latex
+% Increase line spacing for readability
+\usepackage{setspace}
+\setstretch{1.3} % 1.3x normal spacing
+
+% Or in specific blocks
+\begin{spacing}{1.5}
+ Your text here with extra spacing
+\end{spacing}
+```
+
+## Color Theory for Posters
+
+### Color Psychology and Meaning
+
+Colors convey meaning and affect viewer perception:
+
+| Color | Associations | Use Cases |
+|-------|--------------|-----------|
+| **Blue** | Trust, professionalism, science | Academic, medical, technology |
+| **Green** | Nature, health, growth | Environmental, biology, health |
+| **Red** | Energy, urgency, passion | Attention, warnings, bold statements |
+| **Orange** | Creativity, enthusiasm | Innovative research, friendly approach |
+| **Purple** | Wisdom, creativity, luxury | Humanities, arts, premium research |
+| **Gray** | Neutral, professional, modern | Technology, minimal designs |
+| **Yellow** | Optimism, attention, caution | Highlights, energy, caution areas |
+
+### Color Scheme Types
+
+**1. Monochromatic**: Variations of single hue
+- **Pros**: Harmonious, professional, easy to execute
+- **Cons**: Can be boring, less visual interest
+- **Use**: Conservative conferences, institutional branding
+
+```latex
+% Monochromatic blue scheme
+\definecolor{darkblue}{RGB}{0,51,102}
+\definecolor{medblue}{RGB}{51,102,153}
+\definecolor{lightblue}{RGB}{204,229,255}
+```
+
+**2. Analogous**: Adjacent colors on color wheel
+- **Pros**: Harmonious, visually comfortable
+- **Cons**: Low contrast, may lack excitement
+- **Use**: Nature/biology topics, smooth gradients
+
+```latex
+% Analogous blue-green scheme
+\definecolor{blue}{RGB}{0,102,204}
+\definecolor{teal}{RGB}{0,153,153}
+\definecolor{green}{RGB}{51,153,102}
+```
+
+**3. Complementary**: Opposite colors on wheel
+- **Pros**: High contrast, vibrant, energetic
+- **Cons**: Can be overwhelming if intense
+- **Use**: Drawing attention, modern designs
+
+```latex
+% Complementary blue-orange scheme
+\definecolor{primary}{RGB}{0,71,171} % Blue
+\definecolor{accent}{RGB}{255,127,0} % Orange
+```
+
+**4. Triadic**: Three evenly spaced colors
+- **Pros**: Balanced, vibrant, visually rich
+- **Cons**: Can appear busy if not balanced
+- **Use**: Multi-topic posters, creative fields
+
+```latex
+% Triadic scheme
+\definecolor{blue}{RGB}{0,102,204}
+\definecolor{red}{RGB}{204,0,51}
+\definecolor{yellow}{RGB}{255,204,0}
+```
+
+**5. Split-Complementary**: Base + two adjacent to complement
+- **Pros**: High contrast but less tense than complementary
+- **Cons**: Complex to balance
+- **Use**: Sophisticated designs, experienced designers
+
+### High-Contrast Combinations
+
+Ensure readability with sufficient contrast:
+
+**Excellent Contrast (Use these)**:
+- Dark blue on white
+- Black on white
+- White on dark blue/green/purple
+- Dark gray on light yellow
+- Black on light cyan
+
+**Poor Contrast (Avoid)**:
+- ❌ Red on green (color-blind issue)
+- ❌ Yellow on white
+- ❌ Light gray on white
+- ❌ Blue on black (hard to read)
+- ❌ Any pure colors on each other
+
+**Contrast Ratio Standards**:
+- Minimum: 4.5:1 (WCAG AA)
+- Recommended: 7:1 (WCAG AAA)
+- Test at: https://webaim.org/resources/contrastchecker/
+
+**LaTeX Color Contrast**:
+```latex
+% High contrast header
+\setbeamercolor{block title}{bg=black, fg=white}
+
+% Medium contrast body
+\setbeamercolor{block body}{bg=gray!10, fg=black}
+
+% Check contrast manually or use online tools
+```
+
+### Color-Blind Friendly Palettes
+
+~8% of males and ~0.5% of females have color vision deficiency.
+
+**Safe Color Combinations**:
+- Blue + Orange (most universally distinguishable)
+- Blue + Yellow
+- Blue + Red
+- Purple + Green (use with caution)
+
+**Avoid**:
+- ❌ Red + Green (indistinguishable to most common color blindness)
+- ❌ Green + Brown
+- ❌ Blue + Purple (can be problematic)
+- ❌ Light green + Yellow
+
+**Recommended Palettes**:
+
+**IBM Color Blind Safe** (excellent accessibility):
+```latex
+\definecolor{ibmblue}{RGB}{100,143,255}
+\definecolor{ibmmagenta}{RGB}{254,97,0}
+\definecolor{ibmpurple}{RGB}{220,38,127}
+\definecolor{ibmcyan}{RGB}{33,191,115}
+```
+
+**Okabe-Ito Palette** (scientifically tested):
+```latex
+\definecolor{okorange}{RGB}{230,159,0}
+\definecolor{okskyblue}{RGB}{86,180,233}
+\definecolor{okgreen}{RGB}{0,158,115}
+\definecolor{okyellow}{RGB}{240,228,66}
+\definecolor{okblue}{RGB}{0,114,178}
+\definecolor{okvermillion}{RGB}{213,94,0}
+\definecolor{okpurple}{RGB}{204,121,167}
+```
+
+**Paul Tol's Bright Palette**:
+```latex
+\definecolor{tolblue}{RGB}{68,119,170}
+\definecolor{tolred}{RGB}{204,102,119}
+\definecolor{tolgreen}{RGB}{34,136,51}
+\definecolor{tolyellow}{RGB}{238,221,136}
+\definecolor{tolcyan}{RGB}{102,204,238}
+```
+
+### Institutional Branding
+
+Match university or department colors:
+
+```latex
+% Example: Stanford colors
+\definecolor{stanford-red}{RGB}{140,21,21}
+\definecolor{stanford-gray}{RGB}{83,86,90}
+
+% Example: MIT colors
+\definecolor{mit-red}{RGB}{163,31,52}
+\definecolor{mit-gray}{RGB}{138,139,140}
+
+% Example: Cambridge colors
+\definecolor{cambridge-blue}{RGB}{163,193,173}
+\definecolor{cambridge-lblue}{RGB}{212,239,223}
+```
+
+## Accessibility Considerations
+
+### Universal Design Principles
+
+Design posters usable by the widest range of people:
+
+**1. Visual Accessibility**:
+- High contrast text (minimum 4.5:1 ratio)
+- Large font sizes (24pt+ body text)
+- Color-blind safe palettes
+- Clear visual hierarchy
+- Avoid relying solely on color to convey information
+
+**2. Cognitive Accessibility**:
+- Clear, simple language
+- Logical organization
+- Consistent layout
+- Visual cues for navigation (arrows, numbers)
+- Avoid clutter and information overload
+
+**3. Physical Accessibility**:
+- Position critical content at wheelchair-accessible height (3-5 feet)
+- Include QR codes to digital versions
+- Provide printed handouts for detail viewing
+- Consider lighting and reflection in poster material choice
+
+### Alternative Text and Descriptions
+
+Make posters accessible to screen readers (for digital versions):
+
+```latex
+% Add alt text to figures
+\includegraphics[width=\linewidth]{figure.pdf}
+% Alternative: Include detailed caption
+\caption{Bar graph showing mean±SD of treatment outcomes.
+Control group (blue): 45±5\%; Treatment group (orange): 78±6\%.
+Asterisks indicate significance: *p<0.05, **p<0.01.}
+```
+
+### Multi-Modal Information
+
+Don't rely on single sensory channel:
+
+**Use Redundant Encoding**:
+- Color + Shape (not just color for categories)
+- Color + Pattern (hatching, stippling)
+- Color + Label (text labels on graph elements)
+- Text + Icons (visual + verbal)
+
+**Example**:
+```latex
+% Good: Color + shape + label
+\begin{tikzpicture}
+ \draw[fill=blue, circle] (0,0) circle (0.3) node[right] {Male: 45\%};
+ \draw[fill=red, rectangle] (0,-1) rectangle (0.6,-0.4) node[right] {Female: 55\%};
+\end{tikzpicture}
+```
+
+## Layout Composition
+
+### Rule of Thirds
+
+Divide poster into 3×3 grid; place key elements at intersections:
+
+```
++-----+-----+-----+
+| × | | × | ← Top third (title, logos)
++-----+-----+-----+
+| | × | | ← Middle third (main content)
++-----+-----+-----+
+| × | | × | ← Bottom third (conclusions)
++-----+-----+-----+
+ ↑ ↑
+Left Right
+```
+
+**Power Points** (intersections):
+- Top-left: Primary section start
+- Top-right: Logos, QR codes
+- Center: Key figure or main result
+- Bottom-right: Conclusions, contact
+
+### Balance and Symmetry
+
+**Symmetric Layouts**:
+- Formal, traditional, stable
+- Easy to design
+- Can appear static or boring
+- Good for conservative audiences
+
+**Asymmetric Layouts**:
+- Dynamic, modern, interesting
+- Harder to execute well
+- More visually engaging
+- Good for creative fields
+
+**Visual Weight Balance**:
+- Large elements = heavy weight
+- Dark colors = heavy weight
+- Dense text = heavy weight
+- Distribute weight evenly across poster
+
+### Proximity and Grouping
+
+**Gestalt Principles**:
+
+**Proximity**: Items close together are perceived as related
+```
+[Introduction] [Methods]
+
+[Results] [Discussion]
+```
+
+**Similarity**: Similar items are perceived as grouped
+- Use consistent colors for related sections
+- Same border styles for similar content types
+
+**Continuity**: Eyes follow lines and paths
+- Use arrows to guide through methods
+- Align elements to create invisible lines
+
+**Closure**: Mind completes incomplete shapes
+- Use partial borders to group without boxing in
+
+## Visual Elements
+
+### Icons and Graphics
+
+Strategic use of icons enhances comprehension:
+
+**Benefits**:
+- Universal language (crosses linguistic barriers)
+- Faster processing than text
+- Adds visual interest
+- Clarifies concepts
+
+**Best Practices**:
+- Use consistent style (all line, all filled, all flat)
+- Appropriate size (1-3cm typical)
+- Label ambiguous icons
+- Source: Font Awesome, Noun Project, academic icon sets
+
+**LaTeX Implementation**:
+```latex
+% Font Awesome icons
+\usepackage{fontawesome5}
+\faFlask{} Methods \quad \faChartBar{} Results
+
+% Custom icons with TikZ
+\begin{tikzpicture}
+ \node[circle, draw, thick, minimum size=1cm] {\Huge \faAtom};
+\end{tikzpicture}
+```
+
+### Borders and Dividers
+
+**Use Borders To**:
+- Define sections
+- Group related content
+- Add visual interest
+- Match institutional branding
+
+**Border Styles**:
+- Solid lines: Traditional, formal
+- Dashed lines: Informal, secondary info
+- Rounded corners: Friendly, modern
+- Drop shadows: Depth, modern (use sparingly)
+
+**Guidelines**:
+- Keep consistent width (2-5pt typical)
+- Use sparingly (not every element needs a border)
+- Match border color to content or theme
+- Ensure sufficient padding inside borders
+
+```latex
+% tikzposter borders
+\usecolorstyle{Denmark}
+\tikzposterlatexaffectionproofoff % Remove bottom-right logo
+
+% Custom border style
+\defineblockstyle{CustomBlock}{
+ titlewidthscale=1, bodywidthscale=1, titleleft,
+ titleoffsetx=0pt, titleoffsety=0pt, bodyoffsetx=0pt, bodyoffsety=0pt,
+ bodyverticalshift=0pt, roundedcorners=10, linewidth=2pt,
+ titleinnersep=8mm, bodyinnersep=8mm
+}{
+ \draw[draw=blocktitlebgcolor, fill=blockbodybgcolor,
+ rounded corners=\blockroundedcorners, line width=\blocklinewidth]
+ (blockbody.south west) rectangle (blocktitle.north east);
+}
+```
+
+### Background and Texture
+
+**Background Options**:
+
+**Plain (Recommended)**:
+- White or very light color
+- Maximum readability
+- Professional
+- Print-friendly
+
+**Gradient**:
+- Subtle gradients acceptable
+- Top-to-bottom or radial
+- Avoid strong contrasts that interfere with text
+
+**Textured**:
+- Very subtle textures only
+- Watermarks of logos/molecules (5-10% opacity)
+- Avoid patterns that create visual noise
+
+**Avoid**:
+- ❌ Busy backgrounds
+- ❌ Images behind text
+- ❌ High contrast backgrounds
+- ❌ Repeating patterns that cause visual artifacts
+
+```latex
+% Gradient background in tikzposter
+\documentclass{tikzposter}
+\definecolorstyle{GradientStyle}{
+ % ...color definitions...
+}{
+ \colorlet{backgroundcolor}{white!90!blue}
+ \colorlet{framecolor}{white!70!blue}
+}
+
+% Watermark
+\usepackage{tikz}
+\AddToShipoutPictureBG{
+ \AtPageCenter{
+ \includegraphics[width=0.5\paperwidth,opacity=0.05]{university-seal.pdf}
+ }
+}
+```
+
+## Common Design Mistakes
+
+### Critical Errors
+
+**1. Too Much Text** (Most common mistake)
+- ❌ More than 1000 words
+- ❌ Long paragraphs (>5 lines)
+- ❌ Small font sizes to fit more content
+- ✅ Solution: Cut ruthlessly, use bullet points, focus on key messages
+
+**2. Poor Contrast**
+- ❌ Light text on light background
+- ❌ Colored text on colored background
+- ✅ Solution: Dark on light or light on dark, test contrast ratio
+
+**3. Font Size Too Small**
+- ❌ Body text under 24pt
+- ❌ Trying to fit full paper content
+- ✅ Solution: 30pt+ body text, prioritize key findings
+
+**4. Cluttered Layout**
+- ❌ No white space
+- ❌ Elements touching edges
+- ❌ Random placement
+- ✅ Solution: Generous margins, grid alignment, intentional white space
+
+**5. Inconsistent Styling**
+- ❌ Multiple font families
+- ❌ Varying header styles
+- ❌ Misaligned elements
+- ✅ Solution: Define style guide, use templates, align to grid
+
+### Moderate Issues
+
+**6. Poor Figure Quality**
+- ❌ Pixelated images (<300 DPI)
+- ❌ Tiny axis labels
+- ❌ Unreadable legends
+- ✅ Solution: Vector graphics (PDF/SVG), large labels, clear legends
+
+**7. Color Overload**
+- ❌ Too many colors (>5 distinct hues)
+- ❌ Neon or overly saturated colors
+- ✅ Solution: Limit to 2-3 main colors, use tints/shades for variation
+
+**8. Ignoring Visual Hierarchy**
+- ❌ All text same size
+- ❌ No clear entry point
+- ✅ Solution: Vary sizes significantly, clear title, visual flow
+
+**9. Information Overload**
+- ❌ Trying to show everything
+- ❌ Too many figures
+- ✅ Solution: Show 3-5 key results, link to full paper via QR code
+
+**10. Poor Typography**
+- ❌ Justified text (uneven spacing)
+- ❌ All caps body text
+- ❌ Mixing serif and sans-serif randomly
+- ✅ Solution: Left-align body, sentence case, consistent fonts
+
+## Design Checklist
+
+### Before Printing
+
+- [ ] Title visible and readable from 20+ feet
+- [ ] Body text minimum 24pt, ideally 30pt+
+- [ ] High contrast (4.5:1 minimum) throughout
+- [ ] Color-blind friendly palette
+- [ ] Less than 800 words total
+- [ ] White space around all elements
+- [ ] Consistent alignment and spacing
+- [ ] All figures high resolution (300+ DPI)
+- [ ] Figure labels readable (18pt+ minimum)
+- [ ] No orphaned text or awkward breaks
+- [ ] Contact information included
+- [ ] QR codes tested and functional
+- [ ] Consistent font usage (2-3 families max)
+- [ ] All acronyms defined
+- [ ] Proper institutional branding/logos
+- [ ] Print test at 25% scale for readability check
+
+### Content Review
+
+- [ ] Clear narrative arc (problem → approach → findings → impact)
+- [ ] 1-3 main messages clearly communicated
+- [ ] Methods concise but reproducible
+- [ ] Results visually presented (not just text)
+- [ ] Conclusions actionable and clear
+- [ ] References cited appropriately
+- [ ] No typos or grammatical errors
+- [ ] Figures have descriptive captions
+- [ ] Data visualizations are clear and honest
+- [ ] Statistical significance properly indicated
+
+## Evidence-Based Design Recommendations
+
+Research on poster effectiveness shows:
+
+**Findings from Studies**:
+1. **Viewers spend 3-5 minutes average** on posters
+ - Design for scanning, not deep reading
+ - Most important info must be visible immediately
+
+2. **Visual content processed 60,000× faster** than text
+ - Use figures, not paragraphs, to convey key findings
+ - Images attract attention first
+
+3. **High contrast improves recall** by 40%
+ - Dark on light > light on dark for comprehension
+ - Color contrast aids memory retention
+
+4. **White space increases comprehension** by 20%
+ - Don't fear empty space
+ - Margins and padding are essential
+
+5. **Three-column layouts most effective** for portrait posters
+ - Balanced visual weight
+ - Natural reading flow
+
+6. **QR codes increase engagement** by 30%
+ - Provide digital access to full paper
+ - Link to videos, code repositories, data
+
+## Resources and Tools
+
+### Color Tools
+- **Coolors.co**: Generate color palettes
+- **Adobe Color**: Color wheel and accessibility checker
+- **ColorBrewer**: Scientific visualization palettes
+- **WebAIM Contrast Checker**: Test contrast ratios
+
+### Design Resources
+- **Canva**: Poster mockups and inspiration
+- **Figma**: Design prototypes before LaTeX
+- **Noun Project**: Icons and graphics
+- **Font Awesome**: Icon fonts for LaTeX
+
+### Testing Tools
+- **Coblis**: Color blindness simulator
+- **Vischeck**: Another color blindness checker
+- **Accessibility Checker**: WCAG compliance
+
+### LaTeX Packages
+- `xcolor`: Extended color support
+- `tcolorbox`: Colored boxes and frames
+- `fontawesome5`: Icon fonts
+- `qrcode`: QR code generation
+- `tikz`: Custom graphics
+
+## Conclusion
+
+Effective poster design requires balancing aesthetics, readability, and scientific content. Follow these core principles:
+
+1. **Less is more**: Prioritize key messages over comprehensive detail
+2. **Size matters**: Make text large enough to read from distance
+3. **Contrast is critical**: Ensure all text is highly readable
+4. **Accessibility first**: Design for diverse audiences
+5. **Visual hierarchy**: Guide viewers through content logically
+6. **Test early**: Print at reduced scale and gather feedback
+
+Remember: A poster is an advertisement for your research and a conversation starter—not a substitute for reading the full paper.
+
diff --git a/scientific-skills/pptx-posters/references/poster_layout_design.md b/scientific-skills/pptx-posters/references/poster_layout_design.md
new file mode 100644
index 0000000..b00a584
--- /dev/null
+++ b/scientific-skills/pptx-posters/references/poster_layout_design.md
@@ -0,0 +1,900 @@
+# Poster Layout and Design Guide
+
+## Overview
+
+Effective poster layout organizes content for maximum impact and comprehension. This guide covers grid systems, spatial organization, visual flow, and layout patterns for research posters.
+
+## Grid Systems and Column Layouts
+
+### Common Grid Patterns
+
+#### 1. Two-Column Layout
+
+**Characteristics**:
+- Simple, traditional structure
+- Easy to design and execute
+- Clear narrative flow
+- Good for text-heavy content
+- Best for A1 size or smaller
+
+**Content Organization**:
+```
++-------------------------+
+| Title/Header |
++-------------------------+
+| Column 1 | Column 2 |
+| | |
+| Intro | Results |
+| | |
+| Methods | Discussion |
+| | |
+| | Conclusions |
++-------------------------+
+| References/Contact |
++-------------------------+
+```
+
+**LaTeX Implementation (beamerposter)**:
+```latex
+\begin{columns}[t]
+ \begin{column}{.48\linewidth}
+ \begin{block}{Introduction}
+ % Content
+ \end{block}
+ \begin{block}{Methods}
+ % Content
+ \end{block}
+ \end{column}
+
+ \begin{column}{.48\linewidth}
+ \begin{block}{Results}
+ % Content
+ \end{block}
+ \begin{block}{Conclusions}
+ % Content
+ \end{block}
+ \end{column}
+\end{columns}
+```
+
+**Best For**:
+- Small posters (A1, A2)
+- Narrative-heavy content
+- Simple comparisons (before/after, control/treatment)
+- Linear storytelling
+
+**Limitations**:
+- Limited space for multiple results
+- Can appear basic or dated
+- Less visual variety
+
+#### 2. Three-Column Layout (Most Popular)
+
+**Characteristics**:
+- Balanced, professional appearance
+- Optimal for A0 posters
+- Versatile content distribution
+- Natural visual rhythm
+- Industry standard
+
+**Content Organization**:
+```
++--------------------------------+
+| Title/Header |
++--------------------------------+
+| Column 1 | Column 2 | Column 3|
+| | | |
+| Intro | Results | Results |
+| | (Fig 1) | (Fig 2) |
+| Methods | | |
+| | Results | Discuss |
+| Methods | (Fig 3) | |
+| (cont.) | | Concl. |
++--------------------------------+
+| Acknowledgments/Refs |
++--------------------------------+
+```
+
+**LaTeX Implementation (tikzposter)**:
+```latex
+\begin{columns}
+ \column{0.33}
+ \block{Introduction}{...}
+ \block{Methods}{...}
+
+ \column{0.33}
+ \block{Results Part 1}{...}
+ \block{Results Part 2}{...}
+
+ \column{0.33}
+ \block{Results Part 3}{...}
+ \block{Discussion}{...}
+ \block{Conclusions}{...}
+\end{columns}
+```
+
+**Best For**:
+- Standard A0 conference posters
+- Multiple results/figures (4-6)
+- Balanced content distribution
+- Professional academic presentations
+
+**Strengths**:
+- Visual balance and symmetry
+- Adequate space for text and figures
+- Clear section delineation
+- Easy to scan left-to-right
+
+#### 3. Four-Column Layout
+
+**Characteristics**:
+- Information-dense
+- Modern, structured appearance
+- Best for large posters (>A0)
+- Requires careful design
+- More complex to balance
+
+**Content Organization**:
+```
++----------------------------------------+
+| Title/Header |
++----------------------------------------+
+| Col 1 | Col 2 | Col 3 | Col 4 |
+| | | | |
+| Intro | Method | Results | Results |
+| | (Flow) | (Fig 1) | (Fig 3) |
+| Motiv. | | | |
+| | Method | Results | Discuss. |
+| Hypoth.| (Stats)| (Fig 2) | |
+| | | | Concl. |
++----------------------------------------+
+| References/Contact |
++----------------------------------------+
+```
+
+**LaTeX Implementation (baposter)**:
+```latex
+\begin{poster}{columns=4, colspacing=1em, ...}
+
+ \headerbox{Intro}{name=intro, column=0, row=0}{...}
+ \headerbox{Methods}{name=methods, column=1, row=0}{...}
+ \headerbox{Results 1}{name=res1, column=2, row=0}{...}
+ \headerbox{Results 2}{name=res2, column=3, row=0}{...}
+
+ % Continue with below=... for stacking
+
+\end{poster}
+```
+
+**Best For**:
+- Large format posters (48×72")
+- Data-heavy presentations
+- Comparison studies (multiple conditions)
+- Engineering/technical posters
+
+**Challenges**:
+- Can appear crowded
+- Requires more white space management
+- Harder to achieve visual balance
+- Risk of overwhelming viewers
+
+#### 4. Asymmetric Layouts
+
+**Characteristics**:
+- Dynamic, modern appearance
+- Flexible content arrangement
+- Emphasizes hierarchy
+- Requires design expertise
+- Best for creative fields
+
+**Example Pattern**:
+```
++--------------------------------+
+| Title/Header |
++--------------------------------+
+| Wide Column | Narrow Column |
+| (66%) | (33%) |
+| | |
+| Intro + | Key |
+| Methods | Figure |
+| (narrative) | (emphasized) |
+| | |
++--------------------------------+
+| Results (spanning full width) |
++--------------------------------+
+| Discussion | Conclusions |
+| (50%) | (50%) |
++--------------------------------+
+```
+
+**LaTeX Implementation (tikzposter)**:
+```latex
+\begin{columns}
+ \column{0.65}
+ \block{Introduction and Methods}{
+ % Combined narrative section
+ }
+
+ \column{0.35}
+ \block{}{
+ % Key figure with minimal text
+ \includegraphics[width=\linewidth]{key-figure.pdf}
+ }
+\end{columns}
+
+\block[width=1.0\linewidth]{Results}{
+ % Full-width results section
+}
+```
+
+**Best For**:
+- Design-oriented conferences
+- Single key finding with supporting content
+- Modern, non-traditional fields
+- Experienced poster designers
+
+### Grid Alignment Principles
+
+**Baseline Grid**:
+- Establish invisible horizontal lines
+- Align all text blocks to grid
+- Typical spacing: 5mm or 10mm increments
+- Creates visual rhythm and professionalism
+
+**Column Grid**:
+- Divide width into equal units (12, 16, or 24 units common)
+- Elements span multiple units
+- Allows flexible but structured layouts
+
+**Example 12-Column Grid**:
+```
+| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |10 |11 |12 |
+|-------|-------|-------|-------|-------|-------|
+| Block spanning 6 units| Block spanning 6 units|
+| Block spanning 12 units |
+| 4 units | 8 units (emphasized) |
+```
+
+**LaTeX Grid Helper**:
+```latex
+% Debug grid overlay (remove for final version)
+\usepackage{tikz}
+\AddToShipoutPictureBG{
+ \begin{tikzpicture}[remember picture, overlay]
+ \draw[help lines, step=5cm, very thin, gray!30]
+ (current page.south west) grid (current page.north east);
+ \end{tikzpicture}
+}
+```
+
+## Visual Flow and Reading Patterns
+
+### Z-Pattern (Landscape Posters)
+
+Viewers' eyes naturally follow a Z-shape on landscape layouts:
+
+```
+START → → → → → → → → → → → → → → TOP RIGHT
+ ↓ ↓
+ ↓ ↓
+MIDDLE LEFT → → → → → → → → → MIDDLE RIGHT
+ ↓ ↓
+ ↓ ↓
+BOTTOM LEFT → → → → → → → → → → → → END
+```
+
+**Design Strategy**:
+1. **Top-left**: Title and introduction (entry point)
+2. **Top-right**: Institution logo, QR code
+3. **Center**: Key result or main figure
+4. **Bottom-right**: Conclusions and contact (exit point)
+
+**Content Placement**:
+- Critical information at corners and center
+- Support information along diagonal paths
+- Use arrows or visual cues to reinforce flow
+
+### F-Pattern (Portrait Posters)
+
+Portrait posters follow F-shaped eye movement:
+
+```
+TITLE → → → → → → → → → → → →
+ ↓
+INTRO → → → →
+ ↓
+METHODS
+ ↓
+RESULTS → → →
+ ↓
+RESULTS (cont.)
+ ↓
+DISCUSSION
+ ↓
+CONCLUSIONS → → → → → → → → →
+```
+
+**Design Strategy**:
+1. Place engaging content at top-left
+2. Use section headers to create horizontal scan points
+3. Most important figures in upper-middle area
+4. Conclusions visible without scrolling (if digital) or from distance
+
+### Gutenberg Diagram
+
+Classic newspaper layout principle:
+
+```
++------------------+------------------+
+| PRIMARY AREA | STRONG FALLOW |
+| (most attention) | (moderate attn) |
+| ↓ | ↓ |
++------------------+------------------+
+| WEAK FALLOW | TERMINAL AREA |
+| (least attention)| (final resting) |
+| | ↑ |
++------------------+------------------+
+```
+
+**Optimization**:
+- **Primary Area** (top-left): Introduction, problem statement
+- **Strong Fallow** (top-right): Supporting figure, logo
+- **Weak Fallow** (bottom-left): Methods details, references
+- **Terminal Area** (bottom-right): Conclusions, take-home message
+
+### Directional Cues
+
+Guide viewers explicitly through content:
+
+**Numerical Ordering**:
+```latex
+\block{❶ Introduction}{...}
+\block{❷ Methods}{...}
+\block{❸ Results}{...}
+\block{❹ Conclusions}{...}
+```
+
+**Arrows and Lines**:
+```latex
+\begin{tikzpicture}
+ \node[block] (intro) {Introduction};
+ \node[block, right=of intro] (methods) {Methods};
+ \node[block, right=of methods] (results) {Results};
+ \draw[->, thick, blue] (intro) -- (methods);
+ \draw[->, thick, blue] (methods) -- (results);
+\end{tikzpicture}
+```
+
+**Color Progression**:
+- Light to dark shades indicating progression
+- Cool to warm colors showing importance increase
+- Consistent color for related sections
+
+## Spatial Organization Strategies
+
+### Header/Title Area
+
+**Typical Size**: 10-15% of total poster height
+
+**Essential Elements**:
+- **Title**: Concise, descriptive (10-15 words max)
+- **Authors**: Full names, presenting author emphasized
+- **Affiliations**: Institutions, departments
+- **Logos**: University, funding agencies (2-4 max)
+- **Conference info** (optional): Name, date, location
+
+**Layout Options**:
+
+**Centered**:
+```
++----------------------------------------+
+| [Logo] POSTER TITLE HERE [Logo]|
+| Authors and Affiliations |
+| email@university.edu |
++----------------------------------------+
+```
+
+**Left-aligned**:
+```
++----------------------------------------+
+| POSTER TITLE HERE [Logo] |
+| Authors and Affiliations [Logo] |
++----------------------------------------+
+```
+
+**Split**:
+```
++----------------------------------------+
+| [Logo] | Authors & Affil. |
+| POSTER TITLE | email@edu |
+| | [QR Code] |
++----------------------------------------+
+```
+
+**LaTeX Header (beamerposter)**:
+```latex
+\begin{columns}[T]
+ \begin{column}{.15\linewidth}
+ \includegraphics[width=\linewidth]{logo1.pdf}
+ \end{column}
+
+ \begin{column}{.7\linewidth}
+ \centering
+ {\VeryHuge\textbf{Your Research Title Here}}\\[0.5cm]
+ {\Large Author One\textsuperscript{1}, Author Two\textsuperscript{2}}\\[0.3cm]
+ {\normalsize \textsuperscript{1}University A, \textsuperscript{2}University B}
+ \end{column}
+
+ \begin{column}{.15\linewidth}
+ \includegraphics[width=\linewidth]{logo2.pdf}
+ \end{column}
+\end{columns}
+```
+
+### Main Content Area
+
+**Typical Size**: 70-80% of total poster
+
+**Organization Principles**:
+
+**1. Top-to-Bottom Flow**:
+```
+Introduction/Background
+ ↓
+Methods/Approach
+ ↓
+Results (Multiple panels)
+ ↓
+Discussion/Conclusions
+```
+
+**2. Left-to-Right, Top-to-Bottom**:
+```
+[Intro] [Results 1] [Results 3]
+[Methods] [Results 2] [Discussion]
+```
+
+**3. Centralized Main Figure**:
+```
+[Intro] [Main Figure] [Discussion]
+[Methods] (center) [Conclusions]
+```
+
+**Section Sizing**:
+- Introduction: 10-15% of content area
+- Methods: 15-20%
+- Results: 40-50% (largest section)
+- Discussion/Conclusions: 15-20%
+
+### Footer Area
+
+**Typical Size**: 5-10% of total poster height
+
+**Common Elements**:
+- References (abbreviated, 5-10 key citations)
+- Acknowledgments (funding, collaborators)
+- Contact information
+- QR codes (paper, code, data)
+- Social media handles (optional)
+- Conference hashtags
+
+**Layout**:
+```
++----------------------------------------+
+| References: 1. Author (2023) ... | 📱 |
+| Acknowledgments: Funded by ... | QR |
+| Contact: name@email.edu | Code |
++----------------------------------------+
+```
+
+**LaTeX Footer**:
+```latex
+\begin{block}{}
+ \footnotesize
+ \begin{columns}[T]
+ \begin{column}{0.7\linewidth}
+ \textbf{References}
+ \begin{enumerate}
+ \item Author A et al. (2023). Journal. doi:...
+ \item Author B et al. (2024). Conference.
+ \end{enumerate}
+
+ \textbf{Acknowledgments}
+ This work was supported by Grant XYZ.
+
+ \textbf{Contact}: firstname.lastname@university.edu
+ \end{column}
+
+ \begin{column}{0.25\linewidth}
+ \centering
+ \qrcode[height=3cm]{https://doi.org/10.1234/paper}\\
+ \tiny Scan for full paper
+ \end{column}
+ \end{columns}
+\end{block}
+```
+
+## White Space Management
+
+### Margins and Padding
+
+**Outer Margins**:
+- Minimum: 2-3cm (0.75-1 inch)
+- Recommended: 3-5cm (1-2 inches)
+- Prevents edge trimming issues in printing
+- Provides visual breathing room
+
+**Inner Spacing**:
+- Between columns: 1-2cm
+- Between blocks: 1-2cm
+- Inside blocks (padding): 0.5-1.5cm
+- Around figures: 0.5-1cm
+
+**LaTeX Margin Control**:
+```latex
+% beamerposter
+\usepackage[size=a0, scale=1.4]{beamerposter}
+\setbeamersize{text margin left=3cm, text margin right=3cm}
+
+% tikzposter
+\documentclass[..., margin=30mm, innermargin=15mm]{tikzposter}
+
+% baposter
+\begin{poster}{
+ colspacing=1.5em, % Horizontal spacing
+ ...
+}
+```
+
+### Active White Space vs. Passive White Space
+
+**Active White Space**: Intentionally placed for specific purpose
+- Around key figures (draws attention)
+- Between major sections (creates clear separation)
+- Above/below titles (emphasizes hierarchy)
+
+**Passive White Space**: Natural result of layout
+- Margins and borders
+- Line spacing
+- Gaps between elements
+
+**Balance**: Aim for 30-40% white space overall
+
+### Visual Breathing Room
+
+**Avoid**:
+- ❌ Elements touching edges
+- ❌ Text blocks directly adjacent
+- ❌ Figures without surrounding space
+- ❌ Cramped, claustrophobic feel
+
+**Implement**:
+- ✅ Clear separation between sections
+- ✅ Space around focal points
+- ✅ Generous padding inside boxes
+- ✅ Balanced distribution of content
+
+## Block and Box Design
+
+### Block Types and Functions
+
+**Title Block**: Poster header
+- Full width, top position
+- High visual weight
+- Contains identifying information
+
+**Content Blocks**: Main sections
+- Column-based or free-floating
+- Hierarchical sizing (larger = more important)
+- Clear headers and structure
+
+**Callout Blocks**: Emphasized information
+- Key findings or quotes
+- Different color or style
+- Visually distinct
+
+**Reference Blocks**: Supporting info
+- Footer position
+- Smaller, less prominent
+- Informational, not critical
+
+### Block Styling Options
+
+**Border Styles**:
+```latex
+% Rounded corners (friendly, modern)
+\begin{block}{Title}
+ % beamerposter with rounded
+ \setbeamertemplate{block begin}[rounded]
+
+% Sharp corners (formal, traditional)
+ \setbeamertemplate{block begin}[default]
+
+% No border (minimal, clean)
+ \setbeamercolor{block title}{bg=white, fg=black}
+ \setbeamercolor{block body}{bg=white, fg=black}
+```
+
+**Shadow and Depth**:
+```latex
+% tikzposter shadow
+\tikzset{
+ block/.append style={
+ drop shadow={shadow xshift=2mm, shadow yshift=-2mm}
+ }
+}
+
+% tcolorbox drop shadow
+\usepackage{tcolorbox}
+\begin{tcolorbox}[enhanced, drop shadow]
+ Content with shadow
+\end{tcolorbox}
+```
+
+**Background Shading**:
+- **Solid**: Clean, professional
+- **Gradient**: Modern, dynamic
+- **Transparent**: Layered, sophisticated
+
+### Relationship and Grouping
+
+**Visual Grouping Techniques**:
+
+**1. Proximity**: Place related items close
+```
+[Intro Text]
+[Related Figure]
+ ↓ grouped
+[Methods Text]
+[Methods Diagram]
+```
+
+**2. Color Coding**: Use color to show relationships
+- All "Methods" blocks in blue
+- All "Results" blocks in green
+- Conclusions in orange
+
+**3. Borders**: Enclose related elements
+```latex
+\begin{tcolorbox}[title=Experimental Pipeline]
+ \begin{enumerate}
+ \item Sample preparation
+ \item Data collection
+ \item Analysis
+ \end{enumerate}
+\end{tcolorbox}
+```
+
+**4. Alignment**: Aligned elements appear related
+```
+[Block A Left-aligned]
+[Block B Left-aligned]
+ vs.
+[Block C Centered]
+```
+
+## Responsive and Adaptive Layouts
+
+### Designing for Different Poster Sizes
+
+**Scaling Strategy**:
+- Design for target size (e.g., A0)
+- Test at other common sizes (A1, 36×48")
+- Use relative sizing (percentages, not absolute)
+
+**Font Scaling**:
+```latex
+% Scale fonts proportionally
+\usepackage[size=a0, scale=1.4]{beamerposter} % A0 at 140%
+\usepackage[size=a1, scale=1.0]{beamerposter} % A1 at 100%
+
+% Or define sizes relatively
+\newcommand{\titlesize}{\fontsize{96}{110}\selectfont}
+\newcommand{\headersize}{\fontsize{60}{72}\selectfont}
+```
+
+**Content Adaptation**:
+- **A0 (full)**: All content, 5-6 figures
+- **A1 (reduced)**: Condense to 3-4 main figures
+- **A2 (compact)**: Key finding only, 1-2 figures
+
+### Portrait vs. Landscape Orientation
+
+**Portrait (Vertical)**:
+- **Pros**: Traditional, more common stands, natural reading flow
+- **Cons**: Less width for figures, can feel cramped
+- **Best for**: Text-heavy posters, multi-section flow, conferences
+
+**Landscape (Horizontal)**:
+- **Pros**: Wide figures, natural for timelines, modern feel
+- **Cons**: Harder to read from distance, less common
+- **Best for**: Timelines, wide data visualizations, non-traditional venues
+
+**LaTeX Orientation**:
+```latex
+% Portrait
+\usepackage[size=a0, orientation=portrait]{beamerposter}
+\documentclass[..., portrait]{tikzposter}
+
+% Landscape
+\usepackage[size=a0, orientation=landscape]{beamerposter}
+\documentclass[..., landscape]{tikzposter}
+```
+
+## Layout Patterns by Research Type
+
+### Experimental Research
+
+**Typical Flow**:
+```
+[Title and Authors]
++---------------------------+
+| Background | Methods |
+| Problem | (Diagram) |
++---------------------------+
+| Results (Figure 1) |
+| Results (Figure 2) |
++---------------------------+
+| Discussion | Conclusions |
+| Limitations| Future Work |
++---------------------------+
+[References and Contact]
+```
+
+**Emphasis**: Visual results, clear methodology
+
+### Computational/Modeling
+
+**Typical Flow**:
+```
+[Title and Authors]
++---------------------------+
+| Motivation | Algorithm |
+| | (Flowchart) |
++---------------------------+
+| Implementation Details |
++---------------------------+
+| Results | Results |
+| (Benchmark)| (Comparison) |
++---------------------------+
+| Conclusions| Code QR |
++---------------------------+
+[GitHub, Docker, Documentation]
+```
+
+**Emphasis**: Algorithm clarity, reproducibility
+
+### Clinical/Medical
+
+**Typical Flow**:
+```
+[Title and Authors]
++---------------------------+
+| Background | Methods |
+| Clinical | - Design |
+| Need | - Population |
+| | - Outcomes |
++---------------------------+
+| Results | |
+| (Primary Outcome) | Key|
+| | Fig|
++---------------------------+
+| Discussion | Clinical |
+| | Implications |
++---------------------------+
+[Trial Registration, Ethics, Funding]
+```
+
+**Emphasis**: Patient outcomes, clinical relevance
+
+### Review/Meta-Analysis
+
+**Typical Flow**:
+```
+[Title and Authors]
++---------------------------+
+| Research | Search |
+| Question | Strategy |
+| | (PRISMA Flow) |
++---------------------------+
+| Included Studies Overview |
++---------------------------+
+| Findings | Findings |
+| (Theme 1) | (Theme 2) |
++---------------------------+
+| Synthesis | Gaps & |
+| | Future Needs |
++---------------------------+
+[Systematic Review Registration]
+```
+
+**Emphasis**: Comprehensive coverage, synthesis
+
+## Layout Testing and Iteration
+
+### Design Iteration Process
+
+**1. Sketch Phase**:
+- Hand-draw rough layout
+- Experiment with different arrangements
+- Mark primary, secondary, tertiary content
+
+**2. Digital Mockup**:
+- Create low-fidelity version in LaTeX
+- Use placeholder text/figures
+- Test different grid systems
+
+**3. Content Integration**:
+- Replace placeholders with actual content
+- Adjust spacing and sizing
+- Refine visual hierarchy
+
+**4. Refinement**:
+- Fine-tune alignment
+- Balance visual weight
+- Optimize white space
+
+**5. Testing**:
+- Print at reduced scale (25%)
+- View from distance
+- Get colleague feedback
+
+### Feedback Checklist
+
+**Visual Balance**:
+- [ ] No single area feels too heavy or too light
+- [ ] Color distributed evenly across poster
+- [ ] Text and figures balanced
+- [ ] White space well-distributed
+
+**Hierarchy and Flow**:
+- [ ] Clear entry point (title visible)
+- [ ] Logical reading path
+- [ ] Section relationships clear
+- [ ] Conclusions easy to find
+
+**Technical Execution**:
+- [ ] Consistent alignment
+- [ ] Uniform spacing
+- [ ] Professional appearance
+- [ ] No awkward breaks or orphans
+
+## Common Layout Mistakes
+
+**1. Unbalanced Visual Weight**
+- ❌ All content on left, empty right side
+- ❌ Large figure dominating, tiny text elsewhere
+- ✅ Distribute content evenly across poster
+
+**2. Inconsistent Spacing**
+- ❌ Random gaps between blocks
+- ❌ Elements touching in some places, spaced in others
+- ✅ Use consistent spacing values throughout
+
+**3. Poor Column Width**
+- ❌ Extremely narrow columns (hard to read)
+- ❌ Very wide columns (eye tracking difficult)
+- ✅ Optimal: 40-80 characters per line
+
+**4. Ignoring Grid**
+- ❌ Random placement of elements
+- ❌ Misaligned blocks
+- ✅ Align to invisible grid, consistent positioning
+
+**5. Overcrowding**
+- ❌ No white space, cramped feel
+- ❌ Trying to fit too much content
+- ✅ Generous margins, clear separation
+
+## Conclusion
+
+Effective layout design:
+- Uses appropriate grid systems (2, 3, or 4 columns)
+- Follows natural eye movement patterns
+- Maintains visual balance and hierarchy
+- Provides adequate white space
+- Groups related content clearly
+- Adapts to different poster sizes and orientations
+
+Remember: Layout should support content, not compete with it. When viewers focus on your research rather than your design, you've succeeded.
+
diff --git a/scientific-skills/research-grants/README.md b/scientific-skills/research-grants/README.md
new file mode 100644
index 0000000..a27e8b7
--- /dev/null
+++ b/scientific-skills/research-grants/README.md
@@ -0,0 +1,285 @@
+# Research Grants Skill
+
+## Overview
+
+Comprehensive skill for writing competitive research grant proposals focused on four major U.S. funding agencies:
+- **NSF** (National Science Foundation)
+- **NIH** (National Institutes of Health)
+- **DOE** (Department of Energy)
+- **DARPA** (Defense Advanced Research Projects Agency)
+
+## What This Skill Provides
+
+### Agency-Specific Guidance
+
+Detailed reference materials for each funding agency including:
+- Mission and priorities
+- Review criteria and scoring
+- Proposal structure and page limits
+- Budget requirements
+- Submission processes
+- Tips for competitive applications
+
+### Core Components
+
+- **Specific Aims Pages** (NIH): Template and detailed guide for the critical 1-page aims page
+- **Project Summaries** (NSF): Template for the required Overview, Intellectual Merit, and Broader Impacts
+- **Broader Impacts**: Comprehensive strategies for NSF's equally-weighted review criterion
+- **Budget Justification**: Templates and examples for personnel, equipment, travel, and supplies
+- **Review Criteria**: Understanding what reviewers look for at each agency
+
+### Templates
+
+Ready-to-use templates for:
+- NSF Project Summary
+- NIH Specific Aims Page
+- Budget Justifications
+- (Additional templates in development)
+
+## How to Use This Skill
+
+### Quick Start
+
+When writing a grant proposal, specify the agency and grant type:
+
+```
+> Help me write an NSF proposal for computational biology research
+> I need to draft NIH R01 Specific Aims for my cancer research project
+> What should I include in a DOE ARPA-E concept paper?
+> I'm applying for a DARPA program - help me structure the proposal
+```
+
+### Detailed Guidance
+
+For in-depth help on specific components:
+
+```
+> Help me write compelling broader impacts for my NSF proposal
+> Review my NIH Specific Aims page
+> What should I include in my budget justification?
+> How do I respond to reviewer comments in an NIH resubmission?
+```
+
+### Agency Comparison
+
+```
+> What are the key differences between NSF and NIH proposals?
+> Should I apply to DOE or DARPA for my energy technology project?
+```
+
+## Key Features
+
+### NSF Proposals
+
+- **Intellectual Merit + Broader Impacts** (equally weighted)
+- Strategies for substantive, measurable broader impacts
+- Integration of research and education
+- Broadening participation in STEM
+- 15-page project description limits (most programs)
+
+### NIH Proposals
+
+- **Specific Aims Page**: The most critical page (detailed 1-page guide included)
+- **Research Strategy**: Significance, Innovation, Approach sections
+- **Preliminary Data**: Essential for R01 applications
+- Rigor and reproducibility requirements
+- Modular vs. detailed budgets
+- Resubmission strategies (A1 applications)
+
+### DOE Proposals
+
+- **Energy relevance** and alignment with DOE mission
+- **Technology readiness levels** (TRLs)
+- National laboratory collaborations
+- Cost sharing requirements (especially ARPA-E)
+- Commercialization pathways
+- User facilities access
+
+### DARPA Proposals
+
+- **DARPA-hard problems**: High-risk, high-reward
+- **Heilmeier Catechism**: The 8 critical questions
+- Program Manager engagement (critical!)
+- Phase-based structure with milestones
+- Technology transition planning
+- Demonstration and prototypes
+
+## Reference Materials
+
+### Agency Guidelines
+- `references/nsf_guidelines.md` - Comprehensive NSF guidance
+- `references/nih_guidelines.md` - NIH mechanisms and review criteria
+- `references/doe_guidelines.md` - DOE offices and programs
+- `references/darpa_guidelines.md` - DARPA structure and strategy
+
+### Specialized Guides
+- `references/broader_impacts.md` - NSF broader impacts strategies
+- `references/specific_aims_guide.md` - NIH Specific Aims page mastery
+- `references/budget_preparation.md` - Budget development (coming soon)
+- `references/review_criteria.md` - Comparative review criteria (coming soon)
+- `references/timeline_planning.md` - Project management (coming soon)
+
+### Templates
+- `assets/nsf_project_summary_template.md`
+- `assets/nih_specific_aims_template.md`
+- `assets/budget_justification_template.md`
+
+## Success Metrics
+
+Typical success rates by agency:
+- **NSF**: 15-30% (varies by program)
+- **NIH R01**: ~20% overall (~27% for Early Stage Investigators)
+- **DOE Office of Science**: 20-40% (varies by program)
+- **ARPA-E**: 2-5% (concept papers to awards)
+- **DARPA**: Highly variable by program
+
+## Common Use Cases
+
+### First-Time Applicants
+```
+> I've never written a grant before. Help me understand NSF proposal structure.
+> What are the most common mistakes in first NIH R01 applications?
+```
+
+### Experienced Investigators
+```
+> Help me strengthen the innovation section for my NIH resubmission
+> I need to address broader impacts more substantively for NSF
+> What's the best way to show technology transition for DARPA?
+```
+
+### Career Development
+```
+> Help me write a competitive NSF CAREER proposal
+> What should I emphasize in an NIH K99/R00 application?
+```
+
+### Multi-Agency Strategy
+```
+> Should I submit this to NSF or NIH?
+> Can I submit similar proposals to DOE and DARPA?
+```
+
+## Best Practices
+
+### Start Early
+- NSF/NIH proposals: Start 3-6 months before deadline
+- DOE/DARPA proposals: 4-6 months (especially if involving national labs)
+
+### Get Feedback
+- Mock review sessions
+- Colleagues in and outside your field
+- Institutional grant support offices
+- Program officers (when appropriate)
+
+### Understand Review Criteria
+- NSF: Intellectual Merit + Broader Impacts (equal weight)
+- NIH: Significance, Investigator, Innovation, Approach, Environment (scored 1-9)
+- DOE: Technical merit, qualifications, budget, relevance
+- DARPA: Innovation, impact, team, feasibility, transition
+
+### Common Success Factors
+
+✅ Clear, compelling significance and innovation
+✅ Strong preliminary data (NIH, DOE)
+✅ Detailed, rigorous methodology
+✅ Realistic timeline and budget
+✅ Specific, measurable outcomes
+✅ Strong team with relevant expertise
+✅ Integration of broader impacts (NSF)
+✅ Technology transition plan (DOE, DARPA)
+
+## Integration with Other Skills
+
+This skill works well with:
+- **Scientific Writing**: For clear, compelling prose
+- **Literature Review**: For background sections
+- **Research Lookup**: For finding relevant citations
+- **Peer Review**: For self-assessment before submission
+
+## Updates and Additions
+
+This skill is continuously updated with:
+- Current agency priorities
+- Recent policy changes
+- New funding mechanisms
+- Additional templates and examples
+
+### Coming Soon
+- More budget examples
+- Timeline templates
+- Collaboration letter templates
+- Data management plan templates
+- Facilities and equipment description templates
+
+## Tips for Maximum Effectiveness
+
+### For NSF Proposals
+1. Start with Specific Aims/Objectives (even though not required)
+2. Develop broader impacts with same rigor as research plan
+3. Use figures and diagrams liberally (make it skimmable)
+4. Address both review criteria explicitly
+5. Get feedback from outside your immediate field
+
+### For NIH Proposals
+1. Perfect your Specific Aims page first (10+ drafts)
+2. Include substantial preliminary data
+3. Address rigor and reproducibility explicitly
+4. Identify potential problems proactively with alternatives
+5. Make sure your aims are independent but synergistic
+
+### For DOE Proposals
+1. Emphasize energy relevance and impact
+2. Include quantitative metrics (cost, efficiency, emissions)
+3. Develop pathway to deployment or commercialization
+4. Consider national laboratory partnerships
+5. Address technology readiness levels
+
+### For DARPA Proposals
+1. Contact the Program Manager early (essential!)
+2. Attend Proposers Day events
+3. Focus on breakthrough innovation (10x, not 10%)
+4. Answer the Heilmeier Catechism explicitly
+5. Develop clear transition strategy
+
+## Resources Beyond This Skill
+
+### Official Resources
+- NSF: https://www.nsf.gov/funding/
+- NIH: https://grants.nih.gov/
+- DOE: https://science.osti.gov/grants/
+- DARPA: https://www.darpa.mil/work-with-us/opportunities
+
+### Institutional Resources
+- Your institution's Office of Sponsored Research
+- Grant writing workshops
+- Internal review programs
+- Successful proposal archives
+
+### Professional Development
+- Grant writing courses and webinars
+- Agency-specific guidance documents
+- Professional society resources
+- Mentoring networks
+
+## Questions or Issues?
+
+This skill is designed to be comprehensive but may not cover every specific situation. When using this skill:
+
+1. **Be specific** about your agency, program, and grant type
+2. **Provide context** about your research area and career stage
+3. **Ask follow-up questions** for clarification
+4. **Request examples** for specific sections you're working on
+
+## Version History
+
+- **v1.0** (January 2025): Initial release with NSF, NIH, DOE, DARPA guidance
+- Comprehensive reference materials for all four agencies
+- Templates for key proposal components
+- Specific Aims and Broader Impacts detailed guides
+
+---
+
+**Remember**: Grant writing is both an art and a science. This skill provides the frameworks, strategies, and best practices—but your unique research vision, preliminary data, and team expertise are what will ultimately win funding. Start early, seek feedback, revise extensively, and don't be discouraged by rejection. Even the most successful scientists face many declined proposals before achieving funding success.
+
+Good luck with your proposals! 🎯
diff --git a/scientific-skills/research-grants/SKILL.md b/scientific-skills/research-grants/SKILL.md
new file mode 100644
index 0000000..a70d7f0
--- /dev/null
+++ b/scientific-skills/research-grants/SKILL.md
@@ -0,0 +1,935 @@
+---
+name: research-grants
+description: "Write competitive research proposals for NSF, NIH, DOE, and DARPA. Agency-specific formatting, review criteria, budget preparation, broader impacts, significance statements, innovation narratives, and compliance with submission requirements."
+allowed-tools: [Read, Write, Edit, Bash]
+---
+
+# Research Grant Writing
+
+## Overview
+
+Research grant writing is the process of developing competitive funding proposals for federal agencies and foundations. Master agency-specific requirements, review criteria, narrative structure, budget preparation, and compliance for NSF (National Science Foundation), NIH (National Institutes of Health), DOE (Department of Energy), and DARPA (Defense Advanced Research Projects Agency) submissions.
+
+**Critical Principle: Grants are persuasive documents that must simultaneously demonstrate scientific rigor, innovation, feasibility, and broader impact.** Each agency has distinct priorities, review criteria, formatting requirements, and strategic goals that must be addressed.
+
+## When to Use This Skill
+
+This skill should be used when:
+- Writing research proposals for NSF, NIH, DOE, or DARPA programs
+- Preparing project descriptions, specific aims, or technical narratives
+- Developing broader impacts or significance statements
+- Creating research timelines and milestone plans
+- Preparing budget justifications and personnel allocation plans
+- Responding to program solicitations or funding announcements
+- Addressing reviewer comments in resubmissions
+- Planning multi-institutional collaborative proposals
+- Writing preliminary data or feasibility sections
+- Preparing biosketches, CVs, or facilities descriptions
+
+## Visual Enhancement with Scientific Schematics
+
+**⚠️ MANDATORY: Every research grant proposal MUST include at least 1-2 AI-generated figures using the scientific-schematics skill.**
+
+This is not optional. Grant proposals without visual elements are incomplete and less competitive. Before finalizing any document:
+1. Generate at minimum ONE schematic or diagram (e.g., project timeline, methodology flowchart, or conceptual framework)
+2. Prefer 2-3 figures for comprehensive proposals (research workflow, Gantt chart, preliminary data visualization)
+
+**How to generate figures:**
+- Use the **scientific-schematics** skill to generate AI-powered publication-quality diagrams
+- Simply describe your desired diagram in natural language
+- Nano Banana Pro will automatically generate, review, and refine the schematic
+
+**How to generate schematics:**
+```bash
+python scripts/generate_schematic.py "your diagram description" -o figures/output.png
+```
+
+The AI will automatically:
+- Create publication-quality images with proper formatting
+- Review and refine through multiple iterations
+- Ensure accessibility (colorblind-friendly, high contrast)
+- Save outputs in the figures/ directory
+
+**When to add schematics:**
+- Research methodology and workflow diagrams
+- Project timeline Gantt charts
+- Conceptual framework illustrations
+- System architecture diagrams (for technical proposals)
+- Experimental design flowcharts
+- Broader impacts activity diagrams
+- Collaboration network diagrams
+- Any complex concept that benefits from visualization
+
+For detailed guidance on creating schematics, refer to the scientific-schematics skill documentation.
+
+---
+
+## Agency-Specific Overview
+
+### NSF (National Science Foundation)
+**Mission**: Promote the progress of science and advance national health, prosperity, and welfare
+
+**Key Features**:
+- Intellectual Merit + Broader Impacts (equally weighted)
+- 15-page project description limit (most programs)
+- Emphasis on education, diversity, and societal benefit
+- Collaborative research encouraged
+- Open data and open science emphasis
+- Merit review process with panel + ad hoc reviewers
+
+### NIH (National Institutes of Health)
+**Mission**: Enhance health, lengthen life, and reduce illness and disability
+
+**Key Features**:
+- Specific Aims (1 page) + Research Strategy (12 pages for R01)
+- Significance, Innovation, Approach as core review criteria
+- Preliminary data typically required for R01s
+- Emphasis on rigor, reproducibility, and clinical relevance
+- Modular budgets ($250K increments) for most R01s
+- Multiple resubmission opportunities
+
+### DOE (Department of Energy)
+**Mission**: Ensure America's security and prosperity through energy, environmental, and nuclear challenges
+
+**Key Features**:
+- Focus on energy, climate, computational science, basic energy sciences
+- Often requires cost sharing or industry partnerships
+- Emphasis on national laboratory collaboration
+- Strong computational and experimental integration
+- Energy innovation and commercialization pathways
+- Varies by office (ARPA-E, Office of Science, EERE, etc.)
+
+### DARPA (Defense Advanced Research Projects Agency)
+**Mission**: Make pivotal investments in breakthrough technologies for national security
+
+**Key Features**:
+- High-risk, high-reward transformative research
+- Focus on "DARPA-hard" problems (what if true, who cares)
+- Emphasis on prototypes, demonstrations, and transition paths
+- Often requires multiple phases (feasibility, development, demonstration)
+- Strong project management and milestone tracking
+- Teaming and collaboration often required
+- Varies dramatically by program manager and BAA (Broad Agency Announcement)
+
+## Core Components of Research Proposals
+
+### 1. Executive Summary / Project Summary / Abstract
+
+Every proposal needs a concise overview that communicates the essential elements of the research to both technical reviewers and program officers.
+
+**Purpose**: Provide a standalone summary that captures the research vision, significance, and approach
+
+**Length**:
+- NSF: 1 page (Project Summary with separate Overview, Intellectual Merit, Broader Impacts)
+- NIH: 30 lines (Project Summary/Abstract)
+- DOE: Varies (typically 1 page)
+- DARPA: Varies (often 1-2 pages)
+
+**Essential Elements**:
+- Clear statement of the problem or research question
+- Why this problem matters (significance, urgency, impact)
+- Novel approach or innovation
+- Expected outcomes and deliverables
+- Qualifications of the team
+- Broader impacts or translational pathway
+
+**Writing Strategy**:
+- Open with a compelling hook that establishes importance
+- Use accessible language (avoid jargon in opening sentences)
+- State specific, measurable objectives
+- Convey enthusiasm and confidence
+- Ensure every sentence adds value (no filler)
+- End with transformative vision or impact statement
+
+**Common Mistakes to Avoid**:
+- Being too technical or detailed (save for project description)
+- Failing to articulate "why now" or "why this team"
+- Vague objectives or outcomes
+- Neglecting broader impacts or significance
+- Generic statements that could apply to any proposal
+
+### 2. Project Description / Research Strategy
+
+The core technical narrative that presents the research plan in detail.
+
+**Structure Varies by Agency:**
+
+**NSF Project Description** (typically 15 pages):
+- Introduction and background
+- Research objectives and questions
+- Preliminary results (if applicable)
+- Research plan and methodology
+- Timeline and milestones
+- Broader impacts (integrated throughout or separate section)
+- Prior NSF support (if applicable)
+
+**NIH Research Strategy** (12 pages for R01):
+- Significance (why the problem matters)
+- Innovation (what's novel and transformative)
+- Approach (detailed research plan)
+ - Preliminary data
+ - Research design and methods
+ - Expected outcomes
+ - Potential problems and alternative approaches
+
+**DOE Project Narrative** (varies):
+- Background and significance
+- Technical approach and innovation
+- Qualifications and experience
+- Facilities and resources
+- Project management and timeline
+
+**DARPA Technical Volume** (varies):
+- Technical challenge and innovation
+- Approach and methodology
+- Schedule and milestones
+- Deliverables and metrics
+- Team qualifications
+- Risk assessment and mitigation
+
+For detailed agency-specific guidance, refer to:
+- `references/nsf_guidelines.md`
+- `references/nih_guidelines.md`
+- `references/doe_guidelines.md`
+- `references/darpa_guidelines.md`
+
+### 3. Specific Aims (NIH) or Objectives (NSF/DOE/DARPA)
+
+Clear, testable goals that structure the research plan.
+
+**NIH Specific Aims Page** (1 page):
+- Opening paragraph: Gap in knowledge and significance
+- Long-term goal and immediate objectives
+- Central hypothesis or research question
+- 2-4 specific aims with sub-aims
+- Expected outcomes and impact
+- Payoff paragraph: Why this matters
+
+**Structure for Each Aim:**
+- Aim statement (1-2 sentences, starts with action verb)
+- Rationale (why this aim, preliminary data support)
+- Working hypothesis (testable prediction)
+- Approach summary (brief methods overview)
+- Expected outcomes and interpretation
+
+**Writing Strategy**:
+- Make aims independent but complementary
+- Ensure each aim is achievable within timeline and budget
+- Provide enough detail to judge feasibility
+- Include contingency plans or alternative approaches
+- Use parallel structure across aims
+- Clearly state what will be learned from each aim
+
+For detailed guidance, refer to `references/specific_aims_guide.md`.
+
+### 4. Broader Impacts (NSF) / Significance (NIH)
+
+Articulate the societal, educational, or translational value of the research.
+
+**NSF Broader Impacts** (critical component, equal weight with Intellectual Merit):
+
+NSF explicitly evaluates broader impacts. Address at least one of these areas:
+1. **Advancing discovery and understanding while promoting teaching, training, and learning**
+ - Integration of research and education
+ - Training of students and postdocs
+ - Curriculum development
+ - Educational materials and resources
+
+2. **Broadening participation of underrepresented groups**
+ - Recruitment and retention strategies
+ - Partnerships with minority-serving institutions
+ - Outreach to underrepresented communities
+ - Mentoring programs
+
+3. **Enhancing infrastructure for research and education**
+ - Shared facilities or instrumentation
+ - Cyberinfrastructure and data resources
+ - Community-wide tools or databases
+ - Open-source software or methods
+
+4. **Broad dissemination to enhance scientific and technological understanding**
+ - Public outreach and science communication
+ - K-12 educational programs
+ - Museum exhibits or media engagement
+ - Policy briefs or stakeholder engagement
+
+5. **Benefits to society**
+ - Economic impact or commercialization
+ - Health, environment, or national security benefits
+ - Informed decision-making
+ - Workforce development
+
+**Writing Strategy for NSF Broader Impacts**:
+- Be specific with concrete activities, not vague statements
+- Provide timeline and milestones for broader impacts activities
+- Explain how impacts will be measured and assessed
+- Connect to institutional resources and existing programs
+- Show commitment through preliminary efforts or partnerships
+- Integrate with research plan (not tacked on)
+
+**NIH Significance**:
+- Addresses important problem or critical barrier to progress
+- Improves scientific knowledge, technical capability, or clinical practice
+- Potential to lead to better outcomes, interventions, or understanding
+- Rigor of prior research in the field
+- Alignment with NIH mission and institute priorities
+
+For detailed guidance, refer to `references/broader_impacts.md`.
+
+### 5. Innovation and Transformative Potential
+
+Articulate what is novel, creative, and paradigm-shifting about the research.
+
+**Innovation Elements to Highlight**:
+- **Conceptual Innovation**: New frameworks, models, or theories
+- **Methodological Innovation**: Novel techniques, approaches, or technologies
+- **Integrative Innovation**: Combining disciplines or approaches in new ways
+- **Translational Innovation**: New pathways from discovery to application
+- **Scale Innovation**: Unprecedented scope or resolution
+
+**Writing Strategy**:
+- Clearly state what is innovative (don't assume it's obvious)
+- Explain why current approaches are insufficient
+- Describe how your innovation overcomes limitations
+- Provide evidence that innovation is feasible (preliminary data, proof-of-concept)
+- Distinguish incremental from transformative advances
+- Balance innovation with feasibility (not too risky)
+
+**Common Mistakes**:
+- Claiming novelty without demonstrating knowledge of prior work
+- Confusing "new to me" with "new to the field"
+- Over-promising without supporting evidence
+- Being too incremental (minor variation on existing work)
+- Being too speculative (no path to success)
+
+### 6. Research Approach and Methods
+
+Detailed description of how the research will be conducted.
+
+**Essential Components**:
+- Overall research design and framework
+- Detailed methods for each aim/objective
+- Sample sizes, statistical power, and analysis plans
+- Timeline and sequence of activities
+- Data collection, management, and analysis
+- Quality control and validation approaches
+- Potential problems and alternative strategies
+- Rigor and reproducibility measures
+
+**Writing Strategy**:
+- Provide enough detail for reproducibility and feasibility assessment
+- Use subheadings and figures to improve organization
+- Justify choice of methods and approaches
+- Address potential limitations proactively
+- Include preliminary data demonstrating feasibility
+- Show that you've thought through the research process
+- Balance detail with readability (use supplementary materials for extensive details)
+
+**For Experimental Research**:
+- Describe experimental design (controls, replicates, blinding)
+- Specify materials, reagents, and equipment
+- Detail data collection protocols
+- Explain statistical analysis plans
+- Address rigor and reproducibility
+
+**For Computational Research**:
+- Describe algorithms, models, and software
+- Specify datasets and validation approaches
+- Explain computational resources required
+- Address code availability and documentation
+- Describe benchmarking and performance metrics
+
+**For Clinical or Translational Research**:
+- Describe study population and recruitment
+- Detail intervention or treatment protocols
+- Explain outcome measures and assessments
+- Address regulatory approvals (IRB, IND, IDE)
+- Describe clinical trial design and monitoring
+
+For detailed methodology guidance by discipline, refer to `references/research_methods.md`.
+
+### 7. Preliminary Data and Feasibility
+
+Demonstrate that the research is achievable and the team is capable.
+
+**Purpose**:
+- Prove that the proposed approach can work
+- Show that the team has necessary expertise
+- Demonstrate access to required resources
+- Reduce perceived risk for reviewers
+- Provide foundation for proposed work
+
+**What to Include**:
+- Pilot studies or proof-of-concept results
+- Method development or optimization
+- Access to unique resources (samples, data, collaborators)
+- Relevant publications from your team
+- Preliminary models or simulations
+- Feasibility assessments or power calculations
+
+**NIH Requirements**:
+- R01 applications typically require substantial preliminary data
+- R21 applications may have less stringent requirements
+- New investigators may have less preliminary data
+- Preliminary data should directly support proposed aims
+
+**NSF Approach**:
+- Preliminary data less commonly required than NIH
+- May be important for high-risk or novel approaches
+- Can strengthen proposal for competitive programs
+
+**Writing Strategy**:
+- Present most compelling data that supports your approach
+- Clearly connect preliminary data to proposed aims
+- Acknowledge limitations and how proposed work will address them
+- Use figures and data visualizations effectively
+- Avoid over-interpreting or overstating preliminary findings
+- Show trajectory of your research program
+
+### 8. Timeline, Milestones, and Management Plan
+
+Demonstrate that the project is well-planned and achievable within the proposed timeframe.
+
+**Essential Elements**:
+- Phased timeline with clear milestones
+- Logical sequence and dependencies
+- Realistic timeframes for each activity
+- Decision points and go/no-go criteria
+- Risk mitigation strategies
+- Resource allocation across time
+- Coordination plan for multi-institutional teams
+
+**Presentation Formats**:
+- Gantt charts showing overlapping activities
+- Year-by-year breakdown of activities
+- Quarterly milestones and deliverables
+- Table of aims/tasks with timeline and personnel
+
+**Writing Strategy**:
+- Be realistic about what can be accomplished
+- Build in time for unexpected delays or setbacks
+- Show that timeline aligns with budget and personnel
+- Demonstrate understanding of regulatory timelines (IRB, IACUC)
+- Include time for dissemination and broader impacts
+- Address how progress will be monitored and assessed
+
+**DARPA Emphasis**:
+- Particularly important for DARPA proposals
+- Clear technical milestones with measurable metrics
+- Quarterly deliverables and reporting
+- Phase-based structure with exit criteria
+- Demonstration and transition planning
+
+For detailed guidance, refer to `references/timeline_planning.md`.
+
+### 9. Team Qualifications and Collaboration
+
+Demonstrate that the team has the expertise, experience, and resources to succeed.
+
+**Essential Elements**:
+- PI qualifications and relevant expertise
+- Co-I and collaborator roles and contributions
+- Track record in the research area
+- Complementary expertise across team
+- Institutional support and resources
+- Prior collaboration history (if applicable)
+- Mentoring and training plan (for students/postdocs)
+
+**Writing Strategy**:
+- Highlight most relevant publications and accomplishments
+- Clearly define roles and responsibilities
+- Show that team composition is necessary (not just convenient)
+- Demonstrate successful prior collaborations
+- Address how team will be managed and coordinated
+- Explain institutional commitment and support
+
+**Biosketches / CVs**:
+- Follow agency-specific formats (NSF, NIH, DOE, DARPA differ)
+- Highlight most relevant publications and accomplishments
+- Include synergistic activities and collaborations
+- Show trajectory and productivity
+- Address any career gaps or interruptions
+
+**Letters of Collaboration**:
+- Specific commitments and contributions
+- Demonstrates genuine partnership
+- Includes resource sharing or access agreements
+- Signed and on letterhead
+
+For detailed guidance, refer to `references/team_building.md`.
+
+### 10. Budget and Budget Justification
+
+Develop realistic budgets that align with the proposed work and agency guidelines.
+
+**Budget Categories** (typical):
+- **Personnel**: Salary and fringe for PI, co-Is, postdocs, students, staff
+- **Equipment**: Items >$5,000 (varies by agency)
+- **Travel**: Conferences, collaborations, fieldwork
+- **Materials and Supplies**: Consumables, reagents, software
+- **Other Direct Costs**: Publication costs, participant incentives, consulting
+- **Indirect Costs (F&A)**: Institutional overhead (rates vary)
+- **Subawards**: Costs for collaborating institutions
+
+**Agency-Specific Considerations**:
+
+**NSF**:
+- Full budget justification required
+- Cost sharing generally not required (but may strengthen proposal)
+- Up to 2 months summer salary for faculty
+- Graduate student support encouraged
+
+**NIH**:
+- Modular budgets for ≤$250K direct costs per year (R01)
+- Detailed budgets for >$250K or complex awards
+- Salary cap applies (~$221,900 for 2024)
+- Limited to 1 month (8.33% FTE) for most PIs
+
+**DOE**:
+- Often requires cost sharing (especially ARPA-E)
+- Detailed budget with quarterly breakdown
+- Requires institutional commitment letters
+- National laboratory collaboration budgets separate
+
+**DARPA**:
+- Detailed budgets by phase and task
+- Requires supporting cost data for large procurements
+- Often requires cost-plus or firm-fixed-price structures
+- Travel budget for program meetings
+
+**Budget Justification Writing**:
+- Justify each line item in terms of the research plan
+- Explain effort percentages for personnel
+- Describe specific equipment and why necessary
+- Justify travel (conferences, collaborations)
+- Explain consultant roles and rates
+- Show how budget aligns with timeline
+
+For detailed budget guidance, refer to `references/budget_preparation.md`.
+
+## Review Criteria by Agency
+
+Understanding how proposals are evaluated is critical for writing competitive applications.
+
+### NSF Review Criteria
+
+**Intellectual Merit** (primary):
+- What is the potential for the proposed activity to advance knowledge?
+- How well-conceived and organized is the proposed activity?
+- Is there sufficient access to resources?
+- How well-qualified is the individual, team, or institution to conduct proposed activities?
+
+**Broader Impacts** (equally important):
+- What is the potential for the proposed activity to benefit society?
+- To what extent does the proposal address broader impacts in meaningful ways?
+
+**Additional Considerations**:
+- Integration of research and education
+- Diversity and inclusion
+- Results from prior NSF support (if applicable)
+
+### NIH Review Criteria
+
+**Scored Criteria** (1-9 scale, 1 = exceptional, 9 = poor):
+
+1. **Significance**
+ - Addresses important problem or critical barrier
+ - Improves scientific knowledge, technical capability, or clinical practice
+ - Aligns with NIH mission
+
+2. **Investigator(s)**
+ - Well-suited to the project
+ - Track record of accomplishments
+ - Adequate training and expertise
+
+3. **Innovation**
+ - Novel concepts, approaches, methodologies, or interventions
+ - Challenges existing paradigms
+ - Addresses important problem in creative ways
+
+4. **Approach**
+ - Well-reasoned and appropriate
+ - Rigorous and reproducible
+ - Adequately accounts for potential problems
+ - Feasible within timeline
+
+5. **Environment**
+ - Institutional support and resources
+ - Scientific environment contributes to probability of success
+
+**Additional Review Considerations** (not scored but discussed):
+- Protections for human subjects
+- Inclusion of women, minorities, and children
+- Vertebrate animal welfare
+- Biohazards
+- Resubmission response (if applicable)
+- Budget and timeline appropriateness
+
+### DOE Review Criteria
+
+Varies by program office, but generally includes:
+- Scientific and/or technical merit
+- Appropriateness of proposed method or approach
+- Competency of personnel and adequacy of facilities
+- Reasonableness and appropriateness of budget
+- Relevance to DOE mission and program goals
+
+### DARPA Review Criteria
+
+**DARPA-specific considerations**:
+- Overall scientific and technical merit
+- Potential contribution to DARPA mission
+- Relevance to stated program goals
+- Plans and capability to accomplish technology transition
+- Qualifications and experience of proposed team
+- Realism of proposed costs and availability of funds
+
+**Key Questions DARPA Asks**:
+- **What if you succeed?** (Impact if the research works)
+- **What if you're right?** (Implications of your hypothesis)
+- **Who cares?** (Why it matters for national security)
+
+For detailed review criteria by agency, refer to `references/review_criteria.md`.
+
+## Writing Principles for Competitive Proposals
+
+### Clarity and Accessibility
+
+**Write for Multiple Audiences**:
+- Technical reviewers in your field (will scrutinize methods)
+- Reviewers in related but not identical fields (need context)
+- Program officers (look for alignment with agency goals)
+- Panel members reading 15+ proposals (need clear organization)
+
+**Strategies**:
+- Use clear section headings and subheadings
+- Start sections with overview paragraphs
+- Define technical terms and abbreviations
+- Use figures, diagrams, and tables to clarify complex ideas
+- Avoid jargon when possible; explain when necessary
+- Use topic sentences to guide readers
+
+### Persuasive Argumentation
+
+**Build a Compelling Narrative**:
+- Establish the problem and its importance
+- Show gaps in current knowledge or approaches
+- Present your solution as innovative and feasible
+- Demonstrate that you're the right team
+- Show that success will have significant impact
+
+**Structure of Persuasion**:
+1. **Hook**: Capture attention with significance
+2. **Problem**: Establish what's not known or not working
+3. **Solution**: Present your innovative approach
+4. **Evidence**: Support with preliminary data
+5. **Impact**: Show transformative potential
+6. **Team**: Demonstrate capability to deliver
+
+**Language Choices**:
+- Use active voice for clarity and confidence
+- Choose strong verbs (investigate, elucidate, discover vs. look at, study)
+- Be confident but not arrogant (avoid "obviously," "clearly")
+- Acknowledge uncertainty appropriately
+- Use precise language (avoid vague terms like "several," "various")
+
+### Visual Communication
+
+**Effective Use of Figures**:
+- Conceptual diagrams showing research framework
+- Preliminary data demonstrating feasibility
+- Timelines and Gantt charts
+- Workflow diagrams showing methodology
+- Expected results or predictions
+
+**Design Principles**:
+- Make figures self-explanatory with complete captions
+- Use consistent color schemes and fonts
+- Ensure readability (large enough fonts, clear labels)
+- Integrate figures with text (refer to specific figures)
+- Follow agency-specific formatting requirements
+
+### Addressing Risk and Feasibility
+
+**Balance Innovation and Risk**:
+- Acknowledge potential challenges
+- Provide alternative approaches
+- Show preliminary data reducing risk
+- Demonstrate expertise to handle challenges
+- Include contingency plans
+
+**Common Concerns**:
+- Too ambitious for timeline/budget
+- Technically infeasible
+- Team lacks necessary expertise
+- Preliminary data insufficient
+- Methods not adequately described
+- Lack of innovation or significance
+
+### Integration and Coherence
+
+**Ensure All Parts Align**:
+- Budget supports activities in project description
+- Timeline matches aims and milestones
+- Team composition matches required expertise
+- Broader impacts connect to research plan
+- Letters of support confirm stated collaborations
+
+**Avoid Contradictions**:
+- Preliminary data vs. stated gaps
+- Claimed expertise vs. publication record
+- Stated aims vs. actual methods
+- Budget vs. stated activities
+
+## Common Proposal Types
+
+### NSF Proposal Types
+
+- **Standard Research Proposals**: Most common, up to $500K and 5 years
+- **CAREER Awards**: Early career faculty, integrated research/education, $400-500K over 5 years
+- **Collaborative Research**: Multiple institutions, separately submitted, shared research plan
+- **RAPID**: Urgent research opportunities, up to $200K, no preliminary data required
+- **EAGER**: High-risk, high-reward exploratory research, up to $300K
+- **EArly-concept Grants for Exploratory Research (EAGER)**: Early-stage exploratory work
+
+### NIH Award Mechanisms
+
+- **R01**: Research Project Grant, $250K+ per year, 3-5 years, most common
+- **R21**: Exploratory/Developmental Research, up to $275K over 2 years, no preliminary data
+- **R03**: Small Grant Program, up to $100K over 2 years
+- **R15**: Academic Research Enhancement Awards (AREA), for primarily undergraduate institutions
+- **R35**: MIRA (Maximizing Investigators' Research Award), program-specific
+- **P01**: Program Project Grant, multi-project integrated research
+- **U01**: Research Project Cooperative Agreement, NIH involvement in conduct
+
+**Fellowship Mechanisms**:
+- **F30**: Predoctoral MD/PhD Fellowship
+- **F31**: Predoctoral Fellowship
+- **F32**: Postdoctoral Fellowship
+- **K99/R00**: Pathway to Independence Award
+- **K08**: Mentored Clinical Scientist Research Career Development Award
+
+### DOE Programs
+
+- **Office of Science**: Basic research in physical sciences, biological sciences, computing
+- **ARPA-E**: Transformative energy technologies, requires cost sharing
+- **EERE**: Applied research in renewable energy and energy efficiency
+- **National Laboratories**: Collaborative research with DOE labs
+
+### DARPA Programs
+
+- **Varies by Office**: BTO, DSO, I2O, MTO, STO, TTO
+- **Program-Specific BAAs**: Broad Agency Announcements for specific thrusts
+- **Young Faculty Award (YFA)**: Early career researchers, up to $500K
+- **Director's Fellowship**: High-risk, paradigm-shifting research
+
+For detailed program guidance, refer to `references/funding_mechanisms.md`.
+
+## Resubmission Strategies
+
+### NIH Resubmission (A1)
+
+**Introduction to Resubmission** (1 page):
+- Summarize major criticisms from previous review
+- Describe specific changes made in response
+- Use bullet points for clarity
+- Be respectful of reviewers' comments
+- Highlight substantial improvements
+
+**Strategies**:
+- Address every major criticism
+- Make changes visible (but don't use track changes in final)
+- Strengthen weak areas (preliminary data, methods, significance)
+- Consider changing aims if fundamentally flawed
+- Get external feedback before resubmitting
+- Use full 37-month window if needed for new data
+
+**When Not to Resubmit**:
+- Fundamental conceptual flaws
+- Lack of innovation or significance
+- Missing key expertise or resources
+- Extensive revisions needed (consider new submission)
+
+### NSF Resubmission
+
+**NSF allows resubmission after revision**:
+- Address reviewer concerns in revised proposal
+- No formal "introduction to resubmission" section
+- May be reviewed by same or different panel
+- Consider program officer feedback
+- May need to wait for next submission cycle
+
+For detailed resubmission guidance, refer to `references/resubmission_strategies.md`.
+
+## Common Mistakes to Avoid
+
+### Conceptual Mistakes
+
+1. **Failing to Address Review Criteria**: Not explicitly discussing significance, innovation, approach, etc.
+2. **Mismatch with Agency Mission**: Proposing research that doesn't align with agency goals
+3. **Unclear Significance**: Failing to articulate why the research matters
+4. **Insufficient Innovation**: Incremental work presented as transformative
+5. **Vague Objectives**: Goals that are not specific or measurable
+
+### Writing Mistakes
+
+1. **Poor Organization**: Lack of clear structure and flow
+2. **Excessive Jargon**: Inaccessible to broader review panel
+3. **Verbosity**: Unnecessarily complex or wordy writing
+4. **Missing Context**: Assuming reviewers know your field deeply
+5. **Inconsistent Terminology**: Using different terms for same concept
+
+### Technical Mistakes
+
+1. **Inadequate Methods**: Insufficient detail to judge feasibility
+2. **Overly Ambitious**: Too much proposed for timeline/budget
+3. **No Preliminary Data**: For mechanisms requiring demonstrated feasibility
+4. **Poor Timeline**: Unrealistic or poorly justified schedule
+5. **Misaligned Budget**: Budget doesn't support proposed activities
+
+### Formatting Mistakes
+
+1. **Exceeding Page Limits**: Automatic rejection
+2. **Wrong Font or Margins**: Non-compliant formatting
+3. **Missing Required Sections**: Incomplete application
+4. **Poor Figure Quality**: Illegible or unprofessional figures
+5. **Inconsistent Citations**: Formatting errors in references
+
+### Strategic Mistakes
+
+1. **Wrong Program or Mechanism**: Proposing to inappropriate opportunity
+2. **Weak Team**: Insufficient expertise or missing key collaborators
+3. **No Broader Impacts**: For NSF, failing to adequately address
+4. **Ignoring Program Priorities**: Not aligning with current emphasis areas
+5. **Late Submission**: Technical issues or rushed preparation
+
+## Workflow for Grant Development
+
+### Phase 1: Planning and Preparation (2-6 months before deadline)
+
+**Activities**:
+- Identify appropriate funding opportunities
+- Review program announcements and requirements
+- Consult with program officers (if appropriate)
+- Assemble team and confirm collaborations
+- Develop preliminary data (if needed)
+- Outline research plan and specific aims
+- Review successful proposals (if available)
+
+**Outputs**:
+- Selected funding opportunity
+- Assembled team with defined roles
+- Preliminary outline of specific aims
+- Gap analysis of needed preliminary data
+
+### Phase 2: Drafting (2-3 months before deadline)
+
+**Activities**:
+- Write specific aims or objectives (start here!)
+- Develop project description/research strategy
+- Create figures and data visualizations
+- Draft timeline and milestones
+- Prepare preliminary budget
+- Write broader impacts or significance sections
+- Request letters of support/collaboration
+
+**Outputs**:
+- Complete first draft of narrative sections
+- Preliminary budget with justification
+- Timeline and management plan
+- Requested letters from collaborators
+
+### Phase 3: Internal Review (1-2 months before deadline)
+
+**Activities**:
+- Circulate draft to co-investigators
+- Seek feedback from colleagues and mentors
+- Request institutional review (if required)
+- Mock review session (if possible)
+- Revise based on feedback
+- Refine budget and budget justification
+
+**Outputs**:
+- Revised draft incorporating feedback
+- Refined budget aligned with revised plan
+- Identified weaknesses and mitigation strategies
+
+### Phase 4: Finalization (2-4 weeks before deadline)
+
+**Activities**:
+- Final revisions to narrative
+- Prepare all required forms and documents
+- Finalize budget and budget justification
+- Compile biosketches, CVs, and current & pending
+- Collect letters of support
+- Prepare data management plan (if required)
+- Write project summary/abstract
+- Proofread all materials
+
+**Outputs**:
+- Complete, polished proposal
+- All required supplementary documents
+- Formatted according to agency requirements
+
+### Phase 5: Submission (1 week before deadline)
+
+**Activities**:
+- Institutional review and approval
+- Upload to submission portal
+- Verify all documents and formatting
+- Submit 24-48 hours before deadline
+- Confirm successful submission
+- Receive confirmation and proposal number
+
+**Outputs**:
+- Submitted proposal
+- Submission confirmation
+- Archived copy of all materials
+
+**Critical Tip**: Never wait until the deadline. Portals crash, files corrupt, and emergencies happen. Aim for 48 hours early.
+
+## Integration with Other Skills
+
+This skill works effectively with:
+- **Scientific Writing**: For clear, compelling prose
+- **Literature Review**: For comprehensive background sections
+- **Peer Review**: For self-assessment before submission
+- **Research Lookup**: For finding relevant citations and prior work
+- **Data Visualization**: For creating effective figures
+
+## Resources
+
+This skill includes comprehensive reference files covering specific aspects of grant writing:
+
+- `references/nsf_guidelines.md`: NSF-specific requirements, formatting, and strategies
+- `references/nih_guidelines.md`: NIH mechanisms, review criteria, and submission requirements
+- `references/doe_guidelines.md`: DOE programs, emphasis areas, and application procedures
+- `references/darpa_guidelines.md`: DARPA BAAs, program offices, and proposal strategies
+- `references/broader_impacts.md`: Strategies for compelling broader impacts statements
+- `references/specific_aims_guide.md`: Writing effective specific aims pages
+- `references/budget_preparation.md`: Budget development and justification
+- `references/review_criteria.md`: Detailed review criteria by agency
+- `references/timeline_planning.md`: Creating realistic timelines and milestones
+- `references/team_building.md`: Assembling and presenting effective teams
+- `references/resubmission_strategies.md`: Responding to reviews and revising proposals
+
+Load these references as needed when working on specific aspects of grant writing.
+
+## Templates and Assets
+
+- `assets/nsf_project_summary_template.md`: NSF project summary structure
+- `assets/nih_specific_aims_template.md`: NIH specific aims page template
+- `assets/timeline_gantt_template.md`: Timeline and Gantt chart examples
+- `assets/budget_justification_template.md`: Budget justification structure
+- `assets/biosketch_templates/`: Agency-specific biosketch formats
+
+## Scripts and Tools
+
+- `scripts/compliance_checker.py`: Verify formatting requirements
+- `scripts/budget_calculator.py`: Calculate budgets with inflation and fringe
+- `scripts/deadline_tracker.py`: Track submission deadlines and milestones
+
+---
+
+**Final Note**: Grant writing is both an art and a science. Success requires not only excellent research ideas but also clear communication, strategic positioning, and meticulous attention to detail. Start early, seek feedback, and remember that even the best researchers face rejection—persistence and revision are key to funding success.
+
diff --git a/scientific-skills/research-grants/assets/budget_justification_template.md b/scientific-skills/research-grants/assets/budget_justification_template.md
new file mode 100644
index 0000000..ac2dc42
--- /dev/null
+++ b/scientific-skills/research-grants/assets/budget_justification_template.md
@@ -0,0 +1,453 @@
+# Budget Justification Template
+
+## Overview
+
+A budget justification provides detailed explanation for each budget line item, demonstrating that costs are necessary, reasonable, and directly related to the proposed research. The justification should be detailed enough for reviewers to understand and assess cost reasonableness.
+
+**Key Principles**:
+- Justify EVERY line item in terms of the research plan
+- Explain calculations clearly
+- Show that costs are necessary for the proposed work
+- Demonstrate cost-effectiveness where possible
+- Follow agency-specific formats and requirements
+
+---
+
+## Personnel (Salaries and Wages)
+
+### Senior Personnel
+
+**Principal Investigator: [Name, Title]**
+
+**Effort**: [X] calendar months ([Y]% FTE) per year
+
+**Justification**:
+The PI will provide overall scientific leadership, supervise all research activities, mentor graduate students and postdocs, analyze data, prepare manuscripts, and report to the funding agency. The PI will be responsible for [specific activities related to aims]. [X] months of effort is necessary given the scope of the project and the PI's other commitments ([describe other activities briefly]).
+
+**Calculation**:
+- Year 1: [Annual salary] × [% effort] × [inflation factor if applicable] = $[amount]
+- Years 2-5: [include escalation if applicable]
+
+**Example**:
+*Principal Investigator: Dr. Jane Smith, Associate Professor of Biology*
+
+*Effort*: 2.5 calendar months (21% FTE) per year
+
+*Justification*: Dr. Smith will provide overall project leadership including: (1) supervising all experimental work and data analysis for Aims 1-3, (2) weekly mentoring meetings with 3 graduate students and 2 postdocs, (3) coordinating with collaborators at partner institutions, (4) analyzing multi-omics datasets and interpreting results, (5) preparing manuscripts and presenting at conferences, and (6) managing budget and reporting to NIH. 2.5 months effort is necessary for a project of this scope involving multiple aims, techniques, and personnel. Dr. Smith's remaining effort supports teaching (3 months), other research projects (4 months), and administrative duties (2.5 months).
+
+*Calculation*:
+- Year 1: $120,000 × 0.2083 = $25,000
+- Years 2-5: 3% annual increase
+
+---
+
+**Co-Investigator: [Name, Title]**
+
+**Effort**: [X] calendar months ([Y]% FTE) per year
+
+**Justification**:
+Dr. [Name] will be responsible for [specific aspects of project related to their expertise]. This includes [specific activities for which aims]. Co-I effort is essential because [expertise/resources they provide that PI lacks].
+
+**Example**:
+*Co-Investigator: Dr. Robert Johnson, Professor of Bioinformatics*
+
+*Effort*: 1 calendar month (8.3% FTE) per year
+
+*Justification*: Dr. Johnson will lead the computational analysis for Aim 1, including multi-omics data integration, machine learning-based subtype classification, and biomarker identification. His expertise in unsupervised clustering methods and experience with similar T2D datasets is essential for this aim. Specific responsibilities include: (1) developing analysis pipelines, (2) training graduate student in bioinformatics methods, (3) interpreting computational results, and (4) co-authoring manuscripts.
+
+*Calculation*: Year 1: $150,000 × 0.0833 = $12,500
+
+---
+
+### Postdoctoral Scholars
+
+**Postdoctoral Researcher (1.0 FTE)**
+
+**Justification**:
+One full-time postdoctoral researcher is essential to conduct [which experiments/aims]. The postdoc will be responsible for [specific technical activities], data analysis, and mentoring graduate students. Specific duties include: [list 4-6 key responsibilities tied to specific aims]. We will recruit a candidate with expertise in [required skills/background].
+
+**Calculation**:
+- Year 1: NIH NRSA stipend level Year 0-2 ($54,840) + fringe benefits (26%) = $69,099
+- Years 2-3: Adjusted for postdoc experience level
+- Years 4-5: Senior postdoc rate
+
+**Example**:
+*Postdoctoral Researcher (1.0 FTE)*
+
+*Justification*: One full-time postdoc is essential to execute the cellular and molecular experiments in Aims 2-3. The postdoc will: (1) generate and characterize patient-derived iPSC lines, (2) differentiate iPSCs into β-cells, hepatocytes, and adipocytes, (3) perform functional assays (insulin secretion, glucose uptake, cytokine profiling), (4) conduct proteomics sample preparation and analysis, (5) integrate cellular data with clinical outcomes, and (6) mentor graduate students in cell culture techniques. We will recruit a candidate with expertise in stem cell biology and diabetes research. The postdoc will have opportunity for career development through institutional K99/R00 preparation programs.
+
+*Calculation*:
+- Year 1: $54,840 (NIH Year 0) + $14,258 (26% fringe) = $69,098
+- Year 2: $56,784 (NIH Year 1) + $14,764 = $71,548
+- Year 3: $59,292 (NIH Year 2) + $15,416 = $74,708
+
+---
+
+### Graduate Students
+
+**Graduate Research Assistants ([Number] students)**
+
+**Justification**:
+[Number] graduate students are required to [specific roles and aims]. Each student will focus on [division of labor among students]. This project provides excellent training opportunities in [techniques/approaches], preparing students for careers in [field]. Students will be recruited from our [department/program] with preference for candidates from underrepresented groups through our partnerships with [specific programs].
+
+**Calculation**:
+- Stipend: $[amount]/student/year (following university RA rates)
+- Tuition: $[amount]/student/year
+- Total per student: $[amount]
+- Number of students: [N]
+- Total: $[amount] per year
+
+**Example**:
+*Graduate Research Assistants (3 students)*
+
+*Justification*: Three PhD students are required to execute the experimental work across all three aims:
+- Student 1 will lead Aim 1 work on multi-omics profiling and subtype classification
+- Student 2 will conduct Aim 2 mechanistic studies using patient-derived cells
+- Student 3 will perform Aim 3 treatment response analyses in cell models and humanized mice
+
+This project provides excellent interdisciplinary training in genomics, cell biology, and translational diabetes research. Students will present annually at the American Diabetes Association and co-author peer-reviewed publications. We will recruit students from our Biological Sciences PhD program, with priority recruitment from underrepresented groups through our IMSD program (NIH R25).
+
+*Calculation*:
+- Stipend: $32,000/student/year (12 months at university RA rate)
+- Tuition and fees: $18,000/student/year
+- Total per student: $50,000/year
+- 3 students × 5 years = $750,000 total
+(Note: In modular budget, include under Personnel narrative; in detailed budget, may be split between Personnel and Other)
+
+---
+
+### Research Staff
+
+**Research Technician ([Title], [% FTE])**
+
+**Justification**:
+A [full/part]-time research technician is necessary to [specific technical support]. The technician will [specific duties], allowing the PI and postdoc to focus on [higher-level activities]. Essential responsibilities include: [list key duties related to aims].
+
+**Calculation**:
+- Annual salary: $[amount] for [% FTE]
+- Fringe benefits ([%]): $[amount]
+- Total: $[amount]/year
+
+**Example**:
+*Research Technician (1.0 FTE)*
+
+*Justification*: A full-time research technician is necessary to provide technical support for high-throughput assays and maintain cell lines and mouse colonies. Specific responsibilities include: (1) maintaining iPSC, hepatocyte, and adipocyte cultures (>50 patient-derived lines), (2) performing routine insulin secretion, glucose uptake, and ELISA assays, (3) managing humanized mouse colony and performing metabolic phenotyping, (4) preparing samples for omics analysis, and (5) maintaining laboratory equipment and ordering supplies. The technician will enable the postdoc and graduate students to focus on experimental design, data analysis, and manuscript preparation.
+
+*Calculation*:
+- Year 1: $45,000 (base salary) + $11,700 (26% fringe) = $56,700
+- Years 2-5: 3% annual increase
+
+---
+
+## Fringe Benefits
+
+**Rate**: [X]% for [category of personnel]
+
+**Justification**:
+Fringe benefit rates are based on our institution's federally negotiated rates. Rates differ by personnel category:
+- Faculty: [X]%
+- Postdocs: [X]%
+- Graduate students: [X]% (if applicable)
+- Staff: [X]%
+
+Rates include [what's covered: health insurance, retirement, life insurance, etc.].
+
+**Total Fringe**: $[amount] per year
+
+---
+
+## Equipment ($5,000 or more per unit)
+
+**[Equipment Item Name and Model]**
+
+**Cost**: $[amount]
+
+**Justification**:
+This equipment is essential for [which aims/experiments]. We currently do not have access to [this capability] at our institution. The [equipment] will be used to [specific applications in the project]. [Estimated usage: hours/week or % time on this project]. This equipment will support [how many students/researchers] and will remain useful for future projects in [area].
+
+**Example**:
+*BD FACSAria III Cell Sorter with 4-laser configuration*
+
+*Cost*: $425,000
+
+*Justification*: A high-speed cell sorter is essential for Aim 2 experiments requiring isolation of specific cell populations from patient-derived heterogeneous cultures (β-cells, hepatocytes, adipocytes) for downstream proteomics and functional analysis. Our current institutional sorter has a 6-month wait time and lacks the 4-laser capability needed for our 8-color panel. This sorter will be used 15 hours/week for this project and will support 3 graduate students and 1 postdoc. The equipment will be housed in the Department of Biology core facility and will be available to 15 other laboratories after this project, ensuring long-term institutional value. Equipment cost includes installation, training, and 5-year service contract.
+
+---
+
+## Travel
+
+### Domestic Travel
+
+**Purpose**: [Conference/meeting/collaboration]
+
+**Justification**:
+Travel is requested for [purpose: presenting results, collaboration, training]. The PI and/or [personnel] will attend [specific conferences/meetings] annually to disseminate findings and network with the research community. These meetings are essential for [specific benefits: feedback, collaborations, recruiting, staying current].
+
+**Calculation**:
+- [Conference name]: $[airfare] + $[hotel, X nights] + $[meals/incidentals] + $[registration] = $[total]
+- Number of trips/year: [N]
+- Total domestic travel: $[amount]/year
+
+**Example**:
+*Domestic Travel*
+
+*Justification*: Annual travel for the PI, postdoc, and 2 graduate students to present research findings and network with the diabetes research community.
+
+Trips include:
+1. American Diabetes Association Scientific Sessions (annual, June): Premier venue for diabetes research dissemination. PI and 2 trainees will present posters/talks, attend workshops, and meet with collaborators. ($2,500/person × 3 people = $7,500)
+
+2. Endocrine Society Annual Meeting (alternate years): Important for reaching clinical endocrinology audience. PI will present translational findings. ($2,200)
+
+3. Cold Spring Harbor Metabolism & Disease Conference (Year 3): Specialized meeting for in-depth scientific exchange. Postdoc will present mechanistic findings. ($1,800)
+
+*Total*: $9,700/year (Years 1-2, 4-5); $11,500/year (Year 3)
+
+### Foreign Travel
+
+**Purpose**: [International conference/collaboration]
+
+**Justification**:
+[If requesting foreign travel, provide strong justification for why international meeting is necessary]
+
+**Example**:
+*Foreign Travel*
+
+*Justification*: PI will attend the International Diabetes Federation Congress (every 2 years, Years 2 and 4) to present findings to international clinical and research audience. This is the largest global diabetes meeting and essential for international collaborations and dissemination. Our data on molecular subtypes has direct relevance for diverse patient populations globally.
+
+*Cost*: $4,500/trip (airfare $1,500, hotel 4 nights $1,200, meals $800, registration $1,000)
+*Total*: $4,500 (Years 2, 4)
+
+---
+
+## Materials and Supplies
+
+### [Category]
+
+**Justification**:
+[Description of supplies needed and why]
+
+**Calculation**:
+[Itemize major categories with estimated costs]
+
+**Total**: $[amount]/year
+
+**Example**:
+*Laboratory Supplies and Reagents*
+
+*Justification*: Supplies are required for cell culture, molecular biology, and metabolic assays across all three aims.
+
+*Breakdown*:
+- Cell culture reagents (media, growth factors, serum): $15,000/year
+ - Maintaining >50 patient-derived iPSC, hepatocyte, and adipocyte lines
+ - Differentiation protocols requiring specialized media
+
+- Molecular biology supplies (RNA extraction, qPCR, Western blotting): $12,000/year
+ - Processing samples from cell assays and mouse tissues
+ - Validation experiments for omics findings
+
+- Metabolomics and proteomics sample prep: $18,000/year
+ - Sample processing for Aim 1 multi-omics profiling (n=2,000 patients)
+ - Sample preparation for mass spectrometry (Aims 1-2)
+
+- Mouse metabolic phenotyping supplies: $10,000/year
+ - Glucose tolerance tests, insulin tolerance tests
+ - Blood collection and plasma analysis
+ - Tissue harvest and processing
+
+- Immunoassays and ELISAs: $8,000/year
+ - Insulin, c-peptide, GLP-1, cytokine measurements
+ - ~500 assays/year across aims
+
+- General lab supplies (pipette tips, tubes, glassware): $7,000/year
+
+*Total*: $70,000/year
+
+---
+
+## Participant/Trainee Support Costs
+
+(For undergraduate researchers, workshop participants, etc.)
+
+**Stipends**: $[amount]
+
+**Justification**:
+[Number] undergraduate researchers will participate in summer research for 10 weeks annually. Stipends of $[amount] per student provide support for [what stipend covers].
+
+**Travel**: $[amount]
+
+**Justification**:
+Travel support for undergraduates to present research at [conference].
+
+**Subsistence**: $[amount] (if applicable)
+
+**Other**: $[amount]
+
+**Total**: $[amount]/year
+
+**Example**:
+*Undergraduate Summer Research Program*
+
+*Stipends*: 10 undergraduates × $5,000 = $50,000/year
+
+*Justification*: Ten undergraduates will participate in 10-week summer research experiences, working with graduate students on specific sub-projects. Students will be recruited from partner HBCUs (50% of participants) and our institution's McNair Scholars program. Stipends ($5,000 per student for 10 weeks) provide support during full-time research commitment.
+
+*Travel*: 10 students × $1,500 = $15,000/year
+
+*Justification*: Support for undergraduates to present research at the Annual Biomedical Research Conference for Minority Students (ABRCMS). This is a critical professional development opportunity, particularly for students from underrepresented groups.
+
+*Total Participant Support*: $65,000/year
+
+(Note: Participant support costs are not subject to indirect costs)
+
+---
+
+## Other Direct Costs
+
+### Publication Costs
+
+**Cost**: $[amount]/year
+
+**Justification**:
+We anticipate publishing [N] peer-reviewed articles over the 5-year project period in open-access journals to ensure broad dissemination. Average open-access fees are approximately $[amount] per article. Funds will cover article processing charges for publications resulting from this work.
+
+**Example**:
+*Publication Costs*: $12,000/year
+
+*Justification*: We anticipate 2 publications per year (10 total over 5 years) in high-impact open-access journals. Average article processing charges are $3,000-$4,000 (e.g., Nature Communications, Cell Reports, Diabetes). We budget $6,000/year to ensure broad, immediate dissemination of findings as required by NIH public access policy. Additional publications in traditional subscription journals will not require fees.
+
+### Consultant Services
+
+**[Consultant Name/Role]**: $[amount]
+
+**Justification**:
+Dr. [Name] will serve as consultant for [specific expertise needed]. [He/She] will [specific consulting activities], requiring approximately [X] days per year at a rate of $[amount]/day. This expertise is essential for [why you can't do this yourself] and will ensure [benefit to project].
+
+**Example**:
+*Statistical Consultant*: $15,000/year
+
+*Justification*: Dr. Sarah Chen, Professor of Biostatistics at Johns Hopkins, will provide statistical consulting for machine learning-based subtype classification (Aim 1) and clinical outcome analysis (Aim 3). She will advise on study design, sample size calculations, analysis approaches, and interpretation of complex multi-omics datasets. Her expertise in diabetes clinical trials and unsupervised clustering is essential for rigorous analysis. Services will require approximately 10 days/year at $1,500/day (standard consulting rate). Dr. Chen has agreed to this arrangement (see letter of commitment).
+
+### Other
+
+List any other direct costs (subawards, animal costs, computing time, etc.)
+
+---
+
+## Consortium/Contractual Costs
+
+(For collaborating institutions)
+
+**[Institution Name] Subaward**
+
+**Total costs**: $[amount] per year
+
+**Justification**:
+[Collaborating institution] will perform [specific work related to which aims]. Dr. [PI name at institution] will lead these efforts. This collaboration is essential because [why this expertise/resource is needed and not available at your institution].
+
+**Work to be performed**:
+- [Task 1]
+- [Task 2]
+- [Task 3]
+
+Detailed budget and justification from [institution] are included as a subaward/consortium application.
+
+**Example**:
+*University of California San Diego Subaward*
+
+*Total costs*: $100,000/year
+
+*Justification*: UCSD will perform all mass spectrometry-based metabolomics and proteomics analyses for Aims 1-2. Dr. Michael Williams, Director of the UCSD Metabolomics Core, will lead these efforts. This collaboration is essential because our institution lacks the specialized mass spectrometry platforms (Orbitrap Fusion, QTOF) and expertise required for these analyses. UCSD has extensive experience with T2D metabolomics and proteomics, having processed >5,000 clinical samples.
+
+*Work to be performed*:
+- Sample processing and metabolite/protein extraction (Years 1-3)
+- LC-MS/MS analysis on Orbitrap Fusion and QTOF platforms
+- Data processing, quality control, and statistical analysis
+- Quarterly meetings to discuss results and plan analyses
+
+*Budget includes*: Personnel (50% technician, 10% Dr. Williams), supplies, and instrument time. Detailed subaward budget attached.
+
+*Note*: Consortium F&A limited to 8% of total costs per NIH policy.
+
+---
+
+## Indirect Costs (Facilities & Administrative)
+
+**Rate**: [X]% of Modified Total Direct Costs (MTDC)
+
+**MTDC Excludes**: Equipment, capital expenditures, charges for patient care, participant support costs, rental costs of off-site facilities, scholarships and fellowships, and the portion of each subaward in excess of $25,000.
+
+**Justification**:
+Indirect cost rate is based on our institution's federally negotiated rate agreement with [DHHS/agency], effective [dates]. This rate covers institutional costs for facilities (building depreciation, operations, maintenance) and administration (sponsored projects office, accounting, library, etc.) that support research.
+
+**Example**:
+*Facilities & Administrative Costs*: 57% of MTDC (on-campus rate)
+
+*Justification*: Our institution's federally negotiated F&A rate with DHHS is 57% for on-campus research, effective July 1, 2023 - June 30, 2027. This rate covers facilities costs (building depreciation, utilities, operations and maintenance) and administrative costs (sponsored projects administration, accounting, library, general administration).
+
+*Calculation example (Year 1)*:
+- Total direct costs: $550,000
+- Less: Equipment ($425,000), participant support ($65,000), consortium F&A ($8,000)
+- MTDC base: $52,000
+- Indirect costs: $52,000 × 0.57 = $29,640
+
+---
+
+## Summary Budget Table
+
+| Category | Year 1 | Year 2 | Year 3 | Year 4 | Year 5 | Total |
+|----------|--------|--------|--------|--------|--------|-------|
+| Personnel | $XXX | $XXX | $XXX | $XXX | $XXX | $XXX |
+| Fringe Benefits | $XXX | $XXX | $XXX | $XXX | $XXX | $XXX |
+| Equipment | $XXX | $0 | $0 | $0 | $0 | $XXX |
+| Travel | $XXX | $XXX | $XXX | $XXX | $XXX | $XXX |
+| Materials & Supplies | $XXX | $XXX | $XXX | $XXX | $XXX | $XXX |
+| Other Direct Costs | $XXX | $XXX | $XXX | $XXX | $XXX | $XXX |
+| Participant Support | $XXX | $XXX | $XXX | $XXX | $XXX | $XXX |
+| Consortium/Subawards | $XXX | $XXX | $XXX | $XXX | $XXX | $XXX |
+| **Total Direct Costs** | $XXX | $XXX | $XXX | $XXX | $XXX | $XXX |
+| Indirect Costs (F&A) | $XXX | $XXX | $XXX | $XXX | $XXX | $XXX |
+| **TOTAL COSTS** | $XXX | $XXX | $XXX | $XXX | $XXX | $XXX |
+
+---
+
+## Tips for Strong Budget Justifications
+
+✅ **Do**:
+- Tie every cost directly to specific aims and activities
+- Provide detailed calculations showing your work
+- Explain why the amount is necessary and reasonable
+- Use institutional or national standards for rates
+- Show cost-effectiveness where possible
+- Include escalation (inflation) for out-years
+- Be specific about equipment models, conference names, etc.
+
+❌ **Don't**:
+- Use vague language ("miscellaneous supplies")
+- Forget to justify every line item
+- Over-budget for contingency
+- Include costs unrelated to the proposed work
+- Underestimate costs (creates problems if funded)
+- Forget agency-specific cost limitations (salary caps, F&A exclusions)
+
+## Agency-Specific Notes
+
+**NIH**:
+- Salary cap applies (~$221,900 for 2024)
+- Modular budgets (≤$250K direct) require less detail
+- Participant support costs excluded from F&A
+
+**NSF**:
+- No salary cap
+- Generally 2 summer months maximum for 9-month faculty
+- Cost sharing not required (except specific programs)
+
+**DOE**:
+- Often requires detailed budgets by quarter
+- May require cost sharing
+- Equipment often requires special justification
+
+**DARPA**:
+- Detailed costs by phase and task
+- Often requires supporting cost data
+- May need rates approved (DCAA audit for industry)
+
diff --git a/scientific-skills/research-grants/assets/nih_specific_aims_template.md b/scientific-skills/research-grants/assets/nih_specific_aims_template.md
new file mode 100644
index 0000000..2b6568f
--- /dev/null
+++ b/scientific-skills/research-grants/assets/nih_specific_aims_template.md
@@ -0,0 +1,166 @@
+# NIH Specific Aims Page Template
+
+**CRITICAL**: Exactly 1 page, 0.5-inch margins, 11-point font minimum
+
+---
+
+## Opening Paragraph: The Hook (3-5 sentences)
+
+[Establish the importance of your research area with compelling statistics or biological significance]
+
+**Template:**
+[Disease/Problem] affects [number] people annually and [consequence - mortality, morbidity, cost]. Despite [current treatments/knowledge], [major limitation or gap]. [Why this limitation matters for patients/science]. [Opportunity or need for new approaches].
+
+**Example:**
+Type 2 diabetes (T2D) affects 37 million Americans and costs $327 billion annually in healthcare expenditures. Despite available therapies, fewer than 50% of patients achieve glycemic control, and complications including cardiovascular disease, neuropathy, and kidney failure remain common. Existing treatments primarily target insulin resistance and β-cell function, yet fail to address the underlying molecular heterogeneity driving variable therapeutic responses. Identifying molecular subtypes of T2D and their corresponding treatment vulnerabilities represents a critical unmet need for precision medicine approaches.
+
+---
+
+## Second Paragraph: Gap and Rationale (4-6 sentences)
+
+[Define what's known, what's unknown, and why the gap matters]
+
+**Template:**
+Prior studies have established [current knowledge - 1-2 sentences]. However, [what remains unknown - the gap]. [Why current approaches are insufficient]. [Critical barrier to progress]. Understanding [the gap] is essential because [impact of filling the gap].
+
+**Example:**
+Prior studies have identified numerous genetic and environmental risk factors for T2D, and recent work has revealed metabolic heterogeneity among patients. However, molecular classification schemes have relied primarily on clinical phenotypes (age at onset, BMI, insulin levels) rather than underlying pathophysiology, limiting their therapeutic utility. Current approaches cannot predict which patients will respond to specific therapies, leading to inefficient trial-and-error treatment selection. Understanding the molecular drivers of T2D heterogeneity and their relationships to drug responses is essential for developing predictive biomarkers and targeted treatment strategies.
+
+---
+
+## Third Paragraph: Goal, Objective, Hypothesis, Rationale (5-7 sentences)
+
+**Long-term goal**: [Overarching research program direction]
+
+**Objective**: The objective of this application is to [specific goal of THIS grant - what you will accomplish].
+
+**Central hypothesis**: [Testable prediction that unifies your aims].
+
+This hypothesis is based on [rationale]: our preliminary data showing [key finding 1], [key finding 2], and [key finding 3] (Figures 1-2, Table 1). [Why this evidence supports the hypothesis].
+
+**Example:**
+Our long-term goal is to develop precision medicine approaches for type 2 diabetes based on molecular disease subtypes. The objective of this application is to define the molecular basis of T2D heterogeneity and identify subtype-specific therapeutic vulnerabilities. Our central hypothesis is that T2D comprises distinct molecular subtypes driven by different combinations of β-cell dysfunction, insulin resistance, and inflammation, and that these subtypes respond differentially to existing therapies. This hypothesis is based on our preliminary multi-omics profiling of 500 T2D patients revealing five distinct clusters with different genetic architectures, metabolic signatures, and clinical trajectories (Fig. 1). Retrospective analysis showed these subtypes had dramatically different responses to metformin and GLP-1 agonists (Fig. 2), and functional studies in islets confirmed subtype-specific mechanisms (Fig. 3). These findings suggest a molecular classification could guide treatment selection.
+
+---
+
+## Specific Aim 1: [Action Verb - What You Will Do]
+
+[Brief rationale: why this aim is important, background context - 1-2 sentences]
+
+**Working hypothesis**: [Testable prediction for this aim]
+
+**Approach**: We will (1) [first set of experiments/methods], (2) [second set], and (3) [third set]. [Key model systems, sample sizes, or technical approaches].
+
+**Expected outcomes**: We expect to [specific predictions], which will [how this advances knowledge or enables subsequent aims].
+
+**Example:**
+
+## Specific Aim 1: Define molecular subtypes of T2D through integrated multi-omics analysis
+
+Current clinical classification of T2D lacks molecular granularity. Our preliminary clustering analysis identified 5 subtypes, but requires validation and mechanistic characterization.
+
+**Working hypothesis**: T2D comprises at least five molecular subtypes with distinct genomic, transcriptomic, proteomic, and metabolomic signatures.
+
+**Approach**: We will (1) perform multi-omics profiling (genome, transcriptome, proteome, metabolome) on 2,000 T2D patients from three independent cohorts, (2) apply unsupervised clustering and machine learning to identify robust subtypes, and (3) validate subtypes in 1,000 independent patients. We will develop a streamlined classification algorithm using the minimal set of biomarkers sufficient for subtype assignment.
+
+**Expected outcomes**: We will define 5-7 molecular T2D subtypes, characterize their multi-omics signatures, and develop a clinically deployable classifier. This foundation will enable investigation of subtype-specific mechanisms (Aim 2) and treatment responses (Aim 3).
+
+---
+
+## Specific Aim 2: [Action Verb - What You Will Do]
+
+[Brief rationale and background - 1-2 sentences]
+
+**Working hypothesis**: [Testable prediction]
+
+**Approach**: [Detailed methods - 3-5 sentences outlining key experiments, models, techniques, and sample sizes]
+
+**Expected outcomes**: [Specific predictions and impact]
+
+**Example:**
+
+## Specific Aim 2: Elucidate pathophysiological mechanisms underlying each molecular subtype
+
+Molecular subtypes likely reflect distinct disease mechanisms, but causal pathways remain unknown.
+
+**Working hypothesis**: Each T2D subtype is driven by a distinct combination of β-cell dysfunction, hepatic insulin resistance, adipose tissue inflammation, and incretin deficiency.
+
+**Approach**: Using patient-derived iPSCs, primary adipocytes, and liver organoids from each subtype, we will (1) assess β-cell function (insulin secretion dynamics, ER stress, apoptosis), (2) measure insulin signaling in hepatocytes and adipocytes using phosphoproteomics and glucose uptake assays, (3) profile immune cell infiltration and inflammatory cytokines in adipose tissue, and (4) measure GLP-1 secretion and receptor expression. We will perform integrative analysis relating cellular phenotypes to clinical outcomes in n=100 patients per subtype.
+
+**Expected outcomes**: We will define the primary pathophysiological defects in each subtype and identify targetable vulnerabilities. This mechanistic understanding will inform selection of appropriate therapies in Aim 3.
+
+---
+
+## Specific Aim 3: [Action Verb - What You Will Do]
+
+[Brief rationale - 1-2 sentences]
+
+**Working hypothesis**: [Testable prediction]
+
+**Approach**: [Methods - 3-5 sentences]
+
+**Expected outcomes**: [Predictions and impact]
+
+**Example:**
+
+## Specific Aim 3: Determine subtype-specific responses to existing T2D therapies
+
+Current treatment algorithms do not account for molecular heterogeneity, leading to suboptimal outcomes.
+
+**Working hypothesis**: T2D subtypes exhibit differential responses to metformin, GLP-1 agonists, SGLT2 inhibitors, and insulin, based on their underlying pathophysiology.
+
+**Approach**: We will (1) conduct retrospective analysis of treatment responses in 5,000 patients with known subtypes from electronic health records, (2) validate findings in a prospective observational cohort (n=500, 18-month follow-up), and (3) test predicted drug sensitivities in patient-derived cell models and humanized mice (n=15 per subtype per drug). Primary outcomes are HbA1c reduction, with secondary outcomes including weight, hypoglycemia, and cardiovascular risk markers.
+
+**Expected outcomes**: We will identify optimal first-line therapies for each subtype and develop a treatment algorithm. Retrospective data suggest subtype-guided therapy could improve HbA1c control by 0.8-1.2% compared to standard care. Results will inform an investigator-initiated clinical trial (resources available through our Clinical Research Center).
+
+---
+
+## Closing Paragraph: Impact and Significance (3-5 sentences)
+
+[Summarize expected outcomes, how it advances the field, and positive impact]
+
+**Template:**
+The proposed research is significant because [why it matters]. Results will [specific advances - knowledge, tools, treatments]. We expect findings will [broader impact on field or health]. This work will [transformative potential or next steps].
+
+**Example:**
+The proposed research is significant because it will establish a molecular taxonomy of type 2 diabetes and identify subtype-specific treatment strategies, addressing a critical barrier to precision medicine in this prevalent disease. Results will provide mechanistic insights into T2D heterogeneity, immediately applicable biomarkers for patient stratification, and evidence-based treatment algorithms. We expect findings will enable personalized therapeutic approaches that substantially improve glycemic control and reduce complications for the 37 million Americans with T2D. This work will establish new paradigms for precision medicine in complex metabolic diseases and provide the foundation for a prospective subtype-guided treatment trial that could transform clinical practice.
+
+---
+
+## Formatting Checklist
+
+- [ ] Exactly 1 page (not 1.1, not 0.9)
+- [ ] 0.5-inch margins (all sides)
+- [ ] 11-point Arial/Helvetica or equivalent
+- [ ] Readable line spacing
+- [ ] Aim statements are bold or underlined
+- [ ] Gene names italicized (*TP53*)
+- [ ] Figures (if included) are legible
+- [ ] All abbreviations defined at first use
+
+## Content Checklist
+
+- [ ] Opens with compelling importance statement
+- [ ] Includes epidemiological data or significance metrics
+- [ ] Clearly defines the gap in knowledge
+- [ ] States long-term goal
+- [ ] States specific objective of THIS application
+- [ ] Presents testable central hypothesis (or research questions)
+- [ ] Mentions preliminary data supporting feasibility
+- [ ] Includes 2-4 specific aims
+- [ ] Each aim has: rationale, hypothesis, approach, expected outcomes
+- [ ] Aims are testable and achievable
+- [ ] Aims are independent but synergistic
+- [ ] Expected outcomes are specific
+- [ ] Closes with impact statement
+- [ ] Passes the "skim test" (aim statements tell the story)
+
+## Tips for Success
+
+1. **Write 10+ drafts** - This page is too important to rush
+2. **Get extensive feedback** - From colleagues, mentors, people outside your field
+3. **Read it aloud** - Check for flow and clarity
+4. **Study funded examples** - Look at successful aims pages in your field
+5. **Test on non-experts** - Can someone in a different field understand the importance?
+6. **Check every word** - Every sentence must earn its place on this precious page
+
diff --git a/scientific-skills/research-grants/assets/nsf_project_summary_template.md b/scientific-skills/research-grants/assets/nsf_project_summary_template.md
new file mode 100644
index 0000000..4f07071
--- /dev/null
+++ b/scientific-skills/research-grants/assets/nsf_project_summary_template.md
@@ -0,0 +1,92 @@
+# NSF Project Summary Template
+
+**IMPORTANT**: NSF requires three labeled sections in the project summary (max 1 page):
+1. Overview
+2. Intellectual Merit
+3. Broader Impacts
+
+---
+
+## Overview
+
+[Write a paragraph suitable for public dissemination that explains:
+- The research question or problem
+- The approach or methods
+- Expected outcomes
+- Significance
+
+This should be accessible to a broad audience including non-scientists. Avoid jargon.]
+
+**Example:**
+This project investigates how coastal wetlands respond to rising sea levels and increased storm intensity caused by climate change. Using a combination of field observations, remote sensing, and computer modeling across 20 sites along the Atlantic coast, we will determine whether wetlands can migrate inland fast enough to keep pace with sea level rise. Results will inform coastal management policies and help predict the fate of critical ecosystems that protect shorelines and support fisheries. This work will train 5 graduate students and 10 undergraduates, with priority recruitment from underrepresented groups through partnerships with minority-serving institutions.
+
+---
+
+## Intellectual Merit
+
+[Address the question: What is the potential for the proposed activity to advance knowledge?
+
+Include:
+- Why the research is important scientifically
+- What knowledge gap it addresses
+- What will be learned
+- Novel aspects of the approach
+- How it advances the field]
+
+**Example:**
+This research addresses a critical gap in understanding coastal wetland resilience under accelerating climate change. Current models of wetland migration fail to account for biological constraints on vegetation establishment and feedbacks between sediment dynamics and plant growth. We will develop the first integrated model coupling hydrological, ecological, and geomorphological processes across multiple spatial scales. Our novel approach combines high-resolution LiDAR elevation data with experimental manipulations of sediment and salinity to parameterize vegetation response functions. Expected outcomes include quantitative predictions of wetland migration rates under different sea level rise scenarios, identification of landscape features that facilitate or impede migration, and new theory on ecosystem tipping points. This work will transform our ability to predict and manage coastal ecosystem responses to climate change.
+
+---
+
+## Broader Impacts
+
+[Address the question: What is the potential for the proposed activity to benefit society?
+
+Must address at least one of NSF's five broader impacts areas with specific, measurable activities:
+1. Advance discovery while promoting teaching, training, and learning
+2. Broaden participation of underrepresented groups
+3. Enhance infrastructure for research and education
+4. Broadly disseminate to enhance scientific understanding
+5. Benefit society
+
+Be SPECIFIC with concrete activities, timelines, and assessment plans.]
+
+**Example:**
+This project will generate significant broader impacts through three integrated activities:
+
+**1. Education and Training**: We will train 5 PhD students and 10 undergraduates in interdisciplinary coastal science, emphasizing field methods, remote sensing, and quantitative modeling. Undergraduates will participate through summer research internships (10 weeks, $5,000 stipends) with mentorship from graduate students. We will recruit 50% of undergraduates from groups underrepresented in STEM through partnerships with 4 historically Black colleges and universities (HBCUs). Students will present results at the Annual Biogeographical Research Conference and co-author peer-reviewed publications.
+
+**2. Stakeholder Engagement and Policy Impact**: We will partner with 5 state coastal management agencies and The Nature Conservancy to translate research findings into management tools. Annual workshops will bring together 30 coastal managers, conservation practitioners, and researchers to co-develop decision-support frameworks. Results will inform state sea level rise adaptation plans, wetland restoration prioritization, and land acquisition strategies affecting 500,000 acres of coastal habitat.
+
+**3. Public Science Communication**: We will create a publicly accessible web-based visualization tool showing projected wetland changes under different climate scenarios for the entire Atlantic coast. The tool will be promoted through social media, state agency websites, and science museums, with expected reach of 50,000 users. We will also develop bilingual (English/Spanish) educational materials for K-12 teachers, piloted in 10 schools serving predominantly underrepresented students.
+
+Impact will be assessed through pre/post surveys of student participants, tracking of research participants into STEM careers, documentation of policy adoptions by management agencies, and analytics on public engagement platform usage.
+
+---
+
+## Formatting Requirements
+
+- **Page Limit**: 1 page maximum
+- **Margins**: 1 inch all sides
+- **Font**: 11-point or larger (Times Roman, Arial, Palatino, Computer Modern)
+- **Section Headers**: Must use exactly these three labels:
+ - Overview
+ - Intellectual Merit
+ - Broader Impacts
+- **Public Accessibility**: Overview section suitable for general public
+
+## Common Mistakes to Avoid
+
+❌ **Don't** omit any of the three required section headings
+❌ **Don't** make broader impacts vague ("will train students")
+❌ **Don't** use jargon in the Overview
+❌ **Don't** exceed 1 page
+❌ **Don't** forget to mention preliminary data or team qualifications
+❌ **Don't** make broader impacts an afterthought (they're equally important)
+
+✅ **Do** make all three sections substantive
+✅ **Do** be specific about broader impacts activities
+✅ **Do** write Overview for broad audience
+✅ **Do** convey enthusiasm and significance
+✅ **Do** proofread carefully (this is the first thing reviewers see)
+
diff --git a/scientific-skills/research-grants/references/broader_impacts.md b/scientific-skills/research-grants/references/broader_impacts.md
new file mode 100644
index 0000000..c70e3d0
--- /dev/null
+++ b/scientific-skills/research-grants/references/broader_impacts.md
@@ -0,0 +1,392 @@
+# Broader Impacts: Strategies and Best Practices
+
+## Overview
+
+**Broader Impacts** are one of two review criteria for NSF proposals, carrying equal weight with Intellectual Merit. Despite this, broader impacts are often treated as an afterthought—a critical mistake that costs otherwise strong proposals their funding.
+
+**NSF Definition**: "The potential to benefit society and contribute to the achievement of specific, desired societal outcomes"
+
+**Key Principle**: Broader impacts must be **specific, measurable, and integrated** with your research plan—not vague aspirations tacked onto the end.
+
+## The Five Pillars of Broader Impacts
+
+NSF evaluates broader impacts across five main areas. **You don't need to address all five**, but you should address at least one substantively with concrete activities, timelines, and assessment plans.
+
+### 1. Advance Discovery While Promoting Teaching, Training, and Learning
+
+**What This Means**: Integrate research and education to inspire the next generation of scientists and enhance scientific literacy.
+
+**Effective Strategies**:
+
+**Curriculum Development**:
+- Create new courses incorporating research findings
+- Develop course modules or laboratory exercises
+- Design online learning materials (MOOCs, videos, interactive tools)
+- Contribute to textbooks or educational resources
+
+*Example*: "We will develop a 10-week computational biology module for undergraduate education, incorporating real datasets from this project. The module will include Jupyter notebooks with guided analysis, video tutorials, and assessment tools. Materials will be piloted at our institution (reaching 50 students annually) and made freely available through CourseSource for national adoption."
+
+**Student Training**:
+- Undergraduate research experiences
+- Graduate student mentoring
+- Postdoctoral training
+- High school intern programs
+- Research experiences for teachers (RET)
+
+*Example*: "The project will support 3 PhD students and 6 undergraduate researchers over 5 years. Undergraduates will participate through our existing summer research program (10 weeks, $5,000 stipends) and will present findings at the annual undergraduate research symposium and regional conferences."
+
+**Pedagogical Innovation**:
+- Problem-based learning modules
+- Active learning strategies
+- Research-intensive courses
+- Service learning projects
+- Maker spaces or hands-on workshops
+
+*Example*: "We will transform our introductory physics course (250 students/year) by implementing studio-style physics instruction based on results from this research. The new curriculum will include 3D visualization tools for electromagnetic fields, inquiry-based problem sets, and peer instruction protocols."
+
+**Professional Development**:
+- Workshops for faculty or teachers
+- Training programs for early-career researchers
+- Mentoring programs
+- Career development resources
+
+*Example*: "We will host annual 3-day workshops for 25 community college faculty, providing training in genome editing techniques. Participants will receive hands-on experience with CRISPR methods developed in this project, complete teaching modules for their courses, and ongoing support through a virtual learning community."
+
+### 2. Broaden Participation of Underrepresented Groups
+
+**What This Means**: Increase participation of groups underrepresented in STEM, including women, racial/ethnic minorities, persons with disabilities, and those from economically disadvantaged backgrounds.
+
+**Effective Strategies**:
+
+**Partnerships with Minority-Serving Institutions**:
+- Collaborate with HBCUs (Historically Black Colleges and Universities)
+- Partner with HSIs (Hispanic-Serving Institutions)
+- Work with TCUs (Tribal Colleges and Universities)
+- Engage with community colleges
+
+*Example*: "We will establish formal research partnerships with 4 regional HBCUs (North Carolina A&T, Howard University, Morehouse College, and Spelman College). Each summer, 2 students from partner institutions will participate in 10-week research internships, including stipends ($6,000), housing, travel to field sites, and participation in our weekly research seminar series. A faculty liaison from each partner institution will co-mentor students and facilitate year-round engagement."
+
+**Recruitment and Retention**:
+- Targeted recruitment at conferences (SACNAS, ABRCMS, NSBE, SWE)
+- Scholarship programs for underrepresented students
+- Bridge programs for community college transfers
+- Retention support (mentoring, peer networks, professional development)
+
+*Example*: "We will recruit 50% of summer undergraduate researchers from groups underrepresented in computer science through partnerships with SACNAS and the National Society of Black Engineers. Participants will receive mentoring from graduate students with similar backgrounds, attend professional development workshops, and join our diversity-in-computing learning community that provides year-round support and networking."
+
+**Culturally Relevant Engagement**:
+- Research addressing community-identified needs
+- Community-based participatory research
+- Engagement with indigenous communities
+- Bilingual materials and outreach
+
+*Example*: "In partnership with the Navajo Nation, we will conduct participatory research on water quality in reservation communities. Community members will co-design the research questions, participate in data collection, and contribute indigenous knowledge about local hydrology. Results will be shared through community presentations in both English and Navajo, and will inform tribal water management policies."
+
+**Addressing Systemic Barriers**:
+- Flexible schedules for non-traditional students
+- Childcare support for participants
+- Accessible facilities and materials
+- Financial support (stipends, travel, equipment)
+- Mentoring networks and affinity groups
+
+*Example*: "To support participation of students from low-income backgrounds, we will provide laptop computers, software licenses, and internet hotspots to all research participants. We will also offer flexible work schedules, remote participation options, and supplemental funding for students with childcare or eldercare responsibilities."
+
+### 3. Enhance Infrastructure for Research and Education
+
+**What This Means**: Build facilities, tools, databases, or networks that enable future research and education across the broader community.
+
+**Effective Strategies**:
+
+**Shared Research Infrastructure**:
+- Multi-user instrumentation
+- Core facilities
+- Field stations or observatories
+- Computational resources
+- Cyberinfrastructure
+
+*Example*: "We will establish a regional Cryo-Electron Microscopy facility serving 15 institutions in the Southwest. The facility will provide training and access to state-of-the-art imaging capabilities currently unavailable in the region. We will operate a user program with subsidized rates for academic users and offer annual training workshops for 50 researchers."
+
+**Data and Software Resources**:
+- Open-access databases
+- Software tools and platforms
+- Analysis pipelines
+- Standardized protocols
+- Data repositories
+
+*Example*: "We will develop and maintain EcoDataHub, an open-source platform for ecological time-series analysis. The platform will include automated data cleaning, standardized analysis workflows, interactive visualization tools, and cloud computing integration. Software will be documented, version-controlled on GitHub, and supported through user forums and quarterly webinars. We expect 1,000+ users within 3 years based on community surveys."
+
+**Biological or Physical Resources**:
+- Living stock centers (model organisms, cell lines)
+- Specimen collections
+- Reagent repositories
+- Seed banks or tissue collections
+
+*Example*: "We will establish a publicly accessible repository of 500 sequenced bacterial strains isolated from extreme environments. Each strain will include full genome sequence, phenotypic characterization, and growth protocols. Materials will be available through the ATCC with metadata deposited in NCBI BioProject."
+
+**Standards and Protocols**:
+- Community standards
+- Best practices guides
+- Benchmarking datasets
+- Quality control metrics
+- Interoperability frameworks
+
+*Example*: "Working with 20 international laboratories, we will develop and validate standardized protocols for single-cell RNA sequencing analysis. The resulting guidelines will address batch effects, quality control, normalization methods, and statistical best practices. Protocols will be published in peer-reviewed literature and deposited in protocols.io."
+
+### 4. Broadly Disseminate to Enhance Scientific and Technological Understanding
+
+**What This Means**: Communicate research to broader audiences including the public, K-12 students, policymakers, and stakeholders to enhance scientific literacy and informed decision-making.
+
+**Effective Strategies**:
+
+**K-12 Education Outreach**:
+- School visits and science demonstrations
+- After-school programs
+- Science fairs and competitions
+- Teacher professional development
+- Classroom resources and lesson plans
+
+*Example*: "We will partner with 10 local middle schools (serving 75% students from low-income families) to deliver hands-on robotics workshops. Each school will receive robot kits, and we will train teachers to lead a 12-week after-school robotics club. Students will apply concepts from this research (sensor fusion, autonomous navigation) to design robots for real-world challenges. The program will reach 200 students annually."
+
+**Public Engagement**:
+- Museum partnerships and exhibits
+- Science cafés and public lectures
+- Science festivals
+- Citizen science projects
+- Community workshops
+
+*Example*: "We will collaborate with the Museum of Science and Industry to create a permanent interactive exhibit on climate modeling. The exhibit will allow visitors to manipulate climate variables and observe predicted outcomes using simplified versions of our models. We anticipate 500,000 annual visitors. We will also host quarterly 'Climate Science Saturday' public lectures reaching 2,000 community members annually."
+
+**Media and Communications**:
+- Blog posts and articles
+- Podcasts or videos
+- Social media engagement
+- Press releases for major findings
+- Popular science writing
+
+*Example*: "We will produce a 6-episode podcast series exploring the intersection of artificial intelligence and creativity, featuring interviews with artists, musicians, and computer scientists. Episodes will be freely available on major platforms, with transcripts and educational materials on our website. Based on our existing podcast (15,000 downloads/episode), we expect to reach 100,000+ listeners."
+
+**Policy Engagement**:
+- Science policy fellowships
+- Congressional briefings
+- White papers for decision-makers
+- Stakeholder workshops
+- Regulatory science contributions
+
+*Example*: "We will organize annual workshops bringing together researchers, water utilities, environmental regulators, and community advocates to discuss implications of our research for drinking water policy. Findings will be synthesized into policy briefs distributed to state and federal agencies. PI will participate in the AAAS Science and Technology Policy Fellowship to engage directly with EPA rulemaking."
+
+**Citizen Science**:
+- Community-based data collection
+- Participatory research design
+- Volunteer monitoring programs
+- Crowdsourcing platforms
+
+*Example*: "We will launch a citizen science program enlisting 500 volunteers across the Midwest to monitor pollinator populations using our smartphone app. Participants will receive training materials, identification guides, and regular feedback on their observations. Data will contribute directly to our research while building public understanding of pollinator ecology. Results will be visualized on an interactive public dashboard."
+
+### 5. Benefit Society
+
+**What This Means**: Apply research to address societal needs, improve quality of life, strengthen national security, or enhance economic competitiveness.
+
+**Effective Strategies**:
+
+**Health and Well-Being**:
+- Clinical applications
+- Public health improvements
+- Healthcare accessibility
+- Mental health resources
+- Environmental health
+
+*Example*: "Our diagnostic tool will reduce costs of malaria diagnosis from $10 to $0.50 per test, enabling deployment in resource-limited settings. We will partner with PATH and Médecins Sans Frontières to conduct field trials in 3 African countries and develop manufacturing partnerships for at-scale production. We project this technology could reach 10 million patients annually within 5 years."
+
+**Economic Development**:
+- Technology commercialization
+- Job creation
+- Industry partnerships
+- Workforce development
+- Startup formation
+
+*Example*: "We will establish an industry partnership program with 5 regional manufacturing companies to transfer our advanced materials synthesis methods. Through quarterly technical workshops and on-site consultations, we will help companies integrate these processes into production lines, potentially creating 50-100 high-skill jobs over 5 years. Two graduate students will complete internships at partner companies."
+
+**Environmental Sustainability**:
+- Climate change mitigation or adaptation
+- Conservation and biodiversity
+- Pollution reduction
+- Sustainable agriculture
+- Renewable energy
+
+*Example*: "Our soil carbon sequestration practices will be implemented on 1,000 acres of working farmland in partnership with 15 Iowa farmers. We will provide training, monitoring support, and carbon credit market access. If successful, practices could sequester 100,000 tons of CO2 equivalent annually if adopted across 10% of Midwest cropland, while increasing farmer income by $50-100/acre through carbon credits."
+
+**National and Homeland Security**:
+- Defense applications
+- Cybersecurity
+- Critical infrastructure protection
+- Emergency response
+- Intelligence capabilities
+
+*Example*: "We will work with the Department of Homeland Security to adapt our threat detection algorithms for transportation security screening. Technology will be piloted at 3 major airports, with the goal of reducing false-positive rates by 40% while maintaining security effectiveness, decreasing passenger wait times and improving screening efficiency."
+
+**Social and Cultural Benefits**:
+- Preservation of cultural heritage
+- Accessibility and inclusion
+- Social justice
+- Arts and humanities
+- Quality of life improvements
+
+*Example*: "Our 3D scanning and virtual reality platform will be used to digitally preserve 20 culturally significant sites threatened by climate change and development. Virtual reconstructions will be made freely available to descendant communities, schools, and the public through a web-based interface and VR experiences. We will partner with indigenous groups to ensure culturally appropriate representation."
+
+## Best Practices for Broader Impacts
+
+### Be Specific and Concrete
+
+**Vague** ❌:
+"This research will train the next generation of scientists."
+
+**Specific** ✅:
+"This project will support 3 PhD students, 2 postdocs, and 12 undergraduate researchers over 5 years. Undergraduates will be recruited through our partnership with the Louis Stokes Alliance for Minority Participation, with a goal of 50% participation from underrepresented groups. Students will receive training in advanced microscopy, data analysis, and scientific communication, and will present their research at the annual Emerging Researchers National Conference."
+
+### Include Timelines and Milestones
+
+**Vague** ❌:
+"We will develop educational materials."
+
+**Specific** ✅:
+"Year 1: Develop draft curriculum modules and pilot with 50 students
+Year 2: Revise based on assessment data and expand to 150 students across 3 institutions
+Years 3-5: National dissemination through CourseSource, workshops at 2 professional conferences, and online repository. Target: Adoption by 20 institutions reaching 1,000 students annually by Year 5."
+
+### Measure and Assess Impact
+
+**Include**:
+- Quantitative metrics (number of participants, downloads, users)
+- Qualitative assessment (surveys, interviews, focus groups)
+- Learning outcomes or behavioral changes
+- Longitudinal tracking
+- Comparison to baseline or control groups
+
+**Example**:
+"We will assess program effectiveness through: (1) Pre/post surveys measuring science self-efficacy using validated instruments, (2) Tracking participant persistence in STEM majors through institutional records, (3) Focus groups with participants and teachers, (4) Analysis of student work products. We expect to see a 30% increase in science self-efficacy scores and 90% retention in STEM majors among participants compared to 65% institutional baseline."
+
+### Leverage Existing Infrastructure
+
+**Don't reinvent the wheel**—build on existing programs and partnerships:
+- Institutional programs (REU sites, AGEP, LSAMP, etc.)
+- Community partnerships already established
+- Shared facilities or resources
+- Professional societies and organizations
+
+**Example**:
+"We will integrate with our institution's existing NSF REU site in Materials Science, adding 2 additional positions focused on our research area. This leverages established recruitment pipelines with 15 partner institutions, professional development programming, and assessment infrastructure while expanding opportunities for undergraduate researchers."
+
+### Demonstrate Institutional Commitment
+
+**Show that broader impacts will continue beyond grant period**:
+- Institutional cost-sharing or support
+- Integration into ongoing programs
+- Sustainability plan
+- Letters of commitment from partners
+
+**Example**:
+"The university has committed $50,000 annually in cost-share to sustain the high school outreach program beyond the grant period. The program will be integrated into our Center for STEM Education, ensuring administrative support, space, and continuity. Our partner school districts have committed teacher time and classroom access (see letters of commitment in supplementary documents)."
+
+### Align with Research Plan
+
+**Integration examples**:
+- Students work on research questions from the proposal
+- Educational materials use data generated by the research
+- Outreach communicates research findings
+- Community needs inform research questions
+
+**Poor Integration** ❌:
+Research on quantum computing + Unrelated marine biology outreach for middle schoolers
+
+**Good Integration** ✅:
+Research on quantum computing + Develop quantum computing curriculum modules + Summer program where students program quantum simulators + Public lectures on quantum technologies
+
+## Common Broader Impacts Mistakes
+
+### Mistake 1: Generic and Vague Statements
+
+❌ "This project will train graduate students and postdocs."
+❌ "Results will be broadly disseminated through publications and conferences."
+❌ "We will engage in outreach activities."
+
+These are baseline expectations, not broader impacts.
+
+### Mistake 2: No Plan or Timeline
+
+❌ "We hope to develop educational materials that could be used nationally."
+
+✅ "Year 1: Develop and pilot 5 teaching modules. Year 2: Assess effectiveness and refine. Year 3: Publish in Journal of Chemical Education. Years 4-5: Disseminate through workshops at 3 national conferences and online repository. Target: Adoption by 30 institutions by Year 5."
+
+### Mistake 3: No Assessment
+
+❌ "We will run a summer camp for underrepresented students."
+
+✅ "We will run a 4-week summer camp for 30 students (60% from underrepresented groups). We will assess impact through pre/post content knowledge tests, science identity surveys, and tracking of STEM course enrollment. We expect 80% of participants to enroll in advanced science courses the following year."
+
+### Mistake 4: Unrealistic Scope
+
+❌ "We will establish a national network of 100 schools, develop a comprehensive K-12 curriculum, create a museum exhibit, launch a nationwide citizen science program, and commercialize our technology" (with no budget or personnel allocated).
+
+Be realistic about what you can accomplish with the resources and time available.
+
+### Mistake 5: Poor Integration
+
+❌ Research on plant genomics + Unrelated robotics outreach
+
+✅ Research on plant genomics + Develop plant biology curriculum + Engage community gardens in phenotyping citizen science
+
+### Mistake 6: Treating as Afterthought
+
+❌ Half-page generic statement at end of proposal with no budget allocation
+
+✅ Integrated throughout proposal, dedicated personnel (0.5 month PI time, 10% grad student, summer coordinator), allocated budget ($15K/year), detailed plan, and assessment strategy
+
+### Mistake 7: No Track Record
+
+If proposing extensive broader impacts activities but have no history of such work, reviewers will be skeptical.
+
+✅ Show preliminary efforts, leverage existing programs, include collaborators with relevant expertise, cite successful prior broader impacts work
+
+## Budgeting for Broader Impacts
+
+**NSF expects resources allocated to broader impacts activities.**
+
+**Typical Budget Items**:
+- **Personnel**: Program coordinator, graduate students, undergraduate assistants
+- **Participant support**: Stipends, travel, housing for students/teachers
+- **Materials and supplies**: Educational materials, outreach equipment, workshop supplies
+- **Travel**: Conference presentations of broader impacts work, site visits to partners
+- **Subawards**: Payments to partnering institutions or organizations
+- **Evaluation**: External evaluator for assessment
+
+**Example Budget**:
+- Summer program coordinator (2 months/year): $15,000/year
+- Undergraduate stipends (10 students × $5,000): $50,000/year
+- Materials and supplies for workshops: $5,000/year
+- Travel for recruitment and partner meetings: $3,000/year
+- External evaluator: $8,000/year
+- **Total: $81,000/year (16% of $500K budget)**
+
+## Resources for Broader Impacts
+
+### NSF Resources
+- **NSF Broader Impacts Website**: https://www.nsf.gov/od/oia/special/broaderimpacts/
+- **BI Examples Repository**: https://www.cmu.edu/uro/resources for undergraduate research/best practices/broader-impacts.html
+- **Broader Impacts Toolkit**: Many universities provide institutional resources
+
+### Assessment Tools
+- **STEM-OP (STEM Outreach Program)**: Survey instruments for outreach assessment
+- **STELAR Network**: Resources for informal STEM education
+- **Evaluation frameworks**: Logic models, theory of change
+
+### Partner Organizations
+- **SACNAS**: Society for Advancement of Chicanos/Hispanics and Native Americans in Science
+- **ABRCMS**: Annual Biomedical Research Conference for Minority Students
+- **NSBE, SWE, AISES**: Professional societies for underrepresented groups
+- **Science museums and centers**: Partner for public engagement
+- **School districts and community organizations**: For K-12 outreach
+
+---
+
+**Key Takeaway**: Effective broader impacts are specific, measurable, assessed, integrated with the research plan, and demonstrate institutional commitment. They should be planned with the same rigor as the research itself, with dedicated resources, timelines, milestones, and evaluation strategies. Generic statements about "training students" or "disseminating results" are insufficient—NSF expects concrete plans that demonstrably benefit society.
+
diff --git a/scientific-skills/research-grants/references/darpa_guidelines.md b/scientific-skills/research-grants/references/darpa_guidelines.md
new file mode 100644
index 0000000..6a68565
--- /dev/null
+++ b/scientific-skills/research-grants/references/darpa_guidelines.md
@@ -0,0 +1,636 @@
+# DARPA (Defense Advanced Research Projects Agency) Grant Writing Guidelines
+
+## Agency Overview
+
+**Mission**: Make pivotal investments in breakthrough technologies for national security
+
+**Tagline**: "Creating breakthrough technologies and capabilities for national security"
+
+**Annual Budget**: ~$4 billion
+
+**Website**: https://www.darpa.mil
+
+**Key Characteristics**:
+- High-risk, high-reward research
+- Focused on revolutionary breakthroughs, not incremental advances
+- Technology transition to military and commercial applications
+- Program managers with broad autonomy
+- ~3-5 year programs with defined end goals
+- Strong emphasis on prototypes and demonstrations
+- "DARPA-hard" problems that others won't or can't tackle
+
+**The DARPA Difference**:
+- NOT basic research (that's ONR, AFOSR, ARO)
+- NOT development and procurement (that's service acquisition)
+- Focused on proof-of-concept to prototype stage
+- Tolerates and expects failure in pursuit of breakthroughs
+- Rapid transition to operational use
+
+## DARPA Organization
+
+### Six Technical Offices
+
+#### 1. BTO (Biological Technologies Office)
+**Focus**: Biology as technology, human-machine interfaces, synthetic biology
+
+**Example Programs**:
+- Neural interfaces and brain-computer interfaces
+- Synthetic biology and living foundries
+- Pandemic prevention and response
+- Human performance enhancement
+- Biotechnology for manufacturing
+
+#### 2. DSO (Defense Sciences Office)
+**Focus**: High-risk, high-payoff research in physical and mathematical sciences
+
+**Example Programs**:
+- Novel materials and chemistry
+- Quantum technologies
+- Electromagnetics and photonics
+- Mathematics and algorithms
+- Fundamental limits of physics
+
+#### 3. I2O (Information Innovation Office)
+**Focus**: Information advantage through computing, communications, and cyber
+
+**Example Programs**:
+- Artificial intelligence and machine learning
+- Cybersecurity and cyber resilience
+- Communications and networking
+- Data analytics and processing
+- Human-computer interaction
+
+#### 4. MTO (Microsystems Technology Office)
+**Focus**: Microelectronics, photonics, and heterogeneous microsystems
+
+**Example Programs**:
+- Advanced electronics and integrated circuits
+- Photonics and optical systems
+- Novel computational architectures
+- RF and millimeter-wave systems
+- MEMS and sensors
+
+#### 5. STO (Strategic Technology Office)
+**Focus**: Technologies for space, air, maritime, and ground systems
+
+**Example Programs**:
+- Autonomous systems (air, ground, sea, space)
+- Advanced propulsion and power
+- Space technologies
+- Electronic warfare
+- Long-range precision fires
+
+#### 6. TTO (Tactical Technology Office)
+**Focus**: Near-term technologies for ground, maritime, and expeditionary forces
+
+**Example Programs**:
+- Tactical autonomy
+- Advanced weapons
+- Urban operations
+- Maneuver and logistics
+- Special operations support
+
+## How DARPA Works
+
+### Program Manager-Centric Model
+
+**Program Managers (PMs)**:
+- ~100 PMs across DARPA
+- Hired on 3-5 year rotations from academia, industry, government labs
+- Have significant autonomy to create and run programs
+- Identify "DARPA-hard" problems and solutions
+- Manage portfolios of 10-20 projects
+
+**PM Lifecycle**:
+1. **Develop vision**: Identify transformative opportunity
+2. **Create program**: Design research thrusts and metrics
+3. **Issue BAA**: Broad Agency Announcement for proposals
+4. **Select teams**: Choose performers and structure program
+5. **Manage program**: Track milestones, adjust course, transition technology
+6. **Transition**: Hand off successful technologies to services or industry
+
+**Implication for Proposers**:
+- PMs have the vision—your job is to execute it
+- Contact PM before proposing (almost always required)
+- Understand PM's technical vision and goals
+- Build relationship with PM (within ethical bounds)
+
+### The "DARPA-Hard" Test
+
+**Three Questions Every DARPA Program Must Answer**:
+
+1. **What are you trying to do?**
+ - Articulate objectives using absolutely no jargon
+ - Clear, specific technical goal
+
+2. **How is it done today, and what are the limits of current practice?**
+ - What's the current state of the art?
+ - Why are current approaches insufficient?
+ - What fundamental barriers exist?
+
+3. **What is new in your approach, and why do you think it will be successful?**
+ - What's the breakthrough insight or capability?
+ - Why hasn't this been done before?
+ - What's changed to make it possible now?
+
+**Additional Considerations**:
+- **Who cares?** (What's the national security impact?)
+- **What if you're right?** (What becomes possible?)
+- **What if you're wrong?** (Is the risk acceptable?)
+- **What if you succeed?** (Is there a transition path?)
+
+**DARPA Seeks**:
+- **High Risk**: 50% chance of failure is acceptable
+- **High Reward**: 10x improvement, not 10% improvement
+- **Measurable**: Clear metrics of success
+- **Transitional**: Path to operational use or commercial adoption
+
+## Types of DARPA Solicitations
+
+### 1. Broad Agency Announcements (BAAs)
+
+**Most Common Mechanism**: Open solicitations for specific program areas
+
+**Characteristics**:
+- Issued by program managers for specific programs
+- Describe technical objectives and research thrusts
+- Multiple submission deadlines or rolling submission
+- Full proposals typically 20-40 pages
+- Often require abstract or white paper first
+
+**Types of BAAs**:
+
+**Program BAAs**: For specific named programs
+- Clear technical objectives and metrics
+- Defined research areas (thrusts)
+- Specified deliverables and milestones
+- Known PM with clear vision
+
+**Office-Wide BAAs**: General solicitations by technical office
+- Broader scope, less prescriptive
+- Looking for transformative ideas
+- More flexibility in approach
+- May have multiple areas of interest
+
+### 2. Small Business Innovation Research (SBIR)
+
+**For Small Businesses**:
+- **Phase I**: $150K-$250K, 6-9 months (feasibility)
+- **Phase II**: $1M-$2M, 2 years (development)
+- **Phase III**: Non-SBIR funds (commercialization)
+
+### 3. Proposers Days and Special Notices
+
+**Proposers Day**: Pre-solicitation event
+- PM presents program vision and objectives
+- Q&A with potential proposers
+- Networking for team formation
+- Often required or strongly encouraged to attend
+
+**Special Notices**: Requests for Information (RFIs), teaming opportunities
+
+## DARPA Proposal Structure
+
+**Note**: Format varies by BAA. **Always follow the specific BAA instructions precisely.**
+
+### Typical Structure
+
+#### Volume 1: Technical and Management Proposal (20-40 pages)
+
+**Section 1: Executive Summary** (1-2 pages)
+- Overview of proposed research
+- Technical approach and innovation
+- Expected outcomes and deliverables
+- Team qualifications
+- Alignment with BAA objectives
+
+**Section 2: Goals and Impact** (2-3 pages)
+- Statement of the problem
+- Importance and national security relevance
+- Current state of the art and limitations
+- How your work will advance the state of the art
+- Impact if successful (What if true? Who cares?)
+- Alignment with DARPA program goals
+
+**Section 3: Technical Approach and Innovation** (10-20 pages)
+- Detailed technical plan organized by phase or thrust
+- Novel approaches and why they will work
+- Technical risks and mitigation strategies
+- Preliminary results or proof-of-concept data
+- Technical barriers and how to overcome them
+- Innovation and differentiation from existing work
+
+**Organized by Phase** (typical):
+
+**Phase 1 (Feasibility)**: 12-18 months
+- Technical objectives and milestones
+- Approach and methodology
+- Expected outcomes
+- Metrics for success
+- Go/no-go criteria for Phase 2
+
+**Phase 2 (Development)**: 18-24 months
+- Building on Phase 1 results
+- System integration and optimization
+- Testing and validation
+- Prototype development
+- Metrics and evaluation
+
+**Phase 3 (Demonstration)**: 12-18 months (if applicable)
+- Field testing or operational demonstration
+- Transition activities
+- Handoff to transition partner
+
+**Section 4: Capabilities and Resources** (2-3 pages)
+- Team qualifications and expertise
+- Facilities and equipment
+- Relevant prior work and publications
+- Subcontractor and collaborator roles
+- Organizational structure
+
+**Section 5: Statement of Work (SOW)** (3-5 pages)
+- Detailed task breakdown
+- Deliverables for each task
+- Milestones and metrics
+- Timeline (Gantt chart)
+- Dependencies and critical path
+- Government furnished property or information (if applicable)
+
+**Section 6: Schedule and Milestones** (1-2 pages)
+- Integrated master schedule
+- Key decision points
+- Deliverable schedule
+- Go/no-go criteria
+- Reporting and meeting schedule
+
+**Section 7: Technology Transition Plan** (2-3 pages)
+- Potential transition partners (military services, industry)
+- Pathway to operational use or commercialization
+- Market or operational analysis
+- Transition activities during the program
+- IP and licensing strategy (if applicable)
+
+#### Volume 2: Cost Proposal (separate)
+
+**Detailed Budget**:
+- Costs by phase, task, and year
+- Labor (personnel, hours, rates)
+- Materials and supplies
+- Equipment
+- Travel
+- Subcontracts
+- Other direct costs
+- Indirect costs (overhead, G&A)
+- Fee or profit (for industry)
+
+**Cost Narrative**:
+- Justification for each cost element
+- Labor categories and rates
+- Basis of estimate
+- Cost realism analysis
+- Supporting documentation
+
+**Supporting Documentation**:
+- Cost accounting standards
+- Approved indirect rate agreements
+- Subcontractor quotes or cost proposals
+
+#### Additional Volumes (if required)
+
+**Attachments**:
+- Quad charts (1-slide summary)
+- Relevant publications or technical papers
+- Letters of commitment from collaborators
+- Facilities descriptions
+- Equipment lists
+
+## Review Criteria
+
+### DARPA Evaluation Factors (Typical)
+
+**Primary Criteria** (usually equal weight):
+
+1. **Overall Scientific and Technical Merit**
+ - Technical soundness and feasibility
+ - Innovation and novelty
+ - Likelihood of achieving objectives
+ - Technical approach and methodology
+ - Understanding of problem and prior art
+ - Risk and risk mitigation
+
+2. **Potential Contribution and Relevance to DARPA Mission**
+ - Alignment with program objectives
+ - National security impact
+ - Advancement over state of the art
+ - Potential for revolutionary breakthrough
+ - "What if true? Who cares?" test
+
+3. **Cost Realism and Reasonableness**
+ - Budget aligned with technical plan
+ - Costs justified and realistic
+ - Value for investment
+ - Cost versus benefit analysis
+
+4. **Capabilities and Related Experience**
+ - Team qualifications and track record
+ - Facilities and resources adequate
+ - Relevant prior work
+ - Ability to deliver on time and on budget
+ - Management approach
+
+5. **Technology Transition**
+ - Pathway to operational use or market
+ - Transition partnerships
+ - Market analysis (if applicable)
+ - Plans for follow-on development
+ - IP strategy supporting transition
+
+### The "Heilmeier Catechism"
+
+**DARPA uses this set of questions** (created by former DARPA director George Heilmeier):
+
+1. What are you trying to do? Articulate your objectives using absolutely no jargon.
+2. How is it done today, and what are the limits of current practice?
+3. What is new in your approach and why do you think it will be successful?
+4. Who cares? If you succeed, what difference will it make?
+5. What are the risks?
+6. How much will it cost?
+7. How long will it take?
+8. What are the mid-term and final "exams" to check for success?
+
+**Your proposal should clearly answer all eight questions.**
+
+## DARPA Proposing Strategy
+
+### Before Writing
+
+**1. Contact the Program Manager**
+- Email PM to introduce yourself and idea
+- Request call to discuss fit with program
+- Attend Proposers Day if available
+- Ask clarifying questions about BAA
+
+**2. Form a Strong Team**
+- DARPA values multidisciplinary teams
+- Include complementary expertise
+- Mix of academia, industry, government labs
+- Clearly defined roles
+- Prior collaboration history (if possible)
+
+**3. Understand the Vision**
+- What is the PM trying to achieve?
+- What technical barriers need to be overcome?
+- What does success look like?
+- What are the program metrics?
+
+**4. Identify Transition Path**
+- Who will use the technology?
+- What's the path from prototype to product?
+- Who are potential transition partners?
+- What's the market or operational need?
+
+### Writing the Proposal
+
+**Lead with Impact**:
+- Open with the "so what?"
+- National security or economic impact
+- What becomes possible if you succeed?
+
+**Be Concrete and Specific**:
+- Clear technical objectives with metrics
+- Measurable milestones
+- Quantitative targets (10x improvement, not "better")
+- Specific deliverables
+
+**Demonstrate Innovation**:
+- What's the breakthrough?
+- Why hasn't this been done before?
+- What's changed to make it possible now?
+- How is this different from evolutionary approaches?
+
+**Address Risk Head-On**:
+- Identify technical risks explicitly
+- Explain mitigation strategies
+- Show that you've thought through failure modes
+- DARPA expects risk—don't hide it, manage it
+
+**Show You Can Execute**:
+- Detailed project plan with milestones
+- Team with relevant track record
+- Realistic schedule and budget
+- Go/no-go decision points
+- Management approach for complex programs
+
+**Emphasize Transition**:
+- Who will use the results?
+- Path to operationalization or commercialization
+- Engagement with potential users during program
+- IP strategy that enables transition
+
+### Common Mistakes
+
+1. **Incremental Research**: Proposing 10% improvement instead of 10x
+2. **Academic Focus**: Pure research without application focus
+3. **No Transition Plan**: No pathway to use or commercialization
+4. **Ignoring PM Vision**: Not aligned with program objectives
+5. **Vague Metrics**: "Improve" or "enhance" instead of quantitative targets
+6. **Underestimating Risk**: Claiming low risk (DARPA wants high risk, high reward)
+7. **Weak Team**: Insufficient expertise or poorly defined roles
+8. **No Differentiation**: Similar to existing efforts without clear advantage
+9. **Ignoring BAA**: Not following proposal format or requirements
+10. **Late Contact with PM**: Waiting until proposal due date to engage
+
+## DARPA Contracting and Performance
+
+### Award Types
+
+**Procurement Contracts**: Most common for industry
+- Firm Fixed Price (FFP)
+- Cost Plus Fixed Fee (CPFF)
+- Cost Plus Incentive Fee (CPIF)
+
+**Grants and Cooperative Agreements**: For universities and nonprofits
+- Grants: Minimal government involvement
+- Cooperative Agreements: Substantial government involvement
+
+**Other Transaction Agreements (OTAs)**: Flexible arrangements
+- For research not requiring FAR compliance
+- Faster, more flexible terms
+- Common for consortia and partnerships
+
+### Program Execution
+
+**Kickoff Meeting**: Program launch with all performers
+- PM presents program vision and goals
+- Performers present approaches
+- Technical exchange and collaboration
+
+**Quarterly Reviews**: Progress reviews (virtual or in-person)
+- Technical progress against milestones
+- Challenges and solutions
+- Path forward
+- PM feedback and course corrections
+
+**Annual or Phase Reviews**: Major assessment points
+- Comprehensive technical review
+- Go/no-go decisions
+- Budget and schedule adjustments
+
+**Site Visits**: PM and team visit performer sites
+- See technical work firsthand
+- Deep dive on specific areas
+- Team building and collaboration
+
+**Technical Interchange Meetings (TIMs)**: Deep dives on technical topics
+- Cross-performer collaboration
+- Sharing of results and approaches
+- Problem-solving sessions
+
+### Deliverables and Reporting
+
+**Monthly Reports**: Brief progress updates
+- Technical progress
+- Budget status
+- Issues and concerns
+
+**Quarterly Reports**: Detailed technical reporting
+- Accomplishments against milestones
+- Data and results
+- Upcoming activities
+- Publications and IP
+
+**Final Report**: Comprehensive program summary
+- Technical achievements
+- Lessons learned
+- Transition activities
+- Future directions
+
+**Technical Data and Prototypes**: Specified in contract
+- Software and code
+- Hardware prototypes
+- Data sets
+- Documentation
+
+## DARPA Culture and Expectations
+
+### High Risk is Expected
+
+- DARPA programs should have ~50% probability of failure
+- Failure is acceptable if lessons are learned
+- "Fail fast" to redirect resources
+- Transparency about challenges valued
+
+### Rapid Pivots
+
+- PM may redirect program based on results
+- Flexibility to pursue unexpected opportunities
+- Willingness to stop unproductive efforts
+- Adaptability is key
+
+### Transition Focus
+
+- Technology must have a path to use
+- Engagement with transition partners during program
+- Demonstrate prototypes and capabilities
+- Handoff to services or industry
+
+### Collaboration and Teaming
+
+- Performers expected to collaborate
+- Share results and insights (within IP bounds)
+- Attend all program meetings
+- Support overall program goals, not just own project
+
+## Recent DARPA Priorities and Programs
+
+### Key Technology Areas (2024-2025)
+
+**Artificial Intelligence and Autonomy**:
+- Trustworthy AI
+- AI reasoning and understanding
+- Human-AI teaming
+- Autonomous systems across domains
+
+**Quantum Technologies**:
+- Quantum computing and algorithms
+- Quantum sensing and metrology
+- Quantum communications
+- Post-quantum cryptography
+
+**Biotechnology**:
+- Pandemic prevention and response
+- Synthetic biology
+- Human performance
+- Bio-manufacturing
+
+**Microelectronics and Computing**:
+- Advanced chip design and manufacturing
+- Novel computing architectures
+- 3D heterogeneous integration
+- RF and millimeter-wave systems
+
+**Hypersonics and Advanced Materials**:
+- Hypersonic weapons and defense
+- Advanced materials and manufacturing
+- Thermal management
+- Propulsion
+
+**Space Technologies**:
+- Space domain awareness
+- On-orbit servicing and manufacturing
+- Small satellite technologies
+- Space-based intelligence
+
+**Network Technologies**:
+- Secure communications
+- Resilient networks
+- Spectrum dominance
+- Cyber defense
+
+## Tips for Competitive DARPA Proposals
+
+### Do's
+
+✅ **Contact PM early** - Before writing, discuss your idea
+✅ **Attend Proposers Day** - Essential for understanding program
+✅ **Form strong team** - Complementary expertise, clear roles
+✅ **Be bold and ambitious** - 10x goals, not 10% improvements
+✅ **Quantify everything** - Specific metrics and targets
+✅ **Address transition** - Clear path to operational use
+✅ **Identify risks explicitly** - And explain mitigation
+✅ **Show preliminary results** - Proof of concept or feasibility
+✅ **Follow BAA exactly** - Format, page limits, content requirements
+✅ **Emphasize innovation** - What's revolutionary about your approach?
+
+### Don'ts
+
+❌ **Don't propose incremental research** - DARPA wants breakthroughs
+❌ **Don't ignore national security relevance** - "Who cares?" matters
+❌ **Don't be vague** - Specific objectives, metrics, deliverables
+❌ **Don't hide risk** - DARPA expects and values high-risk research
+❌ **Don't forget transition** - Technology must have path to use
+❌ **Don't propose basic research** - That's for ONR, AFOSR, ARO
+❌ **Don't exceed page limits** - Automatic rejection
+❌ **Don't ignore PM feedback** - They're setting the direction
+❌ **Don't propose alone if team needed** - DARPA values strong teams
+❌ **Don't submit without PM contact** - Critical to gauge fit
+
+## Resources
+
+- **DARPA Website**: https://www.darpa.mil
+- **DARPA Opportunities**: https://www.darpa.mil/work-with-us/opportunities
+- **BAA Listings**: https://beta.sam.gov (search "DARPA")
+- **DARPA Social Media**: Twitter @DARPA (PMs often announce programs)
+- **SBIR/STTR**: https://www.darpa.mil/work-with-us/for-small-businesses
+- **Heilmeier Catechism**: https://www.darpa.mil/about-us/timeline/heilmeier-catechism
+
+### Key Contacts
+
+- **DARPA Contracting**: via BAA points of contact
+- **Program Managers**: Contact info in BAAs and program pages
+- **SBIR/STTR Office**: sbir@darpa.mil
+
+---
+
+**Key Takeaway**: DARPA seeks revolutionary breakthroughs that advance national security, not incremental research. Successful proposals articulate clear, measurable objectives (answering "what if true?"), demonstrate innovative approaches to "DARPA-hard" problems, include strong multidisciplinary teams, proactively address technical risks, and provide realistic paths to transition. Early engagement with the Program Manager is essential—DARPA is a PM-driven agency where understanding the vision is critical to success.
+
diff --git a/scientific-skills/research-grants/references/doe_guidelines.md b/scientific-skills/research-grants/references/doe_guidelines.md
new file mode 100644
index 0000000..954bb5f
--- /dev/null
+++ b/scientific-skills/research-grants/references/doe_guidelines.md
@@ -0,0 +1,586 @@
+# DOE (Department of Energy) Grant Writing Guidelines
+
+## Agency Overview
+
+**Mission**: Ensure America's security and prosperity by addressing energy, environmental, and nuclear challenges through transformative science and technology solutions
+
+**Annual Budget**: ~$50 billion (includes national laboratories, energy programs, nuclear security)
+
+**Website**: https://www.energy.gov
+
+**Key Characteristics**:
+- Focus on energy, climate, environmental, computational, and physical sciences
+- Operates 17 national laboratories (largest science infrastructure in US)
+- Strong emphasis on industry partnerships and commercialization
+- Basic science through applied research and development
+- Cost sharing often required
+- National security and energy security priorities
+
+## Major DOE Offices and Programs
+
+### Office of Science (SC)
+
+**Budget**: ~$8 billion (largest supporter of physical sciences research in US)
+
+**Mission**: Deliver scientific discoveries and major scientific tools to transform our understanding of nature and advance energy, economic, and national security
+
+**Program Offices**:
+
+1. **Advanced Scientific Computing Research (ASCR)**
+ - High-performance computing
+ - Applied mathematics
+ - Computational sciences
+ - Exascale computing
+
+2. **Basic Energy Sciences (BES)**
+ - Materials science and engineering
+ - Chemical sciences
+ - Condensed matter and materials physics
+ - User facilities (light sources, neutron sources)
+
+3. **Biological and Environmental Research (BER)**
+ - Biological systems science
+ - Climate and environmental sciences
+ - Environmental molecular sciences laboratory
+
+4. **Fusion Energy Sciences (FES)**
+ - Plasma physics
+ - Fusion energy development
+ - ITER collaboration
+
+5. **High Energy Physics (HEP)**
+ - Particle physics
+ - Accelerator science
+ - Quantum information science
+
+6. **Nuclear Physics (NP)**
+ - Nuclear structure and dynamics
+ - Relativistic heavy ions
+ - Fundamental symmetries
+
+**Funding Mechanisms**:
+- **Early Career Research Program**: $750K over 5 years for early career scientists
+- **Funding Opportunity Announcements (FOAs)**: Program-specific solicitations
+- **Laboratory Directed Research and Development (LDRD)**: For national lab staff
+
+### ARPA-E (Advanced Research Projects Agency-Energy)
+
+**Mission**: Advance high-potential, high-impact energy technologies that are too early for private-sector investment
+
+**Characteristics**:
+- High-risk, high-reward transformative energy technologies
+- Requires cost sharing (typically 20% for universities, more for industry)
+- Emphasis on pathway to commercialization
+- Strong project management and milestones
+- Budget: ~$500M annually
+
+**Program Types**:
+- **Focused Programs**: Specific technology areas (announced via FOAs)
+- **OPEN**: General solicitation across all energy technologies
+- **SCALEUP**: Bridging from lab to market
+
+**Typical Funding**:
+- $1-10M per project
+- 1-3 years duration
+- Technology transition focus
+
+### Office of Energy Efficiency and Renewable Energy (EERE)
+
+**Mission**: Accelerate development and deployment of clean energy technologies
+
+**Program Areas**:
+- **Solar Energy Technologies Office (SETO)**
+- **Wind Energy Technologies Office (WETO)**
+- **Water Power Technologies Office (WPTO)**
+- **Geothermal Technologies Office (GTO)**
+- **Building Technologies Office (BTO)**
+- **Advanced Manufacturing Office (AMO)**
+- **Vehicle Technologies Office (VTO)**
+- **Bioenergy Technologies Office (BETO)**
+- **Hydrogen and Fuel Cell Technologies Office (HFTO)**
+
+**Funding Mechanisms**:
+- FOAs for specific technology areas
+- Small Business Innovation Research (SBIR)
+- Technology Commercialization Fund (TCF)
+
+### Office of Fossil Energy and Carbon Management (FECM)
+
+**Focus**: Carbon capture, utilization, and storage; hydrogen; critical minerals
+
+### Office of Nuclear Energy (NE)
+
+**Focus**: Advanced reactor technologies, nuclear fuel cycle, university programs
+
+## DOE Proposal Structure
+
+DOE proposal requirements vary significantly by program office and FOA. **Always read the specific FOA carefully.**
+
+### Common Elements
+
+#### Project Narrative (varies, typically 10-20 pages)
+
+**Typical Structure**:
+
+1. **Executive Summary / Abstract** (1 page)
+ - Project objectives and technical approach
+ - Expected outcomes and impact
+ - Team qualifications
+ - Alignment with DOE mission
+
+2. **Background and Motivation** (2-3 pages)
+ - Current state of technology or knowledge
+ - Problem or opportunity
+ - Why DOE investment is needed
+ - Alignment with program goals
+
+3. **Technical Approach and Innovation** (5-10 pages)
+ - Detailed technical plan
+ - Methodology and approach
+ - Innovation and novelty
+ - Risk assessment and mitigation
+ - Go/no-go decision points
+ - Performance metrics
+
+4. **Impact and Energy Relevance** (1-2 pages)
+ - Expected technical outcomes
+ - Energy impact (cost, efficiency, emissions)
+ - Pathway to deployment or commercialization
+ - Economic benefits
+ - Timeline to market (for applied programs)
+
+5. **Management Plan** (1-2 pages)
+ - Team organization and roles
+ - Timeline and milestones
+ - Risk management
+ - Communication and reporting
+
+6. **Qualifications and Resources** (1-2 pages)
+ - Team expertise and experience
+ - Relevant prior work
+ - Facilities and equipment
+ - National lab or industry partners
+
+#### Budget and Budget Justification
+
+**Federal Cost Share**:
+- Specify DOE funding requested by year
+- Break down by category (labor, equipment, travel, etc.)
+- Detailed justification for each item
+
+**Cost Share** (often required):
+- Specify source (cash vs. in-kind)
+- Document commitment (letters from sponsors)
+- Typical requirements:
+ - Universities: 20% (ARPA-E)
+ - Industry: 50% or more
+ - National labs: Varies
+
+**Budget Categories**:
+- Labor (personnel with hours/rates)
+- Fringe benefits
+- Travel
+- Equipment and capital items
+- Materials and supplies
+- Other direct costs
+- Subawards/subcontracts
+- Indirect costs (F&A)
+
+#### Biographical Sketches
+
+**Format**: Often DOE-specific or NSF-style
+- Professional preparation
+- Appointments
+- Relevant publications (5-10 most relevant)
+- Synergistic activities
+- Collaborators
+
+#### Work Breakdown Structure (WBS)
+
+**Often Required**: Detailed breakdown of tasks, milestones, and deliverables
+- Task structure aligned with budget
+- Quarterly or annual milestones
+- Deliverables for each task
+- Responsible parties
+
+#### Letters of Commitment
+
+**Required for**:
+- Cost share partners
+- Collaborating institutions
+- National laboratory partnerships
+- Industry partners
+- Access to facilities or resources
+
+**Must Include**:
+- Specific commitment (funding, personnel, equipment)
+- Signed by authorized representative
+- On institutional letterhead
+
+#### Facilities and Equipment
+
+**Describe**:
+- Available facilities relevant to project
+- Major equipment accessible
+- Computational resources
+- Unique capabilities
+
+#### Data Management Plan (DMP)
+
+**Increasingly Required**:
+- Types of data to be generated
+- Standards and formats
+- Access and sharing policies
+- Long-term preservation
+- Compliance with DOE policies
+
+## Review Criteria
+
+### Office of Science (SC) General Criteria
+
+Proposals typically evaluated on:
+
+1. **Scientific and/or Technical Merit** (35-40%)
+ - Importance and relevance of research
+ - Appropriateness of proposed method or approach
+ - Scientific or technical innovation
+ - Clarity of objectives and expected outcomes
+
+2. **Appropriateness of Proposed Method or Approach** (25-30%)
+ - Technical feasibility
+ - Likelihood of success
+ - Adequacy of project design
+ - Rigor of technical approach
+
+3. **Competency of Personnel and Adequacy of Facilities** (20-25%)
+ - Qualifications of PI and team
+ - Track record in relevant areas
+ - Access to necessary facilities and equipment
+ - Institutional support
+
+4. **Reasonableness and Appropriateness of Budget** (10-15%)
+ - Budget aligned with proposed work
+ - Appropriate allocation of resources
+ - Cost effectiveness
+
+5. **Relevance to DOE Mission and Program Goals** (10-15%)
+ - Alignment with program priorities
+ - Contribution to DOE mission
+ - Potential impact on energy/environment
+
+### ARPA-E Review Criteria
+
+**ARPA-E uses concept paper → full application process**
+
+**Concept Paper Review** (typically 3-5 pages):
+- Technical innovation and impact
+- Potential for transformative advance
+- Relevance to energy applications
+- Feasibility (team, approach)
+
+**Full Application Review** (if invited):
+
+1. **Impact** (40%)
+ - Potential to dramatically improve energy technology
+ - Energy and economic impact
+ - Transformative vs. incremental
+ - Pathway to market adoption
+
+2. **Innovation/Technical Merit** (30%)
+ - Novel approach or technology
+ - Technical rigor and feasibility
+ - Likelihood of meeting targets
+ - Risk and risk mitigation
+
+3. **Qualifications** (20%)
+ - Team expertise and experience
+ - Resources and capabilities
+ - Management plan
+ - Track record
+
+4. **Workplan** (10%)
+ - Clear milestones and go/no-go points
+ - Realistic timeline
+ - Appropriate budget
+ - Risk management
+
+### Technology-to-Market (T2M) Evaluation (ARPA-E)
+
+**Critical Component**: Path to commercialization
+
+**Assessed**:
+- Market opportunity and size
+- Competitive landscape
+- Barriers to adoption
+- Go-to-market strategy
+- Partnership and commercialization plan
+- Economic viability
+
+**Common Mistakes**:
+- Underestimating time to market
+- Ignoring competing technologies
+- Unrealistic cost projections
+- No clear adoption pathway
+
+## DOE-Specific Considerations
+
+### National Laboratory Collaboration
+
+**Benefits**:
+- Access to unique facilities and expertise
+- Leveraging world-class capabilities
+- Credibility and track record
+
+**Mechanisms**:
+- **Subcontract**: Lab is subcontractor to university/company
+- **Cooperative Research and Development Agreement (CRADA)**: Partnership with industry
+- **User Facility Proposal**: Access to major DOE user facilities
+- **Strategic Partnership Project (SPP)**: Formal collaboration
+
+**Process**:
+- Identify appropriate lab partner early
+- Contact lab scientist to discuss collaboration
+- Develop work scope and budget together
+- Obtain lab approval (can take 2-3 months)
+- Include letter of commitment
+
+**Major National Labs**:
+- Argonne (ANL), Brookhaven (BNL), Lawrence Berkeley (LBNL)
+- Oak Ridge (ORNL), Pacific Northwest (PNNL), SLAC
+- Sandia (SNL), Los Alamos (LANL), Lawrence Livermore (LLNL)
+- National Renewable Energy Lab (NREL), Idaho (INL), Fermilab
+
+### User Facilities
+
+**DOE operates 28 major user facilities** open to researchers
+
+**Types**:
+- **Light Sources**: X-ray and neutron scattering (APS, NSLS-II, ALS, etc.)
+- **Nanoscale Science Centers**: Fabrication and characterization
+- **High-Performance Computing**: Supercomputing centers (OLCF, NERSC, ALCF)
+- **Genomic Science**: JGI, EMSL
+- **Accelerators and Detectors**: Particle and nuclear physics facilities
+
+**Access**:
+- Submit user proposal (separate from research proposal)
+- Peer-reviewed allocation of beam time or computing hours
+- No cost for non-proprietary research
+- Can include user facility access in grant proposals
+
+### Cost Sharing Requirements
+
+**Varies by Program**:
+- **Office of Science**: Generally not required (except specific FOAs)
+- **ARPA-E**: Required (typically 20% universities, 50%+ industry)
+- **EERE**: Often required (varies by program)
+- **FECM**: Often required
+
+**Types**:
+- **Cash**: Direct contribution of funds
+- **In-kind**: Personnel time, equipment use, materials
+- **Third-party**: Contribution from collaborator or sponsor
+
+**Requirements**:
+- Must be documented and verifiable
+- Cannot be used for other federal awards
+- Must be from non-federal sources (generally)
+- Need letters of commitment
+
+### Technology Readiness Levels (TRLs)
+
+**DOE uses TRL scale 1-9** for technology development programs
+
+**TRL Definitions**:
+- **TRL 1-3**: Basic research (idea → proof of concept)
+- **TRL 4-6**: Development (component → system prototype)
+- **TRL 7-9**: Demonstration and deployment (prototype → commercial)
+
+**Funding by TRL**:
+- **Office of Science**: TRL 1-3 (basic research)
+- **ARPA-E**: TRL 2-5 (proof of concept → prototype)
+- **EERE**: TRL 4-8 (development → demonstration)
+
+**Specify in Proposal**:
+- Current TRL of technology
+- Target TRL at project end
+- Path from current to target
+
+### Intellectual Property and Data Rights
+
+**Standard Terms**:
+- Awardee generally retains IP rights
+- Government retains license for government purposes
+- Must report inventions to DOE
+- May have data sharing requirements
+
+**Industry Partners**:
+- Negotiate IP and data rights in advance
+- Protected CRADA information (5 years)
+- Background IP vs. foreground IP
+
+### Teaming and Partnerships
+
+**Encouraged for**:
+- University-national lab partnerships
+- University-industry partnerships
+- Multi-institutional teams
+- International collaborations (with approval)
+
+**Teaming Partner Lists**: ARPA-E and other programs often provide teaming lists or events
+
+## Submission Process
+
+### Finding Opportunities
+
+**Sources**:
+- **EERE Exchange**: https://eere-exchange.energy.gov
+- **ARPA-E OPEN**: https://arpa-e.energy.gov
+- **Office of Science FOAs**: https://science.osti.gov/grants/Funding-Opportunities
+- **Grants.gov**: Federal grants database
+- **FedConnect**: Subscribe to FOA announcements
+
+### Application Systems
+
+**Varies by Office**:
+- **EERE Exchange**: EERE programs
+- **PAMS (Portfolio Analysis and Management System)**: Office of Science
+- **ARPA-E OPEN**: ARPA-E submissions
+- **Grants.gov**: Some programs
+
+**Registration Required** (can take 2-4 weeks):
+- SAM.gov (System for Award Management)
+- Grants.gov
+- DOE program-specific systems
+
+### Proposal Development Timeline
+
+**Recommended Timeline**:
+- **3-6 months before deadline**: Identify FOA, assemble team, contact lab partners
+- **2-3 months**: Develop technical approach, secure commitments
+- **1-2 months**: Draft proposal, prepare budget
+- **2-4 weeks**: Internal review, revisions
+- **1 week**: Final preparation, institutional approvals
+- **48 hours early**: Submit (don't wait for deadline)
+
+### Required Registrations
+
+**Before First Submission**:
+1. **SAM.gov**: System for Award Management (2-3 weeks)
+2. **Grants.gov**: Account and authorization (1 week)
+3. **FedConnect**: Optional, for notifications
+4. **PAMS/EERE Exchange**: Program-specific (immediate)
+
+**Institutional Requirements**:
+- Authorized Organizational Representative (AOR)
+- Institutional approvals
+- Cost accounting systems
+
+## Review and Award Process
+
+### Timeline
+
+**Varies by Program**:
+- **Office of Science**: 3-6 months
+- **ARPA-E**: 4-6 months (after full application invitation)
+- **EERE**: 3-6 months
+
+**Steps**:
+1. Administrative compliance check
+2. Peer review (external reviewers)
+3. Program manager evaluation
+4. Selection for award negotiation
+5. Budget negotiation
+6. Award issuance
+
+### Reviewer Feedback
+
+**Provided**:
+- Reviewer comments (often anonymized)
+- Strengths and weaknesses
+- Scores by criterion
+
+**Not Always Provided**: Some programs provide limited feedback
+
+### Success Rates
+
+**Varies Widely**:
+- **Office of Science Early Career**: ~10-15%
+- **ARPA-E OPEN**: ~2-5% (concept papers → awards)
+- **EERE FOAs**: 10-30% (depends on program)
+- **Office of Science FOAs**: 20-40% (varies)
+
+## Writing Tips for Competitive DOE Proposals
+
+### Do's
+
+✅ **Align with DOE mission** - Energy, environment, or national security relevance
+✅ **Emphasize impact** - How will this advance energy technology or science?
+✅ **Quantify outcomes** - Energy savings, efficiency gains, cost reductions
+✅ **Show pathway to deployment** - For applied programs, how will technology reach market?
+✅ **Leverage DOE capabilities** - National labs, user facilities, unique resources
+✅ **Include strong management plan** - Milestones, go/no-go, risk mitigation
+✅ **Demonstrate team qualifications** - Track record in relevant area
+✅ **Be specific about innovation** - What's new and why it matters
+✅ **Address technology readiness** - Current TRL and path forward
+✅ **Secure cost share commitments** - If required, get letters early
+
+### Don'ts
+
+❌ **Don't ignore FOA requirements** - Each FOA is different, read carefully
+❌ **Don't underestimate timeline** - Allow time for registrations and approvals
+❌ **Don't forget cost share** - If required, must be documented
+❌ **Don't overlook lab partnerships** - Can strengthen proposal significantly
+❌ **Don't be vague about impact** - Need quantitative energy/economic metrics
+❌ **Don't ignore commercialization** - For applied programs, market path is critical
+❌ **Don't submit without institutional approval** - Need AOR sign-off
+❌ **Don't wait for deadline** - Systems crash, submit 48 hours early
+❌ **Don't propose basic science to ARPA-E** - Or applied research to Office of Science
+❌ **Don't forget TRL discussion** - Important for technology programs
+
+### Common Mistakes
+
+1. **Wrong Program**: Proposing to inappropriate office or program
+2. **Insufficient Energy Relevance**: Not clearly tied to DOE mission
+3. **Weak Commercialization Plan**: For ARPA-E and EERE, lack of market strategy
+4. **Unrealistic Milestones**: Overly optimistic timelines
+5. **Poor Budget Justification**: Budget doesn't align with technical plan
+6. **Missing Cost Share**: If required, not documented properly
+7. **Weak Team**: Insufficient expertise or track record
+8. **Ignoring Competing Technologies**: Not addressing competitive landscape
+
+## Recent DOE Priorities (2024-2025)
+
+### Key Focus Areas
+
+- **Clean Energy Transition**: Renewable energy, storage, grid modernization
+- **Carbon Management**: Carbon capture, utilization, storage, removal
+- **Critical Materials**: Supply chain security, recycling, substitutes
+- **Advanced Manufacturing**: Energy-efficient processes, sustainable materials
+- **Quantum Information Science**: Computing, sensing, communications
+- **Fusion Energy**: Accelerating fusion development
+- **Hydrogen Economy**: Production, storage, utilization
+- **Nuclear Energy**: Advanced reactors, microreactors, fuel cycle
+- **Climate Adaptation**: Climate modeling, resilience, impacts
+- **Energy Equity**: Environmental justice, workforce development
+
+### Major Initiatives
+
+- **Energy Earthshots**: Ambitious R&D goals (Hydrogen Shot, Long Duration Storage, Carbon Negative, etc.)
+- **Bipartisan Infrastructure Law**: $62B for DOE programs
+- **Inflation Reduction Act**: Clean energy tax credits and programs
+- **CHIPS and Science Act**: Microelectronics, quantum, clean energy manufacturing
+
+## Resources
+
+- **DOE Office of Science**: https://science.osti.gov
+- **ARPA-E**: https://arpa-e.energy.gov
+- **EERE**: https://www.energy.gov/eere
+- **DOE National Laboratories**: https://www.energy.gov/national-laboratories
+- **EERE Exchange**: https://eere-exchange.energy.gov
+- **Grants.gov**: https://www.grants.gov
+- **SAM.gov**: https://sam.gov
+
+---
+
+**Key Takeaway**: DOE proposals require strong alignment with energy and national security missions, clear pathway to impact (especially for applied programs), and often benefit from partnerships with national laboratories or industry. Cost sharing, technology readiness levels, and commercialization strategies are critical considerations for competitive proposals.
+
diff --git a/scientific-skills/research-grants/references/nih_guidelines.md b/scientific-skills/research-grants/references/nih_guidelines.md
new file mode 100644
index 0000000..124325b
--- /dev/null
+++ b/scientific-skills/research-grants/references/nih_guidelines.md
@@ -0,0 +1,851 @@
+# NIH (National Institutes of Health) Grant Writing Guidelines
+
+## Agency Overview
+
+**Mission**: To seek fundamental knowledge about the nature and behavior of living systems and to apply that knowledge to enhance health, lengthen life, and reduce illness and disability
+
+**Annual Budget**: ~$47 billion (largest biomedical research funder globally)
+
+**Website**: https://www.nih.gov
+
+**Key Characteristics**:
+- 27 Institutes and Centers (ICs), each with specific research focus
+- Supports biomedical and behavioral research
+- Strong emphasis on rigor, reproducibility, and translation
+- Clinical trials and human subjects research
+- Patient-oriented and population health research
+
+## NIH Institutes and Centers (Major ICs)
+
+- **NCI** - National Cancer Institute
+- **NHLBI** - National Heart, Lung, and Blood Institute
+- **NIDDK** - National Institute of Diabetes and Digestive and Kidney Diseases
+- **NIAID** - National Institute of Allergy and Infectious Diseases
+- **NIGMS** - National Institute of General Medical Sciences
+- **NINDS** - National Institute of Neurological Disorders and Stroke
+- **NIMH** - National Institute of Mental Health
+- **NICHD** - National Institute of Child Health and Human Development
+- **NEI** - National Eye Institute
+- **NIEHS** - National Institute of Environmental Health Sciences
+- **NIA** - National Institute on Aging
+- **NIAAA** - National Institute on Alcohol Abuse and Alcoholism
+- **NIDA** - National Institute on Drug Abuse
+- **NHGRI** - National Human Genome Research Institute
+- **NCCIH** - National Center for Complementary and Integrative Health
+
+**Plus**: NIBIB, NIDCD, NIDCR, NINR, FIC, NLM, and others
+
+## Core Review Criteria
+
+NIH proposals are evaluated using **scored criteria** (1-9 scale, 1 = exceptional, 9 = poor) and **additional review considerations** (not scored but discussed).
+
+### Scored Criteria (Overall Impact Score)
+
+#### 1. Significance
+
+**Definition**: Does the project address an important problem or critical barrier to progress?
+
+**Key Questions**:
+- Will the project improve scientific knowledge, technical capability, or clinical practice?
+- How will successful completion move the field forward?
+- Does it address important scientific question or health need?
+- Is there a clear rationale based on literature or preliminary data?
+
+**What Reviewers Look For**:
+- Clear statement of the problem and its importance
+- Evidence that solving this problem will advance the field
+- Strong conceptual framework
+- Potential for broad impact (not just narrow niche)
+- Alignment with NIH and Institute mission
+
+**Writing Strategy**:
+- Open with compelling statement of health burden or knowledge gap
+- Cite epidemiological data, morbidity/mortality statistics
+- Show that current approaches are insufficient
+- Demonstrate how your work will make a difference
+- Connect to clinical or translational outcomes when possible
+
+#### 2. Investigator(s)
+
+**Definition**: Are the investigators appropriately trained and well-suited to carry out this work?
+
+**Key Questions**:
+- Do they have appropriate expertise and track record?
+- Is the proposed leadership approach appropriate for the project?
+- Do they have prior experience in the research area?
+- For Early Stage Investigators (ESI), is appropriate mentoring/support available?
+
+**What Reviewers Look For**:
+- Publications in the relevant area
+- Preliminary data demonstrating capability
+- Productivity and consistency
+- Appropriate team composition
+- For new investigators: strong mentorship and institutional support
+- Career trajectory aligned with proposed work
+
+**Writing Strategy**:
+- Highlight most relevant publications (not total number)
+- Show progression and focus in research program
+- Demonstrate that you have necessary skills
+- If new area, show collaborations or training
+- For multi-PI, clearly define complementary roles
+- Show stability and institutional commitment
+
+#### 3. Innovation
+
+**Definition**: Does the application challenge existing paradigms or develop new methodologies, technologies, or interventions?
+
+**Key Questions**:
+- Does the project employ novel concepts, approaches, or methodologies?
+- Are the aims original and innovative?
+- Does it challenge existing paradigms or address an innovative hypothesis?
+- Does it refine, improve, or develop new instrumentation or methods?
+
+**What Reviewers Look For**:
+- Departure from standard approaches
+- Novel application of methods to new problems
+- Development of new technologies or tools
+- Paradigm-shifting concepts
+- Creative experimental design
+- NOT just new to you, but new to the field
+
+**Writing Strategy**:
+- Explicitly state what is innovative
+- Contrast with existing approaches and limitations
+- Explain why innovation is necessary
+- Provide preliminary data supporting feasibility
+- Balance novelty with achievability
+- Avoid over-claiming (incremental work ≠ transformative)
+
+#### 4. Approach
+
+**Definition**: Are the overall strategy, methodology, and analyses well-reasoned, appropriate, and rigorous?
+
+**Key Questions**:
+- Are the research design and methods appropriate for the proposed aims?
+- Are potential problems, alternative strategies, and benchmarks for success presented?
+- Is the timeline reasonable and is there adequate statistical power?
+- Are the data management and analysis plans appropriate?
+- Is rigor and transparency evident in the experimental design?
+
+**What Reviewers Look For**:
+- Detailed, specific methodology
+- Appropriate experimental design (controls, replicates, randomization, blinding)
+- Statistical justification (power calculations, sample size)
+- Potential pitfalls identified with alternatives
+- Feasibility demonstrated with preliminary data
+- Logical flow from aims through methods to expected outcomes
+- Rigor and reproducibility measures
+
+**Writing Strategy**:
+- Provide sufficient detail to judge feasibility
+- Use subheadings for organization
+- Include flowcharts or diagrams
+- Address authentication of key biological resources
+- Discuss biological variables (sex, age, etc.)
+- Identify potential problems proactively
+- Provide contingency plans
+- Show that timeline is realistic
+- Include preliminary data throughout
+
+#### 5. Environment
+
+**Definition**: Will the scientific environment contribute to the probability of success?
+
+**Key Questions**:
+- Do the proposed studies benefit from unique features of the scientific environment?
+- Are the institutional support, equipment, and resources available?
+- Are collaborative arrangements and contributions from colleagues appropriate?
+- Is the environment conducive to the proposed research?
+
+**What Reviewers Look For**:
+- Access to necessary facilities (core facilities, equipment, patient populations)
+- Institutional commitment and support
+- Collaborative networks
+- Track record of institutional productivity
+- Training environment (for training grants)
+- Sufficient space and resources
+
+**Writing Strategy**:
+- Highlight unique institutional resources
+- Describe relevant core facilities with capabilities
+- Show institutional investment in your research area
+- Include letters documenting access to resources
+- Describe collaborative environment
+- For clinical research, show access to patient populations
+
+### Additional Review Considerations (Not Scored)
+
+These factors are discussed but do not contribute to the numerical score:
+
+#### Protection of Human Subjects
+- IRB approval status and process
+- Risks to subjects justified by potential benefits
+- Protections against risks adequate
+- Informed consent process appropriate
+- Data and safety monitoring plan (for trials)
+- Inclusion of women, minorities, and children (see below)
+
+#### Inclusion of Women, Minorities, and Children
+- Adequate plan for inclusion of all groups
+- Justification if any group excluded
+- Statistical power adequate to detect differences
+- Outreach and recruitment plans appropriate
+
+#### Vertebrate Animals
+- IACUC approval status
+- Proposed procedures appropriate and humane
+- Minimization of discomfort, distress, pain
+- Euthanasia method appropriate
+- Justification of species and numbers
+
+#### Biohazards
+- Appropriate safeguards and containment
+- Training and expertise adequate
+
+#### Resubmission (A1 applications)
+- Are concerns from previous review adequately addressed?
+- Has the application been substantially improved?
+
+#### Budget and Period of Support
+- Is budget reasonable for proposed work?
+- Is timeline appropriate?
+
+#### Resource Sharing Plans
+- Data sharing plan adequate
+- Model organism sharing plan (if applicable)
+- Genomic data sharing plan (if applicable)
+
+## Proposal Structure and Page Limits
+
+### Specific Aims (1 page)
+
+**Most important page of the entire application.** Reviewers often make initial impressions based on this page alone.
+
+**Structure** (see detailed template in `specific_aims_guide.md`):
+
+**Opening Paragraph** (3-5 sentences):
+- Long-term goal of your research program
+- Health burden or knowledge gap
+- Critical need that motivates the work
+
+**Objective and Central Hypothesis** (1 paragraph):
+- Objective of THIS grant
+- Central hypothesis or research question
+- Rationale (brief mention of preliminary data)
+
+**Specific Aims** (2-4 aims):
+- Each aim: 1 paragraph (half page max)
+- Aim statement (1-2 sentences, starts with action verb)
+- Working hypothesis or research question
+- Rationale (why this aim, what preliminary data supports it)
+- Approach summary (brief methods)
+- Expected outcomes and interpretation
+
+**Payoff Paragraph** (closing):
+- Expected outcomes of the overall project
+- How findings will advance the field
+- Positive impact on health (if relevant)
+- Next steps or future directions
+
+**Critical Rules**:
+- Exactly 1 page (0.5-inch margins, 11-point Arial or similar)
+- Must stand alone (reviewers read this first)
+- Clear, specific aims that are testable
+- Aims should be independent but synergistic
+- Avoid jargon (panel members may not be in your subfield)
+- Every sentence must earn its place
+
+### Research Strategy (12 pages for R01)
+
+**Section A: Significance** (typically 2-3 pages)
+
+**Purpose**: Convince reviewers the problem is important and worth solving
+
+**Content**:
+- State the problem and its importance (health burden, knowledge gap)
+- Review current state of knowledge (focused literature review)
+- Identify limitations of current approaches
+- Explain conceptual advance your work will provide
+- Describe potential impact on the field or health outcomes
+- Explain alignment with NIH mission and Institute priorities
+
+**Writing Tips**:
+- Start broad (importance of the problem) then narrow (specific gap)
+- Use epidemiological data (prevalence, mortality, costs)
+- Cite key literature systematically
+- Identify the specific barrier or gap your work addresses
+- End with how your work will advance the field
+
+**Section B: Innovation** (typically 1-2 pages)
+
+**Purpose**: Articulate what is novel and transformative
+
+**Content**:
+- Describe innovative elements of the proposed research
+- Explain novel concepts, approaches, or methodologies
+- Contrast with existing approaches and their limitations
+- Explain why innovation is necessary (not just different)
+- Demonstrate that innovation is achievable (preliminary data)
+
+**Writing Tips**:
+- Be explicit about what is innovative (don't assume it's obvious)
+- Distinguish incremental from transformative advances
+- Provide evidence that novel approach can work
+- Don't confuse "new to me" with "new to the field"
+- Avoid over-claiming
+
+**Section C: Approach** (typically 8-10 pages)
+
+**Purpose**: Provide detailed research plan demonstrating feasibility
+
+**Organization** (for each Specific Aim):
+
+**Aim [Number]: [Aim Title]**
+
+**Rationale and Preliminary Data**:
+- Why this aim is important
+- Preliminary results supporting feasibility
+- Key figures and data
+
+**Research Design**:
+- Overall experimental design
+- Subject/sample populations and numbers
+- Randomization, blinding, controls
+- Timeline for this aim
+
+**Methods** (organized by sub-aim or experiment):
+- Detailed procedures and protocols
+- Materials, reagents, equipment
+- Data collection procedures
+- Biological variables considered
+
+**Data Analysis**:
+- Statistical approaches
+- Sample size justification and power calculations
+- How results will be interpreted
+
+**Expected Outcomes**:
+- What you expect to find
+- How results will be interpreted
+- Alternative outcomes and what they would mean
+
+**Potential Pitfalls and Alternative Approaches**:
+- What could go wrong (be proactive)
+- Contingency plans
+- Alternative strategies if initial approach doesn't work
+
+**Timeline**:
+- Sequence of activities for this aim
+- Estimated completion time
+
+**Writing Tips**:
+- Use consistent organization across aims
+- Include subheadings for clarity
+- Integrate preliminary data throughout (not just at beginning)
+- Provide figures, flowcharts, and tables
+- Address rigor and reproducibility explicitly
+- Justify choice of methods and approaches
+- Be specific about numbers, timelines, and analysis
+- Show that you've thought through the research process
+
+**Rigor and Reproducibility** (addressed throughout Approach):
+
+NIH requires explicit discussion of:
+- **Scientific rigor in experimental design**: Controls, replicates, blinding, randomization
+- **Authentication of key biological resources**: Cell lines, antibodies, organisms
+- **Consideration of biological variables**: Sex, age, strain, etc.
+- **Statistical power**: Adequate sample sizes
+- **Transparency**: Data management, protocols, reporting
+
+### Bibliography (no page limit)
+
+- Include all references cited
+- Use consistent format (PubMed citations preferred)
+- Include DOI or PMID when available
+
+### Protection of Human Subjects or Vertebrate Animals (varies)
+
+**Human Subjects Section**:
+- Risks to subjects
+- Protection against risks
+- Potential benefits
+- Importance of knowledge to be gained
+- Inclusion of women and minorities
+- Inclusion of children
+- Data and safety monitoring
+
+**Vertebrate Animals Section**:
+- Justification of species and numbers
+- Minimization of pain and distress
+- Euthanasia method
+
+## Key NIH Application Types
+
+### R01 - Research Project Grant
+
+**Description**: Standard NIH grant mechanism for established investigators
+
+**Characteristics**:
+- **Budget**: Modular (up to $250K direct costs/year) or detailed budget
+- **Duration**: Typically 3-5 years
+- **Eligibility**: Any eligible institution
+- **Preliminary data**: Usually required (shows feasibility)
+- **Page limits**: 12 pages Research Strategy
+
+**Typical Timeline**:
+- Prepare: 2-6 months
+- Review: ~9 months from submission
+- Earliest start: 9-12 months after submission
+
+**Success Rate**: ~20% overall (varies by Institute)
+
+**When to Apply**: When you have preliminary data and clear research direction
+
+### R21 - Exploratory/Developmental Research Grant
+
+**Description**: Encourages new exploratory and developmental research
+
+**Characteristics**:
+- **Budget**: Up to $275K total (direct costs) over 2 years
+- **Duration**: Maximum 2 years
+- **Preliminary data**: Not required (though can strengthen)
+- **Page limits**: 6 pages Research Strategy
+- **No-cost extensions**: Not allowed
+
+**Purpose**:
+- Pilot or feasibility studies
+- Testing new methods or technologies
+- Secondary analysis of existing data
+- Exploratory clinical studies
+
+**When to Apply**: When you need pilot data before R01, or for high-risk ideas
+
+### R03 - Small Grant Program
+
+**Description**: Small-scale research projects
+
+**Characteristics**:
+- **Budget**: Up to $50K/year direct costs (up to $100K total)
+- **Duration**: Maximum 2 years
+- **Page limits**: 6 pages Research Strategy
+
+**Purpose**: Limited scope projects, pilot studies, secondary data analysis
+
+### K Awards - Career Development Awards
+
+**Purpose**: Support career development of researchers
+
+**Major K Award Types**:
+
+**K99/R00 - Pathway to Independence**:
+- Two phases: K99 (mentored, 1-2 years) → R00 (independent, up to 3 years)
+- For postdocs transitioning to independence
+- Provides protected time and research support
+- Competitive (~15% funded)
+
+**K08 - Mentored Clinical Scientist Award**:
+- For clinicians (MD, DO, DDS, etc.)
+- 3-5 years protected time for research training
+- Requires mentoring team
+- Up to $100K direct costs/year
+
+**K23 - Mentored Patient-Oriented Research Career Development Award**:
+- For patient-oriented research
+- Similar structure to K08
+
+**All K Awards Require**:
+- Career development plan
+- Research plan (6-12 pages)
+- Mentoring plan and letters from mentors
+- Training plan
+- Institutional commitment (75% protected time typically)
+
+### Other Common Mechanisms
+
+**R15 (AREA)**: For primarily undergraduate institutions
+
+**P01**: Multi-project program project grants (large collaborative)
+
+**U01**: Cooperative agreement (NIH involvement in conduct)
+
+**R34**: Clinical trial planning grant
+
+**DP1/DP2**: NIH Director's Pioneer/New Innovator Awards (special)
+
+## Budget Preparation
+
+### Modular Budgets (R01s up to $250K direct/year)
+
+**Characteristics**:
+- Requested in $25K increments (modules)
+- Maximum 10 modules ($250K) per year
+- Detailed budget not required
+- Budget justification: Narrative (Personnel, Consortium, Other)
+- Years 2-5: Brief justification if >$125K or increase >25%
+
+**Personnel Justification**:
+- List all personnel with roles, effort (% calendar months)
+- Typical: PI (2-3 months = 16-25%), postdoc (12 months), grad student, tech
+- Justify effort for each person
+- Note: Salary cap applies (~$221,900 for 2024)
+
+**Consortium/Contractual Costs**:
+- F&A typically limited to 8% of total costs for subcontracts
+
+**Other Costs**:
+- Describe significant equipment, animals, patient costs, etc.
+
+### Detailed Budgets (>$250K direct/year)
+
+**Required Sections**:
+- Personnel (with individual salary details)
+- Equipment (≥$5,000 per item)
+- Travel (domestic and foreign)
+- Participant/Trainee Support Costs
+- Other Direct Costs (materials, supplies, publications, consultants)
+- Consortium/Contractual Costs (with detailed sub-budgets)
+- Total Direct Costs
+- Indirect Costs (F&A)
+
+**Budget Justification**:
+- Detailed narrative for each category
+- Justify need for each item/person
+- Explain calculations
+
+### NIH Salary Cap
+
+**Annual Update**: NIH sets maximum salary for grants
+- 2024 Level: ~$221,900 (Executive Level II)
+- Applies to all personnel
+- Fringe benefits calculated on capped salary
+
+### Allowable Costs
+
+**Generally Allowed**:
+- Salaries and wages
+- Fringe benefits
+- Equipment
+- Supplies (consumables <$5,000)
+- Travel (domestic and international)
+- Consultant services
+- Consortium/subaward costs
+- Animal purchase and care
+- Patient care costs (clinical trials)
+- Alterations and renovations (with prior approval)
+- Publication costs
+
+**Generally Not Allowed** (without special justification):
+- Office equipment (computers, printers, furniture)
+- Administrative costs
+- Tuition (except for K awards and training grants)
+
+## Application Submission
+
+### Deadlines
+
+**Standard Dates** (most programs):
+- February 5
+- June 5
+- October 5
+
+**AIDS-Related Research**:
+- January 7
+- May 7
+- September 7
+
+**K Awards and Fellowship**: Different dates, typically 3 times/year
+
+**Submission Time**: 5:00 PM local time of applicant organization
+
+### Submission Systems
+
+**eRA Commons**: Required for NIH submission
+- Create account through institution
+- Assign roles (PI, authorized organizational representative)
+
+**ASSIST (Application Submission System & Interface for Submission Tracking)**:
+- NIH's electronic submission system
+- Create application, upload documents, submit
+
+**Grants.gov**: Alternative submission route (not recommended)
+
+### Just-in-Time Information
+
+**After initial review** (if in fundable range), NIH requests:
+- Other Support (updated)
+- IRB/IACUC approval (or documentation that approval will be obtained)
+- Vertebrate Animals/Human Subjects training certifications
+
+**Timing**: Usually 6-9 months after submission
+
+## Review Process
+
+### Timeline
+
+**Total Time**: ~9 months from submission to funding decision
+
+**Stages**:
+1. **Submission**: Deadline (Month 0)
+2. **Referral**: Assignment to IC and study section (Month 1)
+3. **Review**: Study section meeting (Months 3-4)
+4. **Council**: Advisory council review (Months 6-7)
+5. **Funding Decision**: Program officer and IC (Months 7-9)
+
+### Study Sections
+
+**Types**:
+- **Standing Study Sections**: Permanent panels meeting 3x/year
+- **Special Emphasis Panels (SEPs)**: Ad hoc panels for specific RFAs or topics
+- **Scientific Review Groups (SRGs)**: Chartered study sections
+
+**Process**:
+- 3 assigned reviewers per application (prepare written critiques)
+- ~15-25 applications discussed per study section
+- ~50-100 applications assigned to each study section
+
+**Participants**:
+- Scientific Review Officer (SRO): NIH staff, manages process
+- Reviewers: External scientists with expertise
+- Grants management specialist
+- Program officer (sometimes attends, doesn't vote)
+
+### Scoring
+
+**Preliminary Scoring** (before meeting):
+- All panel members score 1-9 (1 = exceptional, 9 = poor)
+- Applications in lower half typically "triaged" (not discussed)
+- Top ~50% discussed at meeting
+
+**Discussion** (at study section meeting):
+- Assigned reviewers present their assessments
+- Panel discusses strengths and weaknesses
+- Open discussion among all panel members
+- Questions about rigor, innovation, feasibility
+
+**Final Scoring** (after discussion):
+- All panel members score 1-9
+- Scores averaged and multiplied by 10
+- **Final Impact Score**: 10-90 (lower is better)
+ - 10-20: Exceptional
+ - 21-30: Outstanding
+ - 31-40: Excellent (often fundable)
+ - 41-50: Very good (may be fundable)
+ - 51+: Less competitive
+
+**Individual Criterion Scores**: Also scored 1-9
+- Significance
+- Investigator(s)
+- Innovation
+- Approach
+- Environment
+
+### Percentile Ranking
+
+**After all study sections meet**, applications are percentile-ranked within IC
+- Based on Impact Score relative to other applications reviewed by same IC
+- Percentile typically more important than Impact Score for funding decisions
+- Lower percentile = better (1st percentile = top 1%)
+
+**Example**: Impact Score of 35 might be:
+- 15th percentile at NIGMS (likely funded)
+- 40th percentile at NCI (likely not funded)
+- Depends on competitiveness of IC and available funding
+
+### Summary Statement
+
+**Received**: ~30 days after study section meeting
+
+**Contents**:
+- Overall Impact/Priority Score and Percentile
+- Individual criterion scores
+- Resume and Summary of Discussion
+- Detailed critiques from 3 assigned reviewers
+- Additional comments from other panel members
+- Human Subjects, Animals, Biohazards reviews
+
+**Interpreting**:
+- Focus on consistent themes across reviewers
+- Identify major vs. minor criticisms
+- Note what reviewers found strong
+- Use for resubmission planning
+
+## Resubmission (A1 Applications)
+
+### NIH Resubmission Policy
+
+**One Resubmission Allowed**: Can resubmit once (A1) after initial review (A0)
+- After A1 review, cannot resubmit again
+- Must submit new application if A1 not funded
+
+**No Limits on New Applications**: Can submit completely new application anytime
+
+### Introduction to Resubmission (1 page)
+
+**Required Section**: Separate 1-page introduction responding to previous review
+
+**Structure**:
+- **Header**: "INTRODUCTION TO RESUBMISSION"
+- **Summary of Criticisms**: Brief overview of major criticisms
+- **Response to Criticisms**: Point-by-point response with page references
+- **Use bullet points** for clarity
+
+**Example Format**:
+```
+INTRODUCTION TO RESUBMISSION
+
+The previous review raised the following concerns:
+1. Inadequate preliminary data demonstrating feasibility of Aim 2
+2. Statistical power insufficient for Aim 3
+3. Lack of detail about quality control procedures
+
+We have addressed these concerns as follows:
+
+1. Preliminary data for Aim 2 (Response, p. 8-9; Research Strategy, p. 18-20)
+ • Generated pilot data showing [specific result]
+ • Optimized protocol achieving [specific outcome]
+ • New Figure 3 demonstrates feasibility
+
+2. Statistical power for Aim 3 (Research Strategy, p. 24-25)
+ • Increased sample size from n=15 to n=25 per group
+ • Updated power calculations show >90% power
+ • Budget adjusted accordingly
+
+3. Quality control procedures (Research Strategy, p. 12, 19, 26)
+ • Added detailed QC protocols for each method
+ • Implemented validation criteria and acceptance thresholds
+ • Described authentication of key reagents
+```
+
+**Tips**:
+- Be respectful and professional (avoid defensiveness)
+- Address every major criticism explicitly
+- Indicate where changes are in revised application
+- Show substantial revision, not minor tweaks
+- Acknowledge valid criticisms and explain how addressed
+- If disagree with criticism, explain politely with evidence
+
+### Resubmission Strategy
+
+**Decision Tree**:
+
+**Impact Score ≤40 (Percentile ≤20)**: Strong application, likely competitive
+- Address specific criticisms
+- Strengthen weak areas
+- Add preliminary data if criticized
+- Consider minor scope adjustments
+
+**Impact Score 41-50 (Percentile 21-40)**: Moderate application, needs improvement
+- Substantial revision needed
+- May need new preliminary data
+- Consider revising aims if criticized
+- Strengthen innovation or significance
+- May want to wait for new data before resubmitting
+
+**Impact Score ≥51 (Percentile ≥41)**: Weak application, major revision needed
+- Consider whether resubmission is worthwhile
+- May be better to develop new application
+- If resubmitting: major restructuring likely needed
+- Gather substantial new preliminary data
+- Consider changing scope or aims
+
+**Common Resubmission Improvements**:
+1. **Add preliminary data**: Especially for Aim 2 or 3 if criticized
+2. **Clarify methods**: Provide more detail, address technical concerns
+3. **Increase rigor**: Better controls, larger n, statistical justification
+4. **Revise specific aims**: If fundamentally flawed
+5. **Add collaborators**: If expertise questioned
+6. **Strengthen significance**: Better literature review, clearer impact
+7. **Refocus innovation**: Clarify what's novel and why it matters
+
+**Timing**:
+- Can resubmit at any of the next 3 deadlines (36 months after initial submission)
+- Use time wisely to generate new data
+- Don't rush resubmission with minor changes
+
+## NIH Funding Trends and Priorities (2024-2025)
+
+### Current Priorities
+
+- **Health Disparities and Health Equity**: Addressing disparities in disease burden
+- **Alzheimer's Disease and Dementia**: Prevention, treatment, care
+- **Substance Use and Mental Health**: Opioid crisis, addiction, mental health
+- **Infectious Diseases**: Pandemic preparedness, antimicrobial resistance, vaccines
+- **Cancer**: Cancer Moonshot initiatives
+- **BRAIN Initiative**: Understanding the brain
+- **All of Us Research Program**: Precision medicine
+- **Climate Change and Health**: Environmental impacts on health
+- **Artificial Intelligence**: AI for biomedical research and healthcare
+
+### Success Rates by Career Stage
+
+**Overall**: ~20% (varies by IC and mechanism)
+
+**Established Investigators**: ~23%
+
+**Early Stage Investigators (ESI)**: ~27% (higher due to ESI policy)
+- ESI: Within 10 years of final degree, no prior R01-equivalent
+
+**New Investigators**: ~24%
+- New: No prior R01-equivalent (regardless of time since degree)
+
+**Multiple PI**: ~18% (slightly lower than single PI)
+
+### Paylines
+
+**Varies by IC**: Each Institute sets own funding priorities
+
+**Example Paylines (FY2023)**:
+- NIGMS: ~23rd percentile
+- NCI: ~12th percentile (highly competitive)
+- NHLBI: ~11th percentile
+- NIAID: ~15th percentile
+- NIMH: ~12th percentile
+
+**ESI Boost**: Most ICs fund ESIs at higher percentile than established investigators
+
+**Check IC Websites**: Paylines and funding policies updated annually
+
+## Tips for Competitive NIH Applications
+
+### Do's
+
+✅ **Start with Specific Aims page** - Most important page, revise extensively
+✅ **Include substantial preliminary data** - Demonstrate feasibility (esp. for R01)
+✅ **Be explicit about innovation** - Don't assume reviewers will recognize it
+✅ **Address rigor and reproducibility** - Controls, power, authentication, variables
+✅ **Provide detailed methods** - Enough detail to assess feasibility
+✅ **Identify pitfalls proactively** - Show you've thought through challenges
+✅ **Use figures and diagrams** - Clarify complex ideas, show preliminary data
+✅ **Connect to health** - NIH mission is health-related
+✅ **Write clearly** - Panel members may not be in your exact subfield
+✅ **Get external review** - Mock review from colleagues and mentors
+
+### Don'ts
+
+❌ **Don't exceed page limits** - Automatic rejection
+❌ **Don't be vague about methods** - "Standard protocols" is insufficient
+❌ **Don't ignore sample size** - Power calculations required
+❌ **Don't overpromise** - Be realistic about what's achievable
+❌ **Don't forget human subjects/animals sections** - Common mistake
+❌ **Don't submit without preliminary data** - For R01, this rarely succeeds
+❌ **Don't assume reviewers know your work** - Provide context
+❌ **Don't ignore sex as biological variable** - NIH policy requires consideration
+❌ **Don't submit at deadline** - Technical issues happen frequently
+❌ **Don't resubmit without substantial changes** - Minor revisions rarely succeed
+
+## NIH Resources
+
+- **NIH Homepage**: https://www.nih.gov
+- **NIH RePORTER (funded grants)**: https://reporter.nih.gov
+- **Grants & Funding**: https://grants.nih.gov
+- **eRA Commons**: https://commons.era.nih.gov
+- **ASSIST**: https://public.era.nih.gov/assist
+- **Application Forms and Instructions**: https://grants.nih.gov/grants/how-to-apply-application-guide.html
+- **NIH Data Sharing Policy**: https://sharing.nih.gov
+- **Rigor and Reproducibility**: https://grants.nih.gov/reproducibility/index.htm
+
+---
+
+**Key Takeaway**: NIH applications succeed through clear articulation of an important health-related problem, preliminary data demonstrating feasibility, detailed rigorous approach, and innovative methods. The Specific Aims page is the most critical component—invest time in crafting a compelling narrative that immediately conveys significance and feasibility.
+
diff --git a/scientific-skills/research-grants/references/nsf_guidelines.md b/scientific-skills/research-grants/references/nsf_guidelines.md
new file mode 100644
index 0000000..67581e1
--- /dev/null
+++ b/scientific-skills/research-grants/references/nsf_guidelines.md
@@ -0,0 +1,570 @@
+# NSF (National Science Foundation) Grant Writing Guidelines
+
+## Agency Overview
+
+**Mission**: To promote the progress of science; to advance the national health, prosperity, and welfare; to secure the national defense
+
+**Annual Budget**: ~$9-10 billion
+
+**Website**: https://www.nsf.gov
+
+**Key Characteristics**:
+- Supports all fields of fundamental science and engineering (except medical sciences)
+- Emphasis on education and workforce development
+- Strong commitment to diversity, equity, and inclusion
+- Promotes open science and data sharing
+- Collaborative research across institutions encouraged
+
+## NSF Directorates
+
+1. **BIO** - Biological Sciences
+2. **CISE** - Computer and Information Science and Engineering
+3. **EHR** - Education and Human Resources
+4. **ENG** - Engineering
+5. **GEO** - Geosciences
+6. **MPS** - Mathematical and Physical Sciences
+7. **SBE** - Social, Behavioral, and Economic Sciences
+8. **TIP** - Technology, Innovation, and Partnerships (formerly EDA)
+9. **OPP** - Office of Polar Programs
+10. **OISE** - Office of International Science and Engineering
+
+## Core Review Criteria
+
+NSF uses two equally weighted criteria for all proposals:
+
+### Intellectual Merit
+
+**Definition**: The potential to advance knowledge
+
+**Evaluation Questions**:
+- How important is the proposed activity to advancing knowledge and understanding within its own field or across different fields?
+- How well-qualified is the proposer (individual or team) to conduct the project?
+- To what extent does the proposed activity suggest and explore creative, original, or potentially transformative concepts?
+- How well-conceived and organized is the proposed activity?
+- Is there sufficient access to resources?
+
+**Writing Strategy**:
+- Lead with the research question and its importance
+- Demonstrate deep knowledge of the field
+- Articulate the knowledge gap clearly
+- Present innovative approach to address the gap
+- Show preliminary results or proof-of-concept
+- Demonstrate team qualifications
+- Present feasible, well-organized plan
+
+### Broader Impacts
+
+**Definition**: The potential to benefit society and contribute to the achievement of specific, desired societal outcomes
+
+**Evaluation Questions**:
+- What is the potential for the proposed activity to:
+ - Benefit society or advance desired societal outcomes?
+ - Broaden participation of underrepresented groups?
+ - Enhance infrastructure for research and education?
+ - Enhance scientific and technological understanding?
+ - Foster partnerships between academia, industry, and others?
+
+**Critical Point**: Broader Impacts are NOT an afterthought. They carry equal weight with Intellectual Merit and must be substantive, specific, and measurable.
+
+**Five Pillars of Broader Impacts** (address at least one substantively):
+
+1. **Advance discovery and understanding while promoting teaching, training, and learning**
+ - Integrate research into courses
+ - Develop new curriculum materials
+ - Train undergraduate, graduate, and postdoctoral researchers
+ - Provide research experiences for students
+ - Create educational resources (videos, software, databases)
+ - Offer workshops or training programs
+
+ *Example*: "We will develop a 10-module online course on computational genomics, incorporating data from this project, to be offered to 500+ students annually across 15 partner institutions. Course materials will be open-access and include Jupyter notebooks for hands-on analysis."
+
+2. **Broaden participation of underrepresented groups (in STEM)**
+ - Partner with minority-serving institutions (HBCUs, HSIs, TCUs)
+ - Recruit students from underrepresented groups
+ - Provide mentoring and support programs
+ - Address systemic barriers to participation
+ - Create inclusive research environments
+ - Engage underrepresented communities in research
+
+ *Example*: "We will establish a summer research program for 8 undergraduates annually from 4 partner HBCUs, providing stipends, housing, and year-round mentoring. Program will include professional development workshops and pathways to graduate school."
+
+3. **Enhance infrastructure for research and education**
+ - Develop shared instrumentation or facilities
+ - Create cyberinfrastructure, software, or databases
+ - Build collaborative networks
+ - Establish living stock centers or repositories
+ - Develop standards or protocols
+ - Create open-source tools
+
+ *Example*: "We will develop and maintain an open-source software platform for analyzing spatial transcriptomics data, with comprehensive documentation, tutorials, and user support forum. Software will be deposited on GitHub and indexed in bio.tools."
+
+4. **Disseminate to enhance scientific and technological understanding**
+ - Public outreach and science communication
+ - Engagement with K-12 students and teachers
+ - Museum exhibits or science festivals
+ - Media engagement (podcasts, videos, articles)
+ - Policy briefs for decision-makers
+ - Community science projects
+
+ *Example*: "We will partner with the City Science Museum to create a hands-on exhibit on AI and climate modeling, reaching 50,000+ annual visitors. Exhibit will include interactive simulations and bilingual materials. We will also host quarterly 'Science Saturdays' for local K-12 students."
+
+5. **Benefit society**
+ - Economic development and competitiveness
+ - Health and quality of life improvements
+ - Environmental sustainability
+ - National security
+ - Societal well-being
+ - Workforce development
+
+ *Example*: "Our drought prediction models will be integrated into USDA's decision support system, benefiting 15,000+ farmers in the Southwest. We will work with extension agents to provide training and accessible interfaces for non-technical users."
+
+**Common Broader Impacts Mistakes**:
+- ❌ Vague statements: "We will train graduate students" (everyone does this)
+- ❌ No plan: Aspirational goals without concrete activities
+- ❌ No metrics: No way to assess success
+- ❌ Tacked on: Not integrated with research plan
+- ❌ Unrealistic: Grand claims without resources or expertise
+- ✅ Specific and measurable: Clear activities, timelines, and assessment
+
+## Proposal Sections and Page Limits
+
+### Project Summary (1 page)
+
+**Required Structure** (NSF mandates three labeled sections):
+
+**Overview** (first paragraph):
+- Research question and approach in accessible language
+- Suitable for public dissemination
+
+**Intellectual Merit**:
+- Potential to advance knowledge
+- Innovative aspects
+- Qualifications of team
+
+**Broader Impacts**:
+- Societal benefits and specific activities
+- How success will be measured
+
+**Formatting**: Must use section headings exactly as shown above
+
+### Project Description (15 pages for most programs)
+
+**No required structure, but typical organization**:
+
+1. **Introduction / Background** (1-2 pages)
+ - Research question and significance
+ - Current state of knowledge
+ - Knowledge gaps
+ - Preliminary results (if applicable)
+
+2. **Research Objectives** (0.5-1 page)
+ - Specific, measurable goals
+ - Hypotheses or research questions
+
+3. **Research Plan / Methodology** (8-10 pages)
+ - Detailed approach for each objective
+ - Methods and techniques
+ - Timeline and milestones
+ - Expected outcomes
+ - Potential challenges and alternatives
+
+4. **Broader Impacts** (1-2 pages)
+ - Can be integrated throughout OR separate section
+ - Specific activities and timelines
+ - Assessment and evaluation plan
+
+5. **Results from Prior NSF Support** (if applicable, up to 5 pages)
+ - Required if PI or co-PI has had NSF award in past 5 years
+ - Intellectual merit of prior work
+ - Broader impacts of prior work
+ - Publications and products
+
+**Formatting Requirements**:
+- Font: 11-point or larger (Times Roman, Arial, Palatino, Computer Modern)
+- Margins: 1 inch all sides
+- Line spacing: No more than 6 lines per inch
+- Page size: 8.5 x 11 inches
+- No smaller fonts in figures (must be legible)
+
+### References Cited (no page limit)
+
+- Each reference must include:
+ - Names of all authors
+ - Article and journal title
+ - Volume, page numbers, year
+ - DOI if available
+- Use consistent format (doesn't have to match specific style)
+- Sufficient information for reviewers to locate references
+
+### Biographical Sketch (3 pages max per person)
+
+**Required NSF Format** (as of 2023 PAPPG):
+
+**Section A: Professional Preparation**
+- Undergraduate, graduate, postdoctoral institutions
+- Majors and degrees with years
+
+**Section B: Appointments and Positions**
+- Last 5 positions, current first
+
+**Section C: Products** (up to 5 most relevant to proposal)
+- Publications, datasets, software, patents, etc.
+- Can include products in preparation
+
+**Section D: Synergistic Activities** (up to 5)
+- Service, teaching, mentoring, outreach
+- Demonstrates broader engagement beyond research
+
+### Current and Pending Support (no page limit)
+
+- All current and pending support for PI and co-PIs
+- Include project/proposal title, source, award amount, dates
+- Describe overlap with proposed project (if any)
+- Must be updated until award/decline
+
+### Facilities, Equipment, and Other Resources (no page limit)
+
+- Describe available facilities (labs, computational, libraries)
+- Major equipment accessible to project
+- Other resources (personnel, core facilities, partnerships)
+- Demonstrate institutional commitment
+
+### Data Management and Sharing Plan (2 pages max)
+
+**Required for all proposals** (as of 2023 PAPPG)
+
+**Must address**:
+1. **Types of data**: What data will be generated?
+2. **Standards**: Formats, metadata, standards for data and metadata
+3. **Access**: How and when will data be shared?
+4. **Reuse**: Who can access and under what conditions?
+5. **Repository**: Where will data be archived long-term?
+6. **Protection**: Privacy, confidentiality, intellectual property considerations
+
+**NSF Expectations**:
+- Data should be made publicly available in a timely manner
+- Use discipline-specific repositories when available
+- Justify any restrictions on data sharing
+- Plan for data preservation beyond project period
+
+### Postdoctoral Researcher Mentoring Plan (1 page max)
+
+**Required if funding postdocs**
+
+**Must address**:
+- Career development objectives
+- Mentoring activities (research, teaching, professional skills)
+- Metrics for success
+- Mentoring plan should be specific, not generic
+
+## Special NSF Proposal Types
+
+### CAREER (Faculty Early Career Development Program)
+
+**Eligibility**: Tenure-track (or equivalent) faculty who have not yet received tenure, within 6 years of PhD (or equivalent)
+
+**Requirements**:
+- Integration of research and education
+- Demonstrate potential for leadership
+- Department chair letter required
+- 5-year project plan
+- Typical budget: $400,000-$500,000
+
+**Key Elements**:
+- Ambitious research plan
+- Innovative educational component
+- Strong integration (not just parallel tracks)
+- Path to independence and leadership
+- Institutional commitment
+
+**Review Criteria**: Same two criteria (Intellectual Merit, Broader Impacts) but with emphasis on:
+- Integration of research and education
+- Innovative educational component
+- Potential for leadership in field
+
+**Common CAREER Mistakes**:
+- Education component feels tacked on
+- Overly ambitious research plan
+- Weak integration between research and education
+- Generic mentoring or teaching plans
+- Insufficient preliminary data
+
+### Collaborative Research
+
+**Structure**: Multiple proposals submitted separately from different institutions, reviewed as a single project
+
+**Requirements**:
+- Lead institution designated
+- All proposals must have identical titles (except institution name)
+- Project descriptions should be substantially similar
+- Clear division of labor
+- Coordination plan
+
+**Budget**: Each institution submits own budget for their portion
+
+**Review**: Reviewed together as single integrated project
+
+**Benefits**: Brings together complementary expertise and resources
+
+### RAPID (Rapid Response Research)
+
+**Purpose**: Support time-sensitive research opportunities
+
+**Examples**:
+- Natural disasters
+- Disease outbreaks
+- Unique astronomical events
+- Rare opportunities for data collection
+
+**Requirements**:
+- Urgent need justification
+- Up to $200,000
+- Up to 1 year duration
+- Simplified review process (program officer discretion)
+- No preliminary data required
+
+**Submission**: Contact program officer first, then submit proposal
+
+### EAGER (Early-concept Grants for Exploratory Research)
+
+**Purpose**: Support exploratory work on untested, but potentially transformative, ideas
+
+**Requirements**:
+- High-risk, high-reward research
+- Radically different approaches
+- Up to $300,000
+- Up to 2 years
+- Program officer approval required before submission
+- No panel review (program officer decision)
+
+**Key**: Must be truly exploratory and high-risk, not incremental
+
+## Budget Considerations
+
+### Allowable Costs
+
+**Personnel**:
+- Senior personnel: Up to 2 months (summer salary) for 9-month faculty
+- Postdoctoral scholars: Full salary and benefits
+- Graduate students: Stipend (tuition typically covered under fringe/indirect)
+- Undergraduate students: Hourly or stipend
+- Technical and administrative staff
+
+**Fringe Benefits**: Follow institutional rates
+
+**Equipment**: Items ≥$5,000 per unit
+- Must be justified
+- Shared equipment requires letters from collaborators
+
+**Travel**:
+- Domestic and international scientific meetings
+- Collaboration and fieldwork
+- Justification required
+
+**Participant Support Costs**: For workshops, training, conferences
+- Stipends, travel, subsistence for participants
+- Not subject to indirect costs
+
+**Other Direct Costs**:
+- Publication costs
+- Consulting services
+- Computer services
+- Materials and supplies
+- Subawards to collaborating institutions
+
+**Indirect Costs (F&A)**: Institutional negotiated rate applies to modified total direct costs (MTDC)
+- MTDC excludes: equipment, participant support, subawards >$25K
+
+### Cost Sharing
+
+**NSF Policy**: Cost sharing is not required and should not be voluntary
+
+**Exceptions**: Some programs require cost sharing (check program solicitation)
+
+**When Included**: Must be documented, verifiable, auditable, and necessary for project
+
+## Submission and Review Process
+
+### Submission Deadlines
+
+**Varies by program**:
+- Some programs have specific deadlines (e.g., twice per year)
+- Some programs accept proposals anytime (check with program officer)
+- CAREER: July deadline (directorate-specific)
+
+**Submission Windows**: NSF deadlines are typically 5 PM submitter's local time
+
+### Submission Portal
+
+**Research.gov** or **Grants.gov**: NSF accepts both
+
+**Process**:
+1. Institutional authorization required
+2. Upload all required documents
+3. Verify PDF compilation
+4. Submit (aim for 48 hours early)
+5. Receive confirmation and proposal number
+
+### Review Process
+
+**Timeline**: Typically 6 months from submission to decision
+
+**Steps**:
+1. **Administrative Review**: NSF checks compliance (1-2 weeks)
+2. **Program Officer Assignment**: Assigned to appropriate program (1-2 weeks)
+3. **Reviewer Selection**: Panel and/or ad hoc reviewers identified (2-4 weeks)
+4. **Review**: Reviewers assess proposals (4-8 weeks)
+5. **Panel Discussion**: Panel meets (virtual or in-person) to discuss proposals (1 week)
+6. **Program Officer Recommendation**: Based on reviews and panel discussion (2-4 weeks)
+7. **Division/Directorate Approval**: Final decision (2-4 weeks)
+
+**Review Formats**:
+- **Panel Review**: 10-20 proposals discussed at panel meeting
+- **Ad hoc Review**: External reviewers submit written reviews
+- **Hybrid**: Combination of panel and ad hoc reviews
+
+**Number of Reviewers**: Typically 3-5 reviewers per proposal
+
+### Review Outcomes
+
+**Possible Decisions**:
+- **Funded**: Congratulations! Award forthcoming
+- **Declined**: Not recommended for funding
+- **Returned Without Review**: Non-compliant with requirements
+
+**Feedback**: Panel summary and individual reviews provided regardless of outcome
+
+**Success Rates**: Vary by program, typically 15-30%
+
+## Communicating with Program Officers
+
+### When to Contact
+
+**Appropriate**:
+- Before submission: Discuss fit with program, feasibility of idea
+- After reviews: Discuss feedback, resubmission strategy
+- During project: Report significant changes, request no-cost extensions
+
+**How to Contact**:
+- Email program officer (contact info in program solicitation)
+- Request 15-30 minute phone call
+- Prepare concise summary of research idea (1 page)
+
+### What to Ask
+
+**Good Questions**:
+- Is my research appropriate for this program?
+- Are there upcoming solicitations or special initiatives?
+- What are key areas of emphasis for the program?
+- Is the scope and budget appropriate?
+- After reviews: What are key issues to address in resubmission?
+
+**Avoid**:
+- Asking for guarantee of funding
+- Arguing with review outcome
+- Inappropriate requests for information about reviewers
+
+## Resubmission Strategy
+
+### NSF Resubmission Policies
+
+**No Formal Resubmission Category**: NSF treats resubmissions as new proposals
+
+**Can Resubmit**:
+- To same program (after addressing reviews)
+- To different program (if better fit)
+- After substantial revision
+
+**No Introduction Section**: Unlike NIH, NSF doesn't have formal resubmission response
+
+**Strategy**:
+- Carefully review panel summary and individual reviews
+- Address all major criticisms
+- Strengthen weak areas (prelim data, broader impacts, methods)
+- Consider discussing with program officer
+- May want to wait for next funding cycle to gather more data
+
+**Tracking**: Proposals reviewed previously may be assigned same reviewers (sometimes)
+
+## Recent NSF Policy Updates
+
+### 2023-2024 Changes
+
+1. **Data Management and Sharing Plan**: Now required for all proposals (2 pages max)
+2. **Biographical Sketch Format**: Updated to include "Products" instead of "Publications"
+3. **Open Science**: Increased emphasis on open-access publications and data
+4. **Plan for Dissemination**: Some programs require explicit dissemination plans
+5. **Mentoring Plans**: Enhanced requirements for postdoc mentoring plans
+
+### NSF Priorities (2024-2025)
+
+- **Climate and Clean Energy**: Climate change mitigation and adaptation
+- **Quantum Information Science**: Quantum computing, sensing, networking
+- **AI and Machine Learning**: Trustworthy AI, AI for science
+- **Biotechnology**: Synthetic biology, bioengineering
+- **Microelectronics**: Semiconductor research and workforce
+- **STEM Education**: Broadening participation, innovative pedagogy
+- **Convergence Accelerators**: Use-inspired research with pathway to impact
+
+## NSF Big Ideas and Special Initiatives
+
+### NSF "Big Ideas"
+
+1. **Harnessing the Data Revolution (HDR)**
+2. **The Future of Work at the Human-Technology Frontier**
+3. **Navigating the New Arctic**
+4. **Windows on the Universe**
+5. **The Quantum Leap**
+6. **Understanding the Rules of Life**
+7. **Mid-scale Research Infrastructure**
+
+### Major NSF Initiatives
+
+- **National AI Research Institutes**: $20M over 5 years per institute
+- **Science and Technology Centers (STCs)**: Large-scale collaborative centers
+- **Engineering Research Centers (ERCs)**: Engineering innovation ecosystems
+- **Materials Research Science and Engineering Centers (MRSECs)**: Materials research
+- **NSF Graduate Research Fellowship Program (GRFP)**: Student fellowships
+
+## Tips for Competitive NSF Proposals
+
+### Do's
+
+✅ **Start with specific aims/objectives** - Crystal clear research goals
+✅ **Make broader impacts substantive** - Specific activities, not platitudes
+✅ **Use figures effectively** - Conceptual diagrams, preliminary data, timelines
+✅ **Be realistic about scope** - Achievable within 3-5 years
+✅ **Address both review criteria explicitly** - Don't make reviewers search
+✅ **Get external feedback** - Mock review before submission
+✅ **Follow formatting requirements exactly** - Auto-rejection for non-compliance
+✅ **Explain jargon and acronyms** - Panel members may not be in your subfield
+✅ **Integrate research and education** - Show natural connections
+✅ **Demonstrate team qualifications** - Track record in proposed area
+
+### Don'ts
+
+❌ **Don't exceed page limits** - Automatic return without review
+❌ **Don't use smaller fonts in figures** - Must be legible
+❌ **Don't make broader impacts generic** - "Train students" is not enough
+❌ **Don't ignore prior NSF support** - Must report if you've had NSF funding
+❌ **Don't be overly ambitious** - Reviewers will see through unrealistic plans
+❌ **Don't skip data management plan** - Required for all proposals
+❌ **Don't forget biosketches for all personnel** - Common mistake
+❌ **Don't submit at deadline** - Technical issues happen
+❌ **Don't ignore program solicitation** - Requirements vary by program
+❌ **Don't assume reviewers know your work** - Provide context
+
+## Resources and Links
+
+- **NSF Homepage**: https://www.nsf.gov
+- **Award Search**: https://www.nsf.gov/awardsearch/
+- **Proposal & Award Policies & Procedures Guide (PAPPG)**: https://www.nsf.gov/publications/pub_summ.jsp?ods_key=pappg
+- **FastLane**: https://www.fastlane.nsf.gov/
+- **Research.gov**: https://www.research.gov/
+- **Broader Impacts Resources**: https://www.nsf.gov/od/oia/special/broaderimpacts/
+- **NSF Funding Statistics**: https://www.nsf.gov/statistics/
+
+---
+
+**Key Takeaway**: NSF values both scientific excellence (Intellectual Merit) and societal benefit (Broader Impacts) equally. Successful proposals demonstrate innovative, feasible research that advances knowledge while contributing to education, diversity, infrastructure, or societal well-being in specific, measurable ways.
+
diff --git a/scientific-skills/research-grants/references/specific_aims_guide.md b/scientific-skills/research-grants/references/specific_aims_guide.md
new file mode 100644
index 0000000..f1a8a5d
--- /dev/null
+++ b/scientific-skills/research-grants/references/specific_aims_guide.md
@@ -0,0 +1,458 @@
+# NIH Specific Aims Page: The Complete Guide
+
+## Overview
+
+The **Specific Aims page** is the most important page of your entire NIH grant application. It's the first thing reviewers read, often determines their initial impression, and may be the only page read by some panel members before scoring begins.
+
+**Length**: Exactly 1 page
+**Margins**: 0.5 inches (all sides)
+**Font**: 11-point Arial, Helvetica, or similar (no smaller)
+**Line spacing**: Must be readable
+
+**Purpose**:
+- Communicate your research vision clearly and compellingly
+- Establish significance and innovation
+- Demonstrate feasibility
+- Show that you can accomplish meaningful work in the proposed timeframe
+- Make reviewers excited to fund your work
+
+## Anatomy of a Specific Aims Page
+
+### Essential Components (in order)
+
+1. **Opening Hook** (2-4 sentences)
+2. **Gap/Problem Statement** (2-4 sentences)
+3. **Long-Term Goal** (1 sentence)
+4. **Objective** (1-2 sentences)
+5. **Central Hypothesis** (1 sentence) [or Research Questions]
+6. **Rationale** (2-3 sentences with preliminary data mention)
+7. **Specific Aims** (2-4 aims, ~½ page total)
+8. **Expected Outcomes and Impact** (2-4 sentences)
+
+## Detailed Structure
+
+### Opening Paragraph: The Hook
+
+**Purpose**: Establish importance and grab attention
+
+**What to include**:
+- Broad context (disease burden, biological importance, technological need)
+- Epidemiological data or statistics that establish scale
+- Why this problem matters for health or science
+- Create urgency
+
+**Length**: 2-4 sentences
+
+**Writing tips**:
+- Start strong with compelling statement
+- Use concrete numbers (prevalence, mortality, costs)
+- Avoid jargon in first sentence
+- Make it accessible to non-specialists on panel
+
+**Examples**:
+
+*Clinical Example*:
+"Pancreatic ductal adenocarcinoma (PDAC) is the third leading cause of cancer death in the United States, with a devastating 5-year survival rate of only 11%. Despite decades of research, therapeutic options remain limited, and most patients present with advanced, unresectable disease. The lack of effective early detection methods and targeted therapies represents a critical unmet medical need affecting over 62,000 Americans diagnosed annually."
+
+*Basic Science Example*:
+"Mitochondrial dysfunction is a hallmark of aging and age-related diseases, yet the mechanisms linking mitochondrial decline to cellular senescence remain poorly understood. Emerging evidence suggests that mitochondrial-nuclear communication pathways play a central role in longevity determination across species, from yeast to mammals. Understanding how cells sense and respond to mitochondrial stress could reveal new therapeutic targets for age-related diseases affecting millions worldwide."
+
+### Second Paragraph: Gap and Context
+
+**Purpose**: Define what's known, what's unknown, and why it matters
+
+**What to include**:
+- Current state of knowledge (brief literature context)
+- Specific gap or barrier to progress
+- Why this gap is critical to address
+- Why current approaches are insufficient
+
+**Length**: 3-5 sentences
+
+**Structure**:
+1. What we know (1-2 sentences)
+2. What we don't know / what's limiting progress (1-2 sentences)
+3. Why this gap matters (1 sentence)
+
+**Examples**:
+
+"Prior studies have identified numerous genetic mutations associated with PDAC development, including KRAS, TP53, SMAD4, and CDKN2A. However, the tumor microenvironment (TME), comprising immune cells, fibroblasts, and extracellular matrix, is increasingly recognized as a critical determinant of therapeutic resistance. Current models fail to recapitulate the complex TME architecture and cell-cell interactions that drive therapy resistance in vivo, limiting our ability to develop effective treatments. Understanding how the TME protects tumor cells from chemotherapy is essential for designing combination therapies that overcome resistance."
+
+### Third Paragraph: Long-Term Goal, Objective, Hypothesis, Rationale
+
+**Purpose**: Set up your specific approach and justification
+
+**Structure**:
+
+**Long-Term Goal** (1 sentence):
+- Your overarching research program direction
+- Broader than this specific proposal
+- Provides context for this work
+
+*Example*: "The long-term goal of our research is to elucidate the molecular mechanisms by which the tumor microenvironment promotes therapeutic resistance in pancreatic cancer."
+
+**Objective** (1-2 sentences):
+- Specific objective of THIS grant
+- What you will accomplish in 3-5 years
+- More focused than long-term goal
+
+*Example*: "The objective of this application is to define the role of cancer-associated fibroblasts (CAFs) in mediating gemcitabine resistance and to develop combination therapies targeting CAF-tumor interactions."
+
+**Central Hypothesis** (1 sentence):
+- Testable prediction
+- Should unify the specific aims
+- Based on preliminary data or logical reasoning
+- Clear and specific
+
+*Example*: "Our central hypothesis is that CAF-secreted factors activate protective autophagy in tumor cells, conferring resistance to gemcitabine, and that dual inhibition of CAF signaling and autophagy will restore drug sensitivity."
+
+**Alternative: Research Questions** (if hypothesis-testing isn't appropriate):
+- 2-3 focused questions
+- Should correspond to specific aims
+
+*Example*: "This project will address the following questions: (1) What factors secreted by CAFs promote tumor cell survival during chemotherapy? (2) How do tumor cells integrate CAF signals to activate protective responses? (3) Can targeting CAF-tumor interactions enhance therapeutic efficacy in preclinical models?"
+
+**Rationale** (2-3 sentences):
+- Why you think the hypothesis is true
+- Mention key preliminary data (very briefly)
+- Logical basis for your approach
+- Why this approach will work
+
+*Example*: "This hypothesis is based on our preliminary data showing that CAF-conditioned medium protects tumor cells from gemcitabine-induced apoptosis by 60% (Fig. 1), and that this protection is blocked by autophagy inhibitors (Fig. 2). Proteomic analysis of CAF secretomes identified 15 candidate factors enriched in drug-resistant contexts (Table 1). These findings suggest a targetable pathway linking CAF signaling to tumor cell survival that could be exploited therapeutically."
+
+### Specific Aims (Main Section)
+
+**How many aims**: 2-4 aims (3 is most common for R01)
+- **Too few (1)**: Insufficient work, appears risky
+- **Just right (2-3)**: Focused, achievable, synergistic
+- **Too many (4+)**: Overly ambitious, unlikely to complete
+
+**Structure for each aim**:
+1. **Aim Statement** (1-2 sentences, bold or underlined)
+2. **Rationale and Background** (1-3 sentences)
+3. **Working Hypothesis** (1 sentence, if applicable)
+4. **Approach Summary** (2-4 sentences)
+5. **Expected Outcomes and Interpretation** (1-2 sentences)
+
+**Length per aim**: ~4-6 sentences (¼ to ⅓ page)
+
+**Relationships between aims**:
+- **Independent**: Failure of one aim doesn't doom the others
+- **Synergistic**: Aims build on each other or address complementary questions
+- **Progressive**: Aim 1 enables Aim 2, Aim 2 enables Aim 3 (be careful—creates risk)
+
+#### Example Aim Structure:
+
+**Aim 1: Identify CAF-secreted factors that mediate gemcitabine resistance.**
+
+*Rationale*: CAF-conditioned medium confers significant protection against gemcitabine (Fig. 1), suggesting secreted factors are responsible. We have identified 15 candidate proteins enriched in CAF secretomes from resistant versus sensitive contexts (Table 1).
+
+*Working Hypothesis*: CAFs secrete specific growth factors and cytokines (including IL-6, CXCL12, and HGF) that activate pro-survival pathways in tumor cells.
+
+*Approach*: We will (1) validate candidate factors using neutralizing antibodies in co-culture assays, (2) measure activation of downstream signaling pathways (STAT3, PI3K/AKT, MAPK) in tumor cells, and (3) perform CRISPR screens in CAFs to identify factors required for resistance phenotype. We will use patient-derived CAFs and tumor cells to ensure clinical relevance.
+
+*Expected Outcomes*: We expect to identify 3-5 CAF-secreted factors sufficient and necessary for gemcitabine resistance, and define their signaling mechanisms. These will serve as therapeutic targets for Aims 2-3.
+
+---
+
+**Aim 2: Determine the mechanisms by which CAF signals activate protective autophagy in tumor cells.**
+
+*Rationale*: Our data show that CAF-mediated resistance requires autophagy (Fig. 2), but the signaling pathways linking CAF factors to autophagy activation remain unknown.
+
+*Working Hypothesis*: CAF-secreted factors activate mTOR-independent autophagy through AMPK and ULK1 phosphorylation.
+
+*Approach*: We will (1) measure autophagy flux in tumor cells exposed to CAF factors using LC3 turnover assays and electron microscopy, (2) define signaling pathways using phosphoproteomic analysis and pharmacologic inhibitors, and (3) validate pathways using genetic knockdowns (shRNA/CRISPR) of key nodes. Studies will be performed in 2D and 3D co-culture systems.
+
+*Expected Outcomes*: We will define the signaling cascade from CAF factors to autophagy activation, identifying druggable nodes for combination therapy. Results will inform Aim 3 therapeutic strategies.
+
+---
+
+**Aim 3: Evaluate combination therapies targeting CAF-tumor interactions in preclinical models.**
+
+*Rationale*: Single-agent therapies targeting CAFs or autophagy have shown limited efficacy clinically, suggesting combination approaches are needed.
+
+*Working Hypothesis*: Dual inhibition of CAF signaling and autophagy will synergistically restore gemcitabine sensitivity in vivo.
+
+*Approach*: Using patient-derived xenograft (PDX) models and genetically engineered mouse models (GEMM) of PDAC, we will test combinations of (1) gemcitabine + CAF pathway inhibitors identified in Aim 1, (2) gemcitabine + autophagy inhibitors, and (3) triple combinations. We will assess tumor growth, survival, and mechanism (IHC, RNA-seq) in n=10-15 mice per group.
+
+*Expected Outcomes*: We expect combination therapies will reduce tumor growth by ≥60% compared to gemcitabine alone, with synergistic effects. The most effective regimen will be advanced toward clinical translation through an investigator-initiated trial (we have IND-enabling resources available at our institution).
+
+### Closing Paragraph: Impact and Significance
+
+**Purpose**: Leave reviewers with enthusiasm and clear understanding of importance
+
+**What to include**:
+- Expected outcomes of the overall project
+- How findings will advance the field
+- Positive impact on health or science
+- Next steps or future directions
+- Why this matters
+
+**Length**: 2-4 sentences
+
+**Writing tips**:
+- Be confident but not arrogant
+- Connect back to opening (full circle)
+- Emphasize transformative potential
+- Avoid over-promising
+
+**Examples**:
+
+"The proposed research is significant because it will define a novel mechanism of chemotherapy resistance in pancreatic cancer and identify new therapeutic targets to overcome this resistance. Results will provide mechanistic insights into CAF-tumor interactions that drive drug resistance, immediately applicable to clinical trial design. We expect findings will enable rational design of combination therapies that improve outcomes for PDAC patients, who currently have few effective treatment options. This work will establish new paradigms for targeting the tumor microenvironment in solid cancers."
+
+## Writing Principles
+
+### Clarity and Accessibility
+
+**Write for a mixed audience**:
+- Some panel members will be experts in your area
+- Others will be in related but not identical fields
+- Program officers and council members will read it
+- Some reviewers will only read this page before scoring
+
+**Strategies**:
+- Define technical terms at first use
+- Explain abbreviations (except very common ones)
+- Use clear, direct language
+- Avoid excessive jargon
+- Make logical flow obvious
+
+### Confidence Without Arrogance
+
+**Confident** ✅:
+- "Our preliminary data demonstrate..."
+- "We have established a robust model system..."
+- "This approach will elucidate..."
+
+**Arrogant** ❌:
+- "We are uniquely qualified..."
+- "Only our lab can do this..."
+- "This will revolutionize the field..."
+
+**Tentative** ❌:
+- "We hope to..."
+- "We will try to..."
+- "It is possible that..."
+
+### Active and Specific
+
+**Aim statements should**:
+- Start with action verbs (Determine, Identify, Elucidate, Define, Characterize, Validate, Develop)
+- Be specific and testable
+- Indicate what will be learned
+
+**Weak Aim** ❌:
+"Aim 1: Study the role of protein X in disease Y"
+
+**Strong Aim** ✅:
+"Aim 1: Determine how protein X phosphorylation regulates disease Y progression using genetic and pharmacologic approaches"
+
+### Show Feasibility
+
+**Throughout the aims page**:
+- Mention preliminary data (figures, tables)
+- Reference established methods
+- Show you have necessary resources
+- Demonstrate expertise
+- Indicate prior success
+
+**Don't**:
+- Relegate all preliminary data to Research Strategy
+- Make it seem like you're starting from scratch
+- Propose overly ambitious aims without support
+
+## Common Mistakes
+
+### Mistake 1: Too Much Background
+
+❌ Half page of background before getting to aims
+
+✅ Focused background that motivates your specific approach
+
+The aims page is NOT a mini review article. Provide only enough background to establish importance and gaps.
+
+### Mistake 2: Vague Objectives
+
+❌ "We will study the mechanisms of disease X"
+❌ "We will investigate the role of protein Y"
+
+✅ "We will identify the phosphorylation sites on protein Y that regulate its interaction with Z using mass spectrometry and mutagenesis"
+
+### Mistake 3: Overly Ambitious Scope
+
+❌ Four aims, each of which could be a separate R01
+❌ Proposing to solve multiple major questions in the field
+❌ "Boil the ocean" approach
+
+✅ Focused aims that are clearly achievable in 3-5 years
+
+### Mistake 4: Dependent Aims
+
+❌ Aim 2 and Aim 3 both require Aim 1 to succeed
+
+✅ Aims are synergistic but independent (failure of one doesn't doom the others)
+
+### Mistake 5: No Preliminary Data Mentioned
+
+❌ Seems like a fishing expedition
+❌ Reviewers wonder if it's feasible
+
+✅ Brief mentions of preliminary data throughout (refer to figures)
+
+### Mistake 6: Weak Impact Statement
+
+❌ "This will advance our understanding of X"
+❌ "Results will be published and presented"
+
+✅ "This will identify new therapeutic targets for disease X, affecting 500,000 patients annually, and provide the foundation for investigator-initiated clinical trials"
+
+### Mistake 7: Jargon-Heavy First Paragraph
+
+❌ Opening sentence full of abbreviations and specialized terminology
+❌ Assumes all reviewers are experts in your subfield
+
+✅ Opening that's comprehensible to broad scientific audience
+
+### Mistake 8: No Clear Hypothesis
+
+❌ Just listing aims without unifying framework
+❌ Purely descriptive aims
+
+✅ Clear, testable hypothesis that unifies the aims
+
+### Mistake 9: Forgetting Page Limits
+
+❌ Using 1.1 pages (will be deleted or rejected)
+❌ Tiny fonts to cram in more content (violations)
+
+✅ Exactly 1 page with compliant formatting
+
+### Mistake 10: Not Telling a Story
+
+❌ Disconnected aims that feel like 3 separate projects
+❌ No logical flow or coherence
+
+✅ Unified narrative with aims building on each other
+
+## Advanced Tips
+
+### Use Visual Elements
+
+**Figures on Specific Aims Page**:
+- NIH allows figures on aims page
+- Can be very effective to show key preliminary data
+- Must be legible (font size requirements apply)
+- Don't let figure crowd out text
+- Typical: 1 small figure or panel showing most critical data
+
+**Tables**:
+- Can summarize preliminary data compactly
+- Show patient characteristics, gene lists, etc.
+- Must be readable
+
+### Strategic Use of Bold/Italics
+
+**Appropriate**:
+- Bold aim statements to make them stand out
+- Italicize gene names (standard convention)
+- Underline key points (sparingly)
+
+**Avoid**:
+- Excessive formatting that looks cluttered
+- All caps (looks like shouting)
+- Colors (may not print/display correctly)
+
+### The "Skim Test"
+
+**Your aims page should pass the skim test**:
+- Someone reading just aim statements should understand the project
+- Bold aim statements that can be read independently
+- Each paragraph has clear topic sentence
+- Logical flow is apparent even when skimming
+
+**Exercise**: Ask colleague to read only bold/underlined text—can they understand the project?
+
+### Tailoring to Career Stage
+
+**Early Stage Investigators**:
+- Show you've thought through challenges
+- Demonstrate strong mentorship and institutional support
+- Emphasize innovation while ensuring feasibility
+- Don't over-promise
+
+**Established Investigators**:
+- Show how this extends your research program
+- Emphasize track record implicitly
+- Can propose more ambitious aims if supported by extensive preliminary data
+- Show how this opens new directions
+
+## Examples of Strong Opening Paragraphs
+
+### Example 1: Cancer Biology
+
+"Metastatic breast cancer kills over 42,000 women annually in the United States, with median survival of only 2-3 years after diagnosis. While primary tumors are often curable, metastatic disease remains incurable due to therapy resistance and tumor heterogeneity. The emergence of drug-resistant cell populations during treatment represents the major barrier to long-term survival, yet the mechanisms governing resistance evolution remain poorly understood. Understanding how tumor heterogeneity and plasticity drive resistance could reveal new therapeutic strategies to prevent or reverse treatment failure."
+
+### Example 2: Neuroscience
+
+"Alzheimer's disease (AD) affects 6.7 million Americans and is projected to reach 13 million by 2050, with annual costs exceeding $355 billion. Despite decades of research focused on amyloid-β and tau pathologies, no disease-modifying therapies exist. Emerging evidence implicates synaptic dysfunction as the earliest pathological event in AD, preceding neurodegeneration by years. The molecular mechanisms linking synaptic failure to cognitive decline represent a critical therapeutic window, yet remain poorly defined. Identifying early synaptic alterations could enable intervention before irreversible neuronal loss occurs."
+
+### Example 3: Infectious Disease
+
+"Antimicrobial-resistant (AMR) infections cause over 2.8 million illnesses and 35,000 deaths annually in the US, with healthcare costs exceeding $4.6 billion. Carbapenem-resistant Enterobacterales (CRE) represent an urgent threat, with mortality rates exceeding 50% for bloodstream infections. Despite this crisis, only two new antibiotics targeting CRE have been approved in the past decade, both with significant limitations. Novel therapeutic approaches that bypass traditional antibiotic mechanisms are urgently needed to combat this growing threat. Targeting host-pathogen interactions rather than bacterial viability represents a promising strategy to combat AMR while reducing selection pressure for resistance."
+
+## Revision Checklist
+
+Before finalizing, ensure your aims page:
+
+**Content**:
+- [ ] Opens with compelling statement of importance
+- [ ] Clearly defines the gap or problem
+- [ ] States specific, measurable objective
+- [ ] Presents testable hypothesis (or focused research questions)
+- [ ] Mentions preliminary data supporting feasibility
+- [ ] Includes 2-4 specific aims
+- [ ] Each aim is testable and achievable
+- [ ] Aims are independent but synergistic
+- [ ] Expected outcomes are clearly stated
+- [ ] Closes with impact and significance
+
+**Clarity**:
+- [ ] First paragraph is accessible to non-specialists
+- [ ] Technical terms are defined
+- [ ] Abbreviations are spelled out at first use
+- [ ] Logical flow is clear
+- [ ] Aim statements can stand alone
+- [ ] Language is confident and active
+
+**Format**:
+- [ ] Exactly 1 page
+- [ ] 0.5-inch margins
+- [ ] 11-point font or larger
+- [ ] Readable line spacing
+- [ ] Compliant with NIH formatting requirements
+- [ ] Figures (if included) are legible
+
+**Impact**:
+- [ ] Passes the "skim test"
+- [ ] Would make you excited if you were a reviewer
+- [ ] Clearly articulates significance
+- [ ] Shows feasibility without over-selling
+- [ ] Connects to health or scientific impact
+
+## Final Thoughts
+
+The Specific Aims page is where grants are won or lost. **Invest time in getting this right**:
+
+- Write 10+ drafts
+- Get feedback from colleagues and mentors
+- Test it on people outside your field
+- Read it aloud to check flow
+- Let it sit, then revise with fresh eyes
+- Study funded examples in your field
+
+**Remember**: Reviewers are reading 10-20 applications. Your aims page needs to immediately communicate importance, innovation, and feasibility—and make them want to fund your work.
+
+---
+
+**Key Takeaway**: The perfect Specific Aims page tells a compelling story in exactly one page—establishing a significant problem, presenting an innovative and feasible solution, showing preliminary evidence of success, and articulating transformative impact. Every sentence must earn its place.
+
diff --git a/scientific-skills/research-lookup/README.md b/scientific-skills/research-lookup/README.md
new file mode 100644
index 0000000..cb748df
--- /dev/null
+++ b/scientific-skills/research-lookup/README.md
@@ -0,0 +1,117 @@
+# Research Lookup Skill
+
+This skill provides real-time research information lookup using Perplexity's Sonar Pro Search model through OpenRouter.
+
+## Setup
+
+1. **Get OpenRouter API Key:**
+ - Visit [openrouter.ai](https://openrouter.ai)
+ - Create account and generate API key
+ - Add credits to your account
+
+2. **Configure Environment:**
+ ```bash
+ export OPENROUTER_API_KEY="your_api_key_here"
+ ```
+
+3. **Test Setup:**
+ ```bash
+ python scripts/research_lookup.py --model-info
+ ```
+
+## Usage
+
+### Command Line Usage
+
+```bash
+# Single research query
+python scripts/research_lookup.py "Recent advances in CRISPR gene editing 2024"
+
+# Multiple queries with delay
+python scripts/research_lookup.py --batch "CRISPR applications" "gene therapy trials" "ethical considerations"
+
+# Claude Code integration (called automatically)
+python lookup.py "your research query here"
+```
+
+### Claude Code Integration
+
+The research lookup tool is automatically available in Claude Code when you:
+
+1. **Ask research questions:** "Research recent advances in quantum computing"
+2. **Request literature reviews:** "Find current studies on climate change impacts"
+3. **Need citations:** "What are the latest papers on transformer attention mechanisms?"
+4. **Want technical information:** "Standard protocols for flow cytometry"
+
+## Features
+
+- **Academic Focus:** Prioritizes peer-reviewed papers and reputable sources
+- **Current Information:** Focuses on recent publications (2020-2024)
+- **Complete Citations:** Provides full bibliographic information with DOIs
+- **Multiple Formats:** Supports various query types and research needs
+- **High Search Context:** Always uses high search context for deeper, more comprehensive research
+- **Cost Effective:** Typically $0.01-0.05 per research query
+
+## Query Examples
+
+### Academic Research
+- "Recent systematic reviews on AI in medical diagnosis 2024"
+- "Meta-analysis of randomized controlled trials for depression treatment"
+- "Current state of quantum computing error correction research"
+
+### Technical Methods
+- "Standard protocols for immunohistochemistry in tissue samples"
+- "Best practices for machine learning model validation"
+- "Statistical methods for analyzing longitudinal data"
+
+### Statistical Data
+- "Global renewable energy adoption statistics 2024"
+- "Prevalence of diabetes in different populations"
+- "Market size for autonomous vehicles industry"
+
+## Response Format
+
+Each research result includes:
+- **Summary:** Brief overview of key findings
+- **Key Studies:** 3-5 most relevant recent papers
+- **Citations:** Complete bibliographic information
+- **Usage Stats:** Token usage for cost tracking
+- **Timestamp:** When the research was performed
+
+## Integration with Scientific Writing
+
+This skill enhances the scientific writing process by providing:
+
+1. **Literature Reviews:** Current research for introduction sections
+2. **Methods Validation:** Verify protocols against current standards
+3. **Results Context:** Compare findings with recent similar studies
+4. **Discussion Support:** Latest evidence for arguments
+5. **Citation Management:** Properly formatted references
+
+## Troubleshooting
+
+**"API key not found"**
+- Ensure `OPENROUTER_API_KEY` environment variable is set
+- Check that you have credits in your OpenRouter account
+
+**"Model not available"**
+- Verify your API key has access to Perplexity models
+- Check OpenRouter status page for service issues
+
+**"Rate limit exceeded"**
+- Add delays between requests using `--delay` option
+- Check your OpenRouter account limits
+
+**"No relevant results"**
+- Try more specific or broader queries
+- Include time frames (e.g., "2023-2024")
+- Use academic keywords and technical terms
+
+## Cost Management
+
+- Monitor usage through OpenRouter dashboard
+- Typical costs: $0.01-0.05 per research query
+- Batch processing available for multiple queries
+- Consider query specificity to optimize token usage
+
+This skill is designed for academic and research purposes, providing high-quality, cited information to support scientific writing and research activities.
diff --git a/scientific-skills/research-lookup/SKILL.md b/scientific-skills/research-lookup/SKILL.md
new file mode 100644
index 0000000..711f0f5
--- /dev/null
+++ b/scientific-skills/research-lookup/SKILL.md
@@ -0,0 +1,502 @@
+---
+name: research-lookup
+description: "Look up current research information using Perplexity's Sonar Pro Search or Sonar Reasoning Pro models through OpenRouter. Automatically selects the best model based on query complexity. Search academic papers, recent studies, technical documentation, and general research information with citations."
+allowed-tools: [Read, Write, Edit, Bash]
+---
+
+# Research Information Lookup
+
+## Overview
+
+This skill enables real-time research information lookup using Perplexity's Sonar models through OpenRouter. It intelligently selects between **Sonar Pro Search** (fast, efficient lookup) and **Sonar Reasoning Pro** (deep analytical reasoning) based on query complexity. The skill provides access to current academic literature, recent studies, technical documentation, and general research information with proper citations and source attribution.
+
+## When to Use This Skill
+
+Use this skill when you need:
+
+- **Current Research Information**: Latest studies, papers, and findings in a specific field
+- **Literature Verification**: Check facts, statistics, or claims against current research
+- **Background Research**: Gather context and supporting evidence for scientific writing
+- **Citation Sources**: Find relevant papers and studies to cite in manuscripts
+- **Technical Documentation**: Look up specifications, protocols, or methodologies
+- **Recent Developments**: Stay current with emerging trends and breakthroughs
+- **Statistical Data**: Find recent statistics, survey results, or research findings
+- **Expert Opinions**: Access insights from recent interviews, reviews, or commentary
+
+## Visual Enhancement with Scientific Schematics
+
+**When creating documents with this skill, always consider adding scientific diagrams and schematics to enhance visual communication.**
+
+If your document does not already contain schematics or diagrams:
+- Use the **scientific-schematics** skill to generate AI-powered publication-quality diagrams
+- Simply describe your desired diagram in natural language
+- Nano Banana Pro will automatically generate, review, and refine the schematic
+
+**For new documents:** Scientific schematics should be generated by default to visually represent key concepts, workflows, architectures, or relationships described in the text.
+
+**How to generate schematics:**
+```bash
+python scripts/generate_schematic.py "your diagram description" -o figures/output.png
+```
+
+The AI will automatically:
+- Create publication-quality images with proper formatting
+- Review and refine through multiple iterations
+- Ensure accessibility (colorblind-friendly, high contrast)
+- Save outputs in the figures/ directory
+
+**When to add schematics:**
+- Research information flow diagrams
+- Query processing workflow illustrations
+- Model selection decision trees
+- System integration architecture diagrams
+- Information retrieval pipeline visualizations
+- Knowledge synthesis frameworks
+- Any complex concept that benefits from visualization
+
+For detailed guidance on creating schematics, refer to the scientific-schematics skill documentation.
+
+---
+
+## Core Capabilities
+
+### 1. Academic Research Queries
+
+**Search Academic Literature**: Query for recent papers, studies, and reviews in specific domains:
+
+```
+Query Examples:
+- "Recent advances in CRISPR gene editing 2024"
+- "Latest clinical trials for Alzheimer's disease treatment"
+- "Machine learning applications in drug discovery systematic review"
+- "Climate change impacts on biodiversity meta-analysis"
+```
+
+**Expected Response Format**:
+- Summary of key findings from recent literature
+- Citation of 3-5 most relevant papers with authors, titles, journals, and years
+- Key statistics or findings highlighted
+- Identification of research gaps or controversies
+- Links to full papers when available
+
+### 2. Technical and Methodological Information
+
+**Protocol and Method Lookups**: Find detailed procedures, specifications, and methodologies:
+
+```
+Query Examples:
+- "Western blot protocol for protein detection"
+- "RNA sequencing library preparation methods"
+- "Statistical power analysis for clinical trials"
+- "Machine learning model evaluation metrics"
+```
+
+**Expected Response Format**:
+- Step-by-step procedures or protocols
+- Required materials and equipment
+- Critical parameters and considerations
+- Troubleshooting common issues
+- References to standard protocols or seminal papers
+
+### 3. Statistical and Data Information
+
+**Research Statistics**: Look up current statistics, survey results, and research data:
+
+```
+Query Examples:
+- "Prevalence of diabetes in US population 2024"
+- "Global renewable energy adoption statistics"
+- "COVID-19 vaccination rates by country"
+- "AI adoption in healthcare industry survey"
+```
+
+**Expected Response Format**:
+- Current statistics with dates and sources
+- Methodology of data collection
+- Confidence intervals or margins of error when available
+- Comparison with previous years or benchmarks
+- Citations to original surveys or studies
+
+### 4. Citation and Reference Assistance
+
+**Citation Finding**: Locate relevant papers and studies for citation in manuscripts:
+
+```
+Query Examples:
+- "Foundational papers on transformer architecture"
+- "Seminal works in quantum computing"
+- "Key studies on climate change mitigation"
+- "Landmark trials in cancer immunotherapy"
+```
+
+**Expected Response Format**:
+- 5-10 most influential or relevant papers
+- Complete citation information (authors, title, journal, year, DOI)
+- Brief description of each paper's contribution
+- Citation impact metrics when available (h-index, citation count)
+- Journal impact factors and rankings
+
+## Automatic Model Selection
+
+This skill features **intelligent model selection** based on query complexity:
+
+### Model Types
+
+**1. Sonar Pro Search** (`perplexity/sonar-pro-search`)
+- **Use Case**: Straightforward information lookup
+- **Best For**:
+ - Simple fact-finding queries
+ - Recent publication searches
+ - Basic protocol lookups
+ - Statistical data retrieval
+- **Speed**: Fast responses
+- **Cost**: Lower cost per query
+
+**2. Sonar Reasoning Pro** (`perplexity/sonar-reasoning-pro`)
+- **Use Case**: Complex analytical queries requiring deep reasoning
+- **Best For**:
+ - Comparative analysis ("compare X vs Y")
+ - Synthesis of multiple studies
+ - Evaluating trade-offs or controversies
+ - Explaining mechanisms or relationships
+ - Critical analysis and interpretation
+- **Speed**: Slower but more thorough
+- **Cost**: Higher cost per query, but provides deeper insights
+
+### Complexity Assessment
+
+The skill automatically detects query complexity using these indicators:
+
+**Reasoning Keywords** (triggers Sonar Reasoning Pro):
+- Analytical: `compare`, `contrast`, `analyze`, `analysis`, `evaluate`, `critique`
+- Comparative: `versus`, `vs`, `vs.`, `compared to`, `differences between`, `similarities`
+- Synthesis: `meta-analysis`, `systematic review`, `synthesis`, `integrate`
+- Causal: `mechanism`, `why`, `how does`, `how do`, `explain`, `relationship`, `causal relationship`, `underlying mechanism`
+- Theoretical: `theoretical framework`, `implications`, `interpret`, `reasoning`
+- Debate: `controversy`, `conflicting`, `paradox`, `debate`, `reconcile`
+- Trade-offs: `pros and cons`, `advantages and disadvantages`, `trade-off`, `tradeoff`, `trade offs`
+- Complexity: `multifaceted`, `complex interaction`, `critical analysis`
+
+**Complexity Scoring**:
+- Reasoning keywords: 3 points each (heavily weighted)
+- Multiple questions: 2 points per question mark
+- Complex sentence structures: 1.5 points per clause indicator (and, or, but, however, whereas, although)
+- Very long queries: 1 point if >150 characters
+- **Threshold**: Queries scoring ≥3 points trigger Sonar Reasoning Pro
+
+**Practical Result**: Even a single strong reasoning keyword (compare, explain, analyze, etc.) will trigger the more powerful Sonar Reasoning Pro model, ensuring you get deep analysis when needed.
+
+**Example Query Classification**:
+
+✅ **Sonar Pro Search** (straightforward lookup):
+- "Recent advances in CRISPR gene editing 2024"
+- "Prevalence of diabetes in US population"
+- "Western blot protocol for protein detection"
+
+✅ **Sonar Reasoning Pro** (complex analysis):
+- "Compare and contrast mRNA vaccines vs traditional vaccines for cancer treatment"
+- "Explain the mechanism underlying the relationship between gut microbiome and depression"
+- "Analyze the controversy surrounding AI in medical diagnosis and evaluate trade-offs"
+
+### Manual Override
+
+You can force a specific model using the `force_model` parameter:
+
+```python
+# Force Sonar Pro Search for fast lookup
+research = ResearchLookup(force_model='pro')
+
+# Force Sonar Reasoning Pro for deep analysis
+research = ResearchLookup(force_model='reasoning')
+
+# Automatic selection (default)
+research = ResearchLookup()
+```
+
+Command-line usage:
+```bash
+# Force Sonar Pro Search
+python research_lookup.py "your query" --force-model pro
+
+# Force Sonar Reasoning Pro
+python research_lookup.py "your query" --force-model reasoning
+
+# Automatic (no flag)
+python research_lookup.py "your query"
+```
+
+## Technical Integration
+
+### OpenRouter API Configuration
+
+This skill integrates with OpenRouter (openrouter.ai) to access Perplexity's Sonar models:
+
+**Model Specifications**:
+- **Models**:
+ - `perplexity/sonar-pro-search` (fast lookup)
+ - `perplexity/sonar-reasoning-pro-online` (deep analysis)
+- **Search Mode**: Academic/scholarly mode (prioritizes peer-reviewed sources)
+- **Search Context**: Always uses `high` search context for deeper, more comprehensive research results
+- **Context Window**: 200K+ tokens for comprehensive research
+- **Capabilities**: Academic paper search, citation generation, scholarly analysis
+- **Output**: Rich responses with citations and source links from academic databases
+
+**API Requirements**:
+- OpenRouter API key (set as `OPENROUTER_API_KEY` environment variable)
+- Account with sufficient credits for research queries
+- Proper attribution and citation of sources
+
+**Academic Mode Configuration**:
+- System message configured to prioritize scholarly sources
+- Search focused on peer-reviewed journals and academic publications
+- Enhanced citation extraction for academic references
+- Preference for recent academic literature (2020-2024)
+- Direct access to academic databases and repositories
+
+### Response Quality and Reliability
+
+**Source Verification**: The skill prioritizes:
+- Peer-reviewed academic papers and journals
+- Reputable institutional sources (universities, government agencies, NGOs)
+- Recent publications (within last 2-3 years preferred)
+- High-impact journals and conferences
+- Primary research over secondary sources
+
+**Citation Standards**: All responses include:
+- Complete bibliographic information
+- DOI or stable URLs when available
+- Access dates for web sources
+- Clear attribution of direct quotes or data
+
+## Query Best Practices
+
+### 1. Model Selection Strategy
+
+**For Simple Lookups (Sonar Pro Search)**:
+- Recent papers on a specific topic
+- Statistical data or prevalence rates
+- Standard protocols or methodologies
+- Citation finding for specific papers
+- Factual information retrieval
+
+**For Complex Analysis (Sonar Reasoning Pro)**:
+- Comparative studies and synthesis
+- Mechanism explanations
+- Controversy evaluation
+- Trade-off analysis
+- Theoretical frameworks
+- Multi-faceted relationships
+
+**Pro Tip**: The automatic selection is optimized for most use cases. Only use `force_model` if you have specific requirements or know the query needs deeper reasoning than detected.
+
+### 2. Specific and Focused Queries
+
+**Good Queries** (will trigger appropriate model):
+- "Randomized controlled trials of mRNA vaccines for cancer treatment 2023-2024" → Sonar Pro Search
+- "Compare the efficacy and safety of mRNA vaccines vs traditional vaccines for cancer treatment" → Sonar Reasoning Pro
+- "Explain the mechanism by which CRISPR off-target effects occur and strategies to minimize them" → Sonar Reasoning Pro
+
+**Poor Queries**:
+- "Tell me about AI" (too broad)
+- "Cancer research" (lacks specificity)
+- "Latest news" (too vague)
+
+### 3. Structured Query Format
+
+**Recommended Structure**:
+```
+[Topic] + [Specific Aspect] + [Time Frame] + [Type of Information]
+```
+
+**Examples**:
+- "CRISPR gene editing + off-target effects + 2024 + clinical trials"
+- "Quantum computing + error correction + recent advances + review papers"
+- "Renewable energy + solar efficiency + 2023-2024 + statistical data"
+
+### 4. Follow-up Queries
+
+**Effective Follow-ups**:
+- "Show me the full citation for the Smith et al. 2024 paper"
+- "What are the limitations of this methodology?"
+- "Find similar studies using different approaches"
+- "What controversies exist in this research area?"
+
+## Integration with Scientific Writing
+
+This skill enhances scientific writing by providing:
+
+1. **Literature Review Support**: Gather current research for introduction and discussion sections
+2. **Methods Validation**: Verify protocols and procedures against current standards
+3. **Results Contextualization**: Compare findings with recent similar studies
+4. **Discussion Enhancement**: Support arguments with latest evidence
+5. **Citation Management**: Provide properly formatted citations in multiple styles
+
+## Error Handling and Limitations
+
+**Known Limitations**:
+- Information cutoff: Responses limited to training data (typically 2023-2024)
+- Paywall content: May not access full text behind paywalls
+- Emerging research: May miss very recent papers not yet indexed
+- Specialized databases: Cannot access proprietary or restricted databases
+
+**Error Conditions**:
+- API rate limits or quota exceeded
+- Network connectivity issues
+- Malformed or ambiguous queries
+- Model unavailability or maintenance
+
+**Fallback Strategies**:
+- Rephrase queries for better clarity
+- Break complex queries into simpler components
+- Use broader time frames if recent data unavailable
+- Cross-reference with multiple query variations
+
+## Usage Examples
+
+### Example 1: Simple Literature Search (Sonar Pro Search)
+
+**Query**: "Recent advances in transformer attention mechanisms 2024"
+
+**Model Selected**: Sonar Pro Search (straightforward lookup)
+
+**Response Includes**:
+- Summary of 5 key papers from 2024
+- Complete citations with DOIs
+- Key innovations and improvements
+- Performance benchmarks
+- Future research directions
+
+### Example 2: Comparative Analysis (Sonar Reasoning Pro)
+
+**Query**: "Compare and contrast the advantages and limitations of transformer-based models versus traditional RNNs for sequence modeling"
+
+**Model Selected**: Sonar Reasoning Pro (complex analysis required)
+
+**Response Includes**:
+- Detailed comparison across multiple dimensions
+- Analysis of architectural differences
+- Trade-offs in computational efficiency vs performance
+- Use case recommendations
+- Synthesis of evidence from multiple studies
+- Discussion of ongoing debates in the field
+
+### Example 3: Method Verification (Sonar Pro Search)
+
+**Query**: "Standard protocols for flow cytometry analysis"
+
+**Model Selected**: Sonar Pro Search (protocol lookup)
+
+**Response Includes**:
+- Step-by-step protocol from recent review
+- Required controls and calibrations
+- Common pitfalls and troubleshooting
+- Reference to definitive methodology paper
+- Alternative approaches with pros/cons
+
+### Example 4: Mechanism Explanation (Sonar Reasoning Pro)
+
+**Query**: "Explain the underlying mechanism of how mRNA vaccines trigger immune responses and why they differ from traditional vaccines"
+
+**Model Selected**: Sonar Reasoning Pro (requires causal reasoning)
+
+**Response Includes**:
+- Detailed mechanistic explanation
+- Step-by-step biological processes
+- Comparative analysis with traditional vaccines
+- Molecular-level interactions
+- Integration of immunology and pharmacology concepts
+- Evidence from recent research
+
+### Example 5: Statistical Data (Sonar Pro Search)
+
+**Query**: "Global AI adoption in healthcare statistics 2024"
+
+**Model Selected**: Sonar Pro Search (data lookup)
+
+**Response Includes**:
+- Current adoption rates by region
+- Market size and growth projections
+- Survey methodology and sample size
+- Comparison with previous years
+- Citations to market research reports
+
+## Performance and Cost Considerations
+
+### Response Times
+
+**Sonar Pro Search**:
+- Typical response time: 5-15 seconds
+- Best for rapid information gathering
+- Suitable for batch queries
+
+**Sonar Reasoning Pro**:
+- Typical response time: 15-45 seconds
+- Worth the wait for complex analytical queries
+- Provides more thorough reasoning and synthesis
+
+### Cost Optimization
+
+**Automatic Selection Benefits**:
+- Saves costs by using Sonar Pro Search for straightforward queries
+- Reserves Sonar Reasoning Pro for queries that truly benefit from deeper analysis
+- Optimizes the balance between cost and quality
+
+**Manual Override Use Cases**:
+- Force Sonar Pro Search when budget is constrained and speed is priority
+- Force Sonar Reasoning Pro when working on critical research requiring maximum depth
+- Use for specific sections of papers (e.g., Pro Search for methods, Reasoning for discussion)
+
+**Best Practices**:
+1. Trust the automatic selection for most use cases
+2. Review query results - if Sonar Pro Search doesn't provide sufficient depth, rephrase with reasoning keywords
+3. Use batch queries strategically - combine simple lookups to minimize total query count
+4. For literature reviews, start with Sonar Pro Search for breadth, then use Sonar Reasoning Pro for synthesis
+
+## Security and Ethical Considerations
+
+**Responsible Use**:
+- Verify all information against primary sources when possible
+- Clearly attribute all data and quotes to original sources
+- Avoid presenting AI-generated summaries as original research
+- Respect copyright and licensing restrictions
+- Use for research assistance, not to bypass paywalls or subscriptions
+
+**Academic Integrity**:
+- Always cite original sources, not the AI tool
+- Use as a starting point for literature searches
+- Follow institutional guidelines for AI tool usage
+- Maintain transparency about research methods
+
+## Complementary Tools
+
+In addition to research-lookup, the scientific writer has access to **WebSearch** for:
+
+- **Quick metadata verification**: Look up DOIs, publication years, journal names, volume/page numbers
+- **Non-academic sources**: News, blogs, technical documentation, current events
+- **General information**: Company info, product details, current statistics
+- **Cross-referencing**: Verify citation details found through research-lookup
+
+**When to use which tool:**
+| Task | Tool |
+|------|------|
+| Find academic papers | research-lookup |
+| Literature search | research-lookup |
+| Deep analysis/comparison | research-lookup (Sonar Reasoning Pro) |
+| Look up DOI/metadata | WebSearch |
+| Verify publication year | WebSearch |
+| Find journal volume/pages | WebSearch |
+| Current events/news | WebSearch |
+| Non-scholarly sources | WebSearch |
+
+## Summary
+
+This skill serves as a powerful research assistant with intelligent dual-model selection:
+
+- **Automatic Intelligence**: Analyzes query complexity and selects the optimal model (Sonar Pro Search or Sonar Reasoning Pro)
+- **Cost-Effective**: Uses faster, cheaper Sonar Pro Search for straightforward lookups
+- **Deep Analysis**: Automatically engages Sonar Reasoning Pro for complex comparative, analytical, and theoretical queries
+- **Flexible Control**: Manual override available when you know exactly what level of analysis you need
+- **Academic Focus**: Both models configured to prioritize peer-reviewed sources and scholarly literature
+- **Complementary WebSearch**: Use alongside WebSearch for metadata verification and non-academic sources
+
+Whether you need quick fact-finding or deep analytical synthesis, this skill automatically adapts to deliver the right level of research support for your scientific writing needs.
diff --git a/scientific-skills/research-lookup/examples.py b/scientific-skills/research-lookup/examples.py
new file mode 100644
index 0000000..669eace
--- /dev/null
+++ b/scientific-skills/research-lookup/examples.py
@@ -0,0 +1,174 @@
+#!/usr/bin/env python3
+"""
+Example usage of the Research Lookup skill with automatic model selection.
+
+This script demonstrates:
+1. Automatic model selection based on query complexity
+2. Manual model override options
+3. Batch query processing
+4. Integration with scientific writing workflows
+"""
+
+import os
+from research_lookup import ResearchLookup
+
+
+def example_automatic_selection():
+ """Demonstrate automatic model selection."""
+ print("=" * 80)
+ print("EXAMPLE 1: Automatic Model Selection")
+ print("=" * 80)
+ print()
+
+ research = ResearchLookup()
+
+ # Simple lookup - will use Sonar Pro Search
+ query1 = "Recent advances in CRISPR gene editing 2024"
+ print(f"Query: {query1}")
+ print(f"Expected model: Sonar Pro Search (fast lookup)")
+ result1 = research.lookup(query1)
+ print(f"Actual model: {result1.get('model')}")
+ print()
+
+ # Complex analysis - will use Sonar Reasoning Pro
+ query2 = "Compare and contrast the efficacy of mRNA vaccines versus traditional vaccines"
+ print(f"Query: {query2}")
+ print(f"Expected model: Sonar Reasoning Pro (analytical)")
+ result2 = research.lookup(query2)
+ print(f"Actual model: {result2.get('model')}")
+ print()
+
+
+def example_manual_override():
+ """Demonstrate manual model override."""
+ print("=" * 80)
+ print("EXAMPLE 2: Manual Model Override")
+ print("=" * 80)
+ print()
+
+ # Force Sonar Pro Search for budget-constrained rapid lookup
+ research_pro = ResearchLookup(force_model='pro')
+ query = "Explain the mechanism of CRISPR-Cas9"
+ print(f"Query: {query}")
+ print(f"Forced model: Sonar Pro Search")
+ result = research_pro.lookup(query)
+ print(f"Model used: {result.get('model')}")
+ print()
+
+ # Force Sonar Reasoning Pro for critical analysis
+ research_reasoning = ResearchLookup(force_model='reasoning')
+ print(f"Query: {query}")
+ print(f"Forced model: Sonar Reasoning Pro")
+ result = research_reasoning.lookup(query)
+ print(f"Model used: {result.get('model')}")
+ print()
+
+
+def example_batch_queries():
+ """Demonstrate batch query processing."""
+ print("=" * 80)
+ print("EXAMPLE 3: Batch Query Processing")
+ print("=" * 80)
+ print()
+
+ research = ResearchLookup()
+
+ # Mix of simple and complex queries
+ queries = [
+ "Recent clinical trials for Alzheimer's disease", # Sonar Pro Search
+ "Compare deep learning vs traditional ML in drug discovery", # Sonar Reasoning Pro
+ "Statistical power analysis methods", # Sonar Pro Search
+ ]
+
+ print("Processing batch queries...")
+ print("Each query will automatically select the appropriate model")
+ print()
+
+ results = research.batch_lookup(queries, delay=1.0)
+
+ for i, result in enumerate(results):
+ print(f"Query {i+1}: {result['query'][:50]}...")
+ print(f" Model: {result.get('model')}")
+ print(f" Type: {result.get('model_type')}")
+ print()
+
+
+def example_scientific_writing_workflow():
+ """Demonstrate integration with scientific writing workflow."""
+ print("=" * 80)
+ print("EXAMPLE 4: Scientific Writing Workflow")
+ print("=" * 80)
+ print()
+
+ research = ResearchLookup()
+
+ # Literature review phase - use Pro for breadth
+ print("PHASE 1: Literature Review (Breadth)")
+ lit_queries = [
+ "Recent papers on machine learning in genomics 2024",
+ "Clinical applications of AI in radiology",
+ "RNA sequencing analysis methods"
+ ]
+
+ for query in lit_queries:
+ print(f" - {query}")
+ # These will automatically use Sonar Pro Search
+ print()
+
+ # Discussion phase - use Reasoning Pro for synthesis
+ print("PHASE 2: Discussion (Synthesis & Analysis)")
+ discussion_queries = [
+ "Compare the advantages and limitations of different ML approaches in genomics",
+ "Explain the relationship between model interpretability and clinical adoption",
+ "Analyze the ethical implications of AI in medical diagnosis"
+ ]
+
+ for query in discussion_queries:
+ print(f" - {query}")
+ # These will automatically use Sonar Reasoning Pro
+ print()
+
+
+def main():
+ """Run all examples (requires OPENROUTER_API_KEY to be set)."""
+
+ if not os.getenv("OPENROUTER_API_KEY"):
+ print("Note: Set OPENROUTER_API_KEY environment variable to run live queries")
+ print("These examples show the structure without making actual API calls")
+ print()
+
+ # Uncomment to run examples (requires API key)
+ # example_automatic_selection()
+ # example_manual_override()
+ # example_batch_queries()
+ # example_scientific_writing_workflow()
+
+ # Show complexity assessment without API calls
+ print("=" * 80)
+ print("COMPLEXITY ASSESSMENT EXAMPLES (No API calls required)")
+ print("=" * 80)
+ print()
+
+ os.environ.setdefault("OPENROUTER_API_KEY", "test")
+ research = ResearchLookup()
+
+ test_queries = [
+ ("Recent CRISPR studies", "pro"),
+ ("Compare CRISPR vs TALENs", "reasoning"),
+ ("Explain how CRISPR works", "reasoning"),
+ ("Western blot protocol", "pro"),
+ ("Pros and cons of different sequencing methods", "reasoning"),
+ ]
+
+ for query, expected in test_queries:
+ complexity = research._assess_query_complexity(query)
+ model_name = "Sonar Reasoning Pro" if complexity == "reasoning" else "Sonar Pro Search"
+ status = "✓" if complexity == expected else "✗"
+ print(f"{status} '{query}'")
+ print(f" → {model_name}")
+ print()
+
+
+if __name__ == "__main__":
+ main()
+
diff --git a/scientific-skills/research-lookup/lookup.py b/scientific-skills/research-lookup/lookup.py
new file mode 100755
index 0000000..91216ef
--- /dev/null
+++ b/scientific-skills/research-lookup/lookup.py
@@ -0,0 +1,93 @@
+#!/usr/bin/env python3
+"""
+Research Lookup Tool for Claude Code
+Performs research queries using Perplexity Sonar Pro Search via OpenRouter.
+"""
+
+import os
+import sys
+import json
+from typing import Dict, List, Optional
+
+# Import the main research lookup class
+sys.path.append(os.path.join(os.path.dirname(os.path.abspath(__file__)), 'scripts'))
+from research_lookup import ResearchLookup
+
+
+def format_response(result: Dict) -> str:
+ """Format the research result for display."""
+ if not result["success"]:
+ return f"❌ Research lookup failed: {result['error']}"
+
+ response = result["response"]
+ citations = result["citations"]
+
+ # Format the output for Claude Code
+ output = f"""🔍 **Research Results**
+
+**Query:** {result['query']}
+**Model:** {result['model']}
+**Timestamp:** {result['timestamp']}
+
+---
+
+{response}
+
+"""
+
+ if citations:
+ output += f"\n**Extracted Citations ({len(citations)}):**\n"
+ for i, citation in enumerate(citations, 1):
+ if citation.get("doi"):
+ output += f"{i}. DOI: {citation['doi']}\n"
+ elif citation.get("authors") and citation.get("year"):
+ output += f"{i}. {citation['authors']} ({citation['year']})\n"
+ else:
+ output += f"{i}. {citation}\n"
+
+ if result.get("usage"):
+ usage = result["usage"]
+ output += f"\n**Usage:** {usage.get('total_tokens', 'N/A')} tokens"
+
+ return output
+
+
+def main():
+ """Main entry point for Claude Code tool."""
+ # Check for API key
+ if not os.getenv("OPENROUTER_API_KEY"):
+ print("❌ Error: OPENROUTER_API_KEY environment variable not set")
+ print("Please set it in your .env file or export it:")
+ print(" export OPENROUTER_API_KEY='your_openrouter_api_key'")
+ return 1
+
+ # Get query from command line arguments
+ if len(sys.argv) < 2:
+ print("❌ Error: No query provided")
+ print("Usage: python lookup.py 'your research query here'")
+ return 1
+
+ query = " ".join(sys.argv[1:])
+
+ try:
+ # Initialize research tool
+ research = ResearchLookup()
+
+ # Perform lookup
+ print(f"🔍 Researching: {query}")
+ result = research.lookup(query)
+
+ # Format and output result
+ formatted_output = format_response(result)
+ print(formatted_output)
+
+ # Return success code
+ return 0 if result["success"] else 1
+
+ except Exception as e:
+ print(f"❌ Error: {str(e)}")
+ return 1
+
+
+if __name__ == "__main__":
+ exit(main())
diff --git a/scientific-skills/research-lookup/research_lookup.py b/scientific-skills/research-lookup/research_lookup.py
new file mode 100644
index 0000000..3d75d90
--- /dev/null
+++ b/scientific-skills/research-lookup/research_lookup.py
@@ -0,0 +1,406 @@
+#!/usr/bin/env python3
+"""
+Research Information Lookup Tool
+Uses Perplexity's Sonar Pro Search model through OpenRouter for academic research queries.
+"""
+
+import os
+import json
+import requests
+import time
+from datetime import datetime
+from typing import Dict, List, Optional, Any
+from urllib.parse import quote
+
+
+class ResearchLookup:
+ """Research information lookup using Perplexity Sonar models via OpenRouter."""
+
+ # Available models
+ MODELS = {
+ "pro": "perplexity/sonar-pro-search", # Fast lookup with search, cost-effective
+ "reasoning": "perplexity/sonar-reasoning-pro", # Deep analysis with reasoning and online search
+ }
+
+ # Keywords that indicate complex queries requiring reasoning model
+ REASONING_KEYWORDS = [
+ "compare", "contrast", "analyze", "analysis", "evaluate", "critique",
+ "versus", "vs", "vs.", "compared to", "differences between", "similarities",
+ "meta-analysis", "systematic review", "synthesis", "integrate",
+ "mechanism", "why", "how does", "how do", "explain", "relationship",
+ "theoretical framework", "implications", "interpret", "reasoning",
+ "controversy", "conflicting", "paradox", "debate", "reconcile",
+ "pros and cons", "advantages and disadvantages", "trade-off", "tradeoff",
+ ]
+
+ def __init__(self, force_model: Optional[str] = None):
+ """
+ Initialize the research lookup tool.
+
+ Args:
+ force_model: Optional model override ('pro' or 'reasoning').
+ If None, model is auto-selected based on query complexity.
+ """
+ self.api_key = os.getenv("OPENROUTER_API_KEY")
+ if not self.api_key:
+ raise ValueError("OPENROUTER_API_KEY environment variable not set")
+
+ self.base_url = "https://openrouter.ai/api/v1"
+ self.force_model = force_model
+ self.headers = {
+ "Authorization": f"Bearer {self.api_key}",
+ "Content-Type": "application/json",
+ "HTTP-Referer": "https://scientific-writer.local",
+ "X-Title": "Scientific Writer Research Tool"
+ }
+
+ def _select_model(self, query: str) -> str:
+ """
+ Select the appropriate model based on query complexity.
+
+ Args:
+ query: The research query
+
+ Returns:
+ Model identifier string
+ """
+ if self.force_model:
+ return self.MODELS.get(self.force_model, self.MODELS["reasoning"])
+
+ # Check for reasoning keywords (case-insensitive)
+ query_lower = query.lower()
+ for keyword in self.REASONING_KEYWORDS:
+ if keyword in query_lower:
+ return self.MODELS["reasoning"]
+
+ # Check for multiple questions or complex structure
+ question_count = query.count("?")
+ if question_count >= 2:
+ return self.MODELS["reasoning"]
+
+ # Check for very long queries (likely complex)
+ if len(query) > 200:
+ return self.MODELS["reasoning"]
+
+ # Default to pro for simple lookups
+ return self.MODELS["pro"]
+
+ def _make_request(self, messages: List[Dict[str, str]], model: str, **kwargs) -> Dict[str, Any]:
+ """Make a request to the OpenRouter API with academic search mode."""
+ data = {
+ "model": model,
+ "messages": messages,
+ "max_tokens": 8000,
+ "temperature": 0.1, # Low temperature for factual research
+ # Perplexity-specific parameters for academic search
+ "search_mode": "academic", # Prioritize scholarly sources (peer-reviewed papers, journals)
+ "search_context_size": "high", # Always use high context for deeper research
+ **kwargs
+ }
+
+ try:
+ response = requests.post(
+ f"{self.base_url}/chat/completions",
+ headers=self.headers,
+ json=data,
+ timeout=90 # Increased timeout for academic search
+ )
+ response.raise_for_status()
+ return response.json()
+ except requests.exceptions.RequestException as e:
+ raise Exception(f"API request failed: {str(e)}")
+
+ def _format_research_prompt(self, query: str) -> str:
+ """Format the query for optimal research results."""
+ return f"""You are an expert research assistant. Please provide comprehensive, accurate research information for the following query: "{query}"
+
+IMPORTANT INSTRUCTIONS:
+1. Focus on ACADEMIC and SCIENTIFIC sources (peer-reviewed papers, reputable journals, institutional research)
+2. Include RECENT information (prioritize 2020-2026 publications)
+3. Provide COMPLETE citations with authors, title, journal/conference, year, and DOI when available
+4. Structure your response with clear sections and proper attribution
+5. Be comprehensive but concise - aim for 800-1200 words
+6. Include key findings, methodologies, and implications when relevant
+7. Note any controversies, limitations, or conflicting evidence
+
+RESPONSE FORMAT:
+- Start with a brief summary (2-3 sentences)
+- Present key findings and studies in organized sections
+- End with future directions or research gaps if applicable
+- Include 5-8 high-quality citations at the end
+
+Remember: This is for academic research purposes. Prioritize accuracy, completeness, and proper attribution."""
+
+ def lookup(self, query: str) -> Dict[str, Any]:
+ """Perform a research lookup for the given query."""
+ timestamp = datetime.now().strftime("%Y-%m-%d %H:%M:%S")
+
+ # Select model based on query complexity
+ model = self._select_model(query)
+
+ # Format the research prompt
+ research_prompt = self._format_research_prompt(query)
+
+ # Prepare messages for the API with system message for academic mode
+ messages = [
+ {
+ "role": "system",
+ "content": "You are an academic research assistant. Focus exclusively on scholarly sources: peer-reviewed journals, academic papers, research institutions, and reputable scientific publications. Prioritize recent academic literature (2020-2026) and provide complete citations with DOIs. Use academic/scholarly search mode."
+ },
+ {"role": "user", "content": research_prompt}
+ ]
+
+ try:
+ # Make the API request
+ response = self._make_request(messages, model)
+
+ # Extract the response content
+ if "choices" in response and len(response["choices"]) > 0:
+ choice = response["choices"][0]
+ if "message" in choice and "content" in choice["message"]:
+ content = choice["message"]["content"]
+
+ # Extract citations from API response (Perplexity provides these)
+ api_citations = self._extract_api_citations(response, choice)
+
+ # Also extract citations from text as fallback
+ text_citations = self._extract_citations_from_text(content)
+
+ # Combine: prioritize API citations, add text citations if no duplicates
+ citations = api_citations + text_citations
+
+ return {
+ "success": True,
+ "query": query,
+ "response": content,
+ "citations": citations,
+ "sources": api_citations, # Separate field for API-provided sources
+ "timestamp": timestamp,
+ "model": model,
+ "usage": response.get("usage", {})
+ }
+ else:
+ raise Exception("Invalid response format from API")
+ else:
+ raise Exception("No response choices received from API")
+
+ except Exception as e:
+ return {
+ "success": False,
+ "query": query,
+ "error": str(e),
+ "timestamp": timestamp,
+ "model": model
+ }
+
+ def _extract_api_citations(self, response: Dict[str, Any], choice: Dict[str, Any]) -> List[Dict[str, str]]:
+ """Extract citations from Perplexity API response fields."""
+ citations = []
+
+ # Perplexity returns citations in search_results field (new format)
+ # Check multiple possible locations where OpenRouter might place them
+ search_results = (
+ response.get("search_results") or
+ choice.get("search_results") or
+ choice.get("message", {}).get("search_results") or
+ []
+ )
+
+ for result in search_results:
+ citation = {
+ "type": "source",
+ "title": result.get("title", ""),
+ "url": result.get("url", ""),
+ "date": result.get("date", ""),
+ }
+ # Add snippet if available (newer API feature)
+ if result.get("snippet"):
+ citation["snippet"] = result.get("snippet")
+ citations.append(citation)
+
+ # Also check for legacy citations field (backward compatibility)
+ legacy_citations = (
+ response.get("citations") or
+ choice.get("citations") or
+ choice.get("message", {}).get("citations") or
+ []
+ )
+
+ for url in legacy_citations:
+ if isinstance(url, str):
+ # Legacy format was just URLs
+ citations.append({
+ "type": "source",
+ "url": url,
+ "title": "",
+ "date": ""
+ })
+ elif isinstance(url, dict):
+ citations.append({
+ "type": "source",
+ "url": url.get("url", ""),
+ "title": url.get("title", ""),
+ "date": url.get("date", "")
+ })
+
+ return citations
+
+ def _extract_citations_from_text(self, text: str) -> List[Dict[str, str]]:
+ """Extract potential citations from the response text as fallback."""
+ import re
+ citations = []
+
+ # Look for DOI patterns first (most reliable)
+ # Matches: doi:10.xxx, DOI: 10.xxx, https://doi.org/10.xxx
+ doi_pattern = r'(?:doi[:\s]*|https?://(?:dx\.)?doi\.org/)(10\.[0-9]{4,}/[^\s\)\]\,\[\<\>]+)'
+ doi_matches = re.findall(doi_pattern, text, re.IGNORECASE)
+ seen_dois = set()
+
+ for doi in doi_matches:
+ # Clean up DOI - remove trailing punctuation and brackets
+ doi_clean = doi.strip().rstrip('.,;:)]')
+ if doi_clean and doi_clean not in seen_dois:
+ seen_dois.add(doi_clean)
+ citations.append({
+ "type": "doi",
+ "doi": doi_clean,
+ "url": f"https://doi.org/{doi_clean}"
+ })
+
+ # Look for URLs that might be sources
+ url_pattern = r'https?://[^\s\)\]\,\<\>\"\']+(?:arxiv\.org|pubmed|ncbi\.nlm\.nih\.gov|nature\.com|science\.org|wiley\.com|springer\.com|ieee\.org|acm\.org)[^\s\)\]\,\<\>\"\']*'
+ url_matches = re.findall(url_pattern, text, re.IGNORECASE)
+ seen_urls = set()
+
+ for url in url_matches:
+ url_clean = url.rstrip('.')
+ if url_clean not in seen_urls:
+ seen_urls.add(url_clean)
+ citations.append({
+ "type": "url",
+ "url": url_clean
+ })
+
+ return citations
+
+ def batch_lookup(self, queries: List[str], delay: float = 1.0) -> List[Dict[str, Any]]:
+ """Perform multiple research lookups with optional delay between requests."""
+ results = []
+
+ for i, query in enumerate(queries):
+ if i > 0 and delay > 0:
+ time.sleep(delay) # Rate limiting
+
+ result = self.lookup(query)
+ results.append(result)
+
+ # Print progress
+ print(f"[Research] Completed query {i+1}/{len(queries)}: {query[:50]}...")
+
+ return results
+
+ def get_model_info(self) -> Dict[str, Any]:
+ """Get information about available models from OpenRouter."""
+ try:
+ response = requests.get(
+ f"{self.base_url}/models",
+ headers=self.headers,
+ timeout=30
+ )
+ response.raise_for_status()
+ return response.json()
+ except Exception as e:
+ return {"error": str(e)}
+
+
+def main():
+ """Command-line interface for testing the research lookup tool."""
+ import argparse
+
+ parser = argparse.ArgumentParser(description="Research Information Lookup Tool")
+ parser.add_argument("query", nargs="?", help="Research query to look up")
+ parser.add_argument("--model-info", action="store_true", help="Show available models")
+ parser.add_argument("--batch", nargs="+", help="Run multiple queries")
+ parser.add_argument("--force-model", choices=["pro", "reasoning"],
+ help="Force specific model: 'pro' for fast lookup, 'reasoning' for deep analysis")
+
+ args = parser.parse_args()
+
+ # Check for API key
+ if not os.getenv("OPENROUTER_API_KEY"):
+ print("Error: OPENROUTER_API_KEY environment variable not set")
+ print("Please set it in your .env file or export it:")
+ print(" export OPENROUTER_API_KEY='your_openrouter_api_key'")
+ return 1
+
+ try:
+ research = ResearchLookup(force_model=args.force_model)
+
+ if args.model_info:
+ print("Available models from OpenRouter:")
+ models = research.get_model_info()
+ if "data" in models:
+ for model in models["data"]:
+ if "perplexity" in model["id"].lower():
+ print(f" - {model['id']}: {model.get('name', 'N/A')}")
+ return 0
+
+ if not args.query and not args.batch:
+ print("Error: No query provided. Use --model-info to see available models.")
+ return 1
+
+ if args.batch:
+ print(f"Running batch research for {len(args.batch)} queries...")
+ results = research.batch_lookup(args.batch)
+ else:
+ print(f"Researching: {args.query}")
+ results = [research.lookup(args.query)]
+
+ # Display results
+ for i, result in enumerate(results):
+ if result["success"]:
+ print(f"\n{'='*80}")
+ print(f"Query {i+1}: {result['query']}")
+ print(f"Timestamp: {result['timestamp']}")
+ print(f"Model: {result['model']}")
+ print(f"{'='*80}")
+ print(result["response"])
+
+ # Display API-provided sources first (most reliable)
+ sources = result.get("sources", [])
+ if sources:
+ print(f"\n📚 Sources ({len(sources)}):")
+ for j, source in enumerate(sources):
+ title = source.get("title", "Untitled")
+ url = source.get("url", "")
+ date = source.get("date", "")
+ date_str = f" ({date})" if date else ""
+ print(f" [{j+1}] {title}{date_str}")
+ if url:
+ print(f" {url}")
+
+ # Display additional text-extracted citations
+ citations = result.get("citations", [])
+ text_citations = [c for c in citations if c.get("type") in ("doi", "url")]
+ if text_citations:
+ print(f"\n🔗 Additional References ({len(text_citations)}):")
+ for j, citation in enumerate(text_citations):
+ if citation.get("type") == "doi":
+ print(f" [{j+1}] DOI: {citation.get('doi', '')} - {citation.get('url', '')}")
+ elif citation.get("type") == "url":
+ print(f" [{j+1}] {citation.get('url', '')}")
+
+ if result.get("usage"):
+ print(f"\nUsage: {result['usage']}")
+ else:
+ print(f"\nError in query {i+1}: {result['error']}")
+
+ return 0
+
+ except Exception as e:
+ print(f"Error: {str(e)}")
+ return 1
+
+
+if __name__ == "__main__":
+ exit(main())
diff --git a/scientific-skills/research-lookup/scripts/research_lookup.py b/scientific-skills/research-lookup/scripts/research_lookup.py
new file mode 100755
index 0000000..dbe7568
--- /dev/null
+++ b/scientific-skills/research-lookup/scripts/research_lookup.py
@@ -0,0 +1,406 @@
+#!/usr/bin/env python3
+"""
+Research Information Lookup Tool
+Uses Perplexity's Sonar Pro Search model through OpenRouter for academic research queries.
+"""
+
+import os
+import json
+import requests
+import time
+from datetime import datetime
+from typing import Dict, List, Optional, Any
+from urllib.parse import quote
+
+
+class ResearchLookup:
+ """Research information lookup using Perplexity Sonar models via OpenRouter."""
+
+ # Available models
+ MODELS = {
+ "pro": "perplexity/sonar-pro", # Fast lookup, cost-effective
+ "reasoning": "perplexity/sonar-reasoning-pro", # Deep analysis with reasoning
+ }
+
+ # Keywords that indicate complex queries requiring reasoning model
+ REASONING_KEYWORDS = [
+ "compare", "contrast", "analyze", "analysis", "evaluate", "critique",
+ "versus", "vs", "vs.", "compared to", "differences between", "similarities",
+ "meta-analysis", "systematic review", "synthesis", "integrate",
+ "mechanism", "why", "how does", "how do", "explain", "relationship",
+ "theoretical framework", "implications", "interpret", "reasoning",
+ "controversy", "conflicting", "paradox", "debate", "reconcile",
+ "pros and cons", "advantages and disadvantages", "trade-off", "tradeoff",
+ ]
+
+ def __init__(self, force_model: Optional[str] = None):
+ """
+ Initialize the research lookup tool.
+
+ Args:
+ force_model: Optional model override ('pro' or 'reasoning').
+ If None, model is auto-selected based on query complexity.
+ """
+ self.api_key = os.getenv("OPENROUTER_API_KEY")
+ if not self.api_key:
+ raise ValueError("OPENROUTER_API_KEY environment variable not set")
+
+ self.base_url = "https://openrouter.ai/api/v1"
+ self.force_model = force_model
+ self.headers = {
+ "Authorization": f"Bearer {self.api_key}",
+ "Content-Type": "application/json",
+ "HTTP-Referer": "https://scientific-writer.local",
+ "X-Title": "Scientific Writer Research Tool"
+ }
+
+ def _select_model(self, query: str) -> str:
+ """
+ Select the appropriate model based on query complexity.
+
+ Args:
+ query: The research query
+
+ Returns:
+ Model identifier string
+ """
+ if self.force_model:
+ return self.MODELS.get(self.force_model, self.MODELS["reasoning"])
+
+ # Check for reasoning keywords (case-insensitive)
+ query_lower = query.lower()
+ for keyword in self.REASONING_KEYWORDS:
+ if keyword in query_lower:
+ return self.MODELS["reasoning"]
+
+ # Check for multiple questions or complex structure
+ question_count = query.count("?")
+ if question_count >= 2:
+ return self.MODELS["reasoning"]
+
+ # Check for very long queries (likely complex)
+ if len(query) > 200:
+ return self.MODELS["reasoning"]
+
+ # Default to pro for simple lookups
+ return self.MODELS["pro"]
+
+ def _make_request(self, messages: List[Dict[str, str]], model: str, **kwargs) -> Dict[str, Any]:
+ """Make a request to the OpenRouter API with academic search mode."""
+ data = {
+ "model": model,
+ "messages": messages,
+ "max_tokens": 8000,
+ "temperature": 0.1, # Low temperature for factual research
+ # Perplexity-specific parameters for academic search
+ "search_mode": "academic", # Prioritize scholarly sources (peer-reviewed papers, journals)
+ "search_context_size": "high", # Always use high context for deeper research
+ **kwargs
+ }
+
+ try:
+ response = requests.post(
+ f"{self.base_url}/chat/completions",
+ headers=self.headers,
+ json=data,
+ timeout=90 # Increased timeout for academic search
+ )
+ response.raise_for_status()
+ return response.json()
+ except requests.exceptions.RequestException as e:
+ raise Exception(f"API request failed: {str(e)}")
+
+ def _format_research_prompt(self, query: str) -> str:
+ """Format the query for optimal research results."""
+ return f"""You are an expert research assistant. Please provide comprehensive, accurate research information for the following query: "{query}"
+
+IMPORTANT INSTRUCTIONS:
+1. Focus on ACADEMIC and SCIENTIFIC sources (peer-reviewed papers, reputable journals, institutional research)
+2. Include RECENT information (prioritize 2020-2026 publications)
+3. Provide COMPLETE citations with authors, title, journal/conference, year, and DOI when available
+4. Structure your response with clear sections and proper attribution
+5. Be comprehensive but concise - aim for 800-1200 words
+6. Include key findings, methodologies, and implications when relevant
+7. Note any controversies, limitations, or conflicting evidence
+
+RESPONSE FORMAT:
+- Start with a brief summary (2-3 sentences)
+- Present key findings and studies in organized sections
+- End with future directions or research gaps if applicable
+- Include 5-8 high-quality citations at the end
+
+Remember: This is for academic research purposes. Prioritize accuracy, completeness, and proper attribution."""
+
+ def lookup(self, query: str) -> Dict[str, Any]:
+ """Perform a research lookup for the given query."""
+ timestamp = datetime.now().strftime("%Y-%m-%d %H:%M:%S")
+
+ # Select model based on query complexity
+ model = self._select_model(query)
+
+ # Format the research prompt
+ research_prompt = self._format_research_prompt(query)
+
+ # Prepare messages for the API with system message for academic mode
+ messages = [
+ {
+ "role": "system",
+ "content": "You are an academic research assistant. Focus exclusively on scholarly sources: peer-reviewed journals, academic papers, research institutions, and reputable scientific publications. Prioritize recent academic literature (2020-2026) and provide complete citations with DOIs. Use academic/scholarly search mode."
+ },
+ {"role": "user", "content": research_prompt}
+ ]
+
+ try:
+ # Make the API request
+ response = self._make_request(messages, model)
+
+ # Extract the response content
+ if "choices" in response and len(response["choices"]) > 0:
+ choice = response["choices"][0]
+ if "message" in choice and "content" in choice["message"]:
+ content = choice["message"]["content"]
+
+ # Extract citations from API response (Perplexity provides these)
+ api_citations = self._extract_api_citations(response, choice)
+
+ # Also extract citations from text as fallback
+ text_citations = self._extract_citations_from_text(content)
+
+ # Combine: prioritize API citations, add text citations if no duplicates
+ citations = api_citations + text_citations
+
+ return {
+ "success": True,
+ "query": query,
+ "response": content,
+ "citations": citations,
+ "sources": api_citations, # Separate field for API-provided sources
+ "timestamp": timestamp,
+ "model": model,
+ "usage": response.get("usage", {})
+ }
+ else:
+ raise Exception("Invalid response format from API")
+ else:
+ raise Exception("No response choices received from API")
+
+ except Exception as e:
+ return {
+ "success": False,
+ "query": query,
+ "error": str(e),
+ "timestamp": timestamp,
+ "model": model
+ }
+
+ def _extract_api_citations(self, response: Dict[str, Any], choice: Dict[str, Any]) -> List[Dict[str, str]]:
+ """Extract citations from Perplexity API response fields."""
+ citations = []
+
+ # Perplexity returns citations in search_results field (new format)
+ # Check multiple possible locations where OpenRouter might place them
+ search_results = (
+ response.get("search_results") or
+ choice.get("search_results") or
+ choice.get("message", {}).get("search_results") or
+ []
+ )
+
+ for result in search_results:
+ citation = {
+ "type": "source",
+ "title": result.get("title", ""),
+ "url": result.get("url", ""),
+ "date": result.get("date", ""),
+ }
+ # Add snippet if available (newer API feature)
+ if result.get("snippet"):
+ citation["snippet"] = result.get("snippet")
+ citations.append(citation)
+
+ # Also check for legacy citations field (backward compatibility)
+ legacy_citations = (
+ response.get("citations") or
+ choice.get("citations") or
+ choice.get("message", {}).get("citations") or
+ []
+ )
+
+ for url in legacy_citations:
+ if isinstance(url, str):
+ # Legacy format was just URLs
+ citations.append({
+ "type": "source",
+ "url": url,
+ "title": "",
+ "date": ""
+ })
+ elif isinstance(url, dict):
+ citations.append({
+ "type": "source",
+ "url": url.get("url", ""),
+ "title": url.get("title", ""),
+ "date": url.get("date", "")
+ })
+
+ return citations
+
+ def _extract_citations_from_text(self, text: str) -> List[Dict[str, str]]:
+ """Extract potential citations from the response text as fallback."""
+ import re
+ citations = []
+
+ # Look for DOI patterns first (most reliable)
+ # Matches: doi:10.xxx, DOI: 10.xxx, https://doi.org/10.xxx
+ doi_pattern = r'(?:doi[:\s]*|https?://(?:dx\.)?doi\.org/)(10\.[0-9]{4,}/[^\s\)\]\,\[\<\>]+)'
+ doi_matches = re.findall(doi_pattern, text, re.IGNORECASE)
+ seen_dois = set()
+
+ for doi in doi_matches:
+ # Clean up DOI - remove trailing punctuation and brackets
+ doi_clean = doi.strip().rstrip('.,;:)]')
+ if doi_clean and doi_clean not in seen_dois:
+ seen_dois.add(doi_clean)
+ citations.append({
+ "type": "doi",
+ "doi": doi_clean,
+ "url": f"https://doi.org/{doi_clean}"
+ })
+
+ # Look for URLs that might be sources
+ url_pattern = r'https?://[^\s\)\]\,\<\>\"\']+(?:arxiv\.org|pubmed|ncbi\.nlm\.nih\.gov|nature\.com|science\.org|wiley\.com|springer\.com|ieee\.org|acm\.org)[^\s\)\]\,\<\>\"\']*'
+ url_matches = re.findall(url_pattern, text, re.IGNORECASE)
+ seen_urls = set()
+
+ for url in url_matches:
+ url_clean = url.rstrip('.')
+ if url_clean not in seen_urls:
+ seen_urls.add(url_clean)
+ citations.append({
+ "type": "url",
+ "url": url_clean
+ })
+
+ return citations
+
+ def batch_lookup(self, queries: List[str], delay: float = 1.0) -> List[Dict[str, Any]]:
+ """Perform multiple research lookups with optional delay between requests."""
+ results = []
+
+ for i, query in enumerate(queries):
+ if i > 0 and delay > 0:
+ time.sleep(delay) # Rate limiting
+
+ result = self.lookup(query)
+ results.append(result)
+
+ # Print progress
+ print(f"[Research] Completed query {i+1}/{len(queries)}: {query[:50]}...")
+
+ return results
+
+ def get_model_info(self) -> Dict[str, Any]:
+ """Get information about available models from OpenRouter."""
+ try:
+ response = requests.get(
+ f"{self.base_url}/models",
+ headers=self.headers,
+ timeout=30
+ )
+ response.raise_for_status()
+ return response.json()
+ except Exception as e:
+ return {"error": str(e)}
+
+
+def main():
+ """Command-line interface for testing the research lookup tool."""
+ import argparse
+
+ parser = argparse.ArgumentParser(description="Research Information Lookup Tool")
+ parser.add_argument("query", nargs="?", help="Research query to look up")
+ parser.add_argument("--model-info", action="store_true", help="Show available models")
+ parser.add_argument("--batch", nargs="+", help="Run multiple queries")
+ parser.add_argument("--force-model", choices=["pro", "reasoning"],
+ help="Force specific model: 'pro' for fast lookup, 'reasoning' for deep analysis")
+
+ args = parser.parse_args()
+
+ # Check for API key
+ if not os.getenv("OPENROUTER_API_KEY"):
+ print("Error: OPENROUTER_API_KEY environment variable not set")
+ print("Please set it in your .env file or export it:")
+ print(" export OPENROUTER_API_KEY='your_openrouter_api_key'")
+ return 1
+
+ try:
+ research = ResearchLookup(force_model=args.force_model)
+
+ if args.model_info:
+ print("Available models from OpenRouter:")
+ models = research.get_model_info()
+ if "data" in models:
+ for model in models["data"]:
+ if "perplexity" in model["id"].lower():
+ print(f" - {model['id']}: {model.get('name', 'N/A')}")
+ return 0
+
+ if not args.query and not args.batch:
+ print("Error: No query provided. Use --model-info to see available models.")
+ return 1
+
+ if args.batch:
+ print(f"Running batch research for {len(args.batch)} queries...")
+ results = research.batch_lookup(args.batch)
+ else:
+ print(f"Researching: {args.query}")
+ results = [research.lookup(args.query)]
+
+ # Display results
+ for i, result in enumerate(results):
+ if result["success"]:
+ print(f"\n{'='*80}")
+ print(f"Query {i+1}: {result['query']}")
+ print(f"Timestamp: {result['timestamp']}")
+ print(f"Model: {result['model']}")
+ print(f"{'='*80}")
+ print(result["response"])
+
+ # Display API-provided sources first (most reliable)
+ sources = result.get("sources", [])
+ if sources:
+ print(f"\n📚 Sources ({len(sources)}):")
+ for j, source in enumerate(sources):
+ title = source.get("title", "Untitled")
+ url = source.get("url", "")
+ date = source.get("date", "")
+ date_str = f" ({date})" if date else ""
+ print(f" [{j+1}] {title}{date_str}")
+ if url:
+ print(f" {url}")
+
+ # Display additional text-extracted citations
+ citations = result.get("citations", [])
+ text_citations = [c for c in citations if c.get("type") in ("doi", "url")]
+ if text_citations:
+ print(f"\n🔗 Additional References ({len(text_citations)}):")
+ for j, citation in enumerate(text_citations):
+ if citation.get("type") == "doi":
+ print(f" [{j+1}] DOI: {citation.get('doi', '')} - {citation.get('url', '')}")
+ elif citation.get("type") == "url":
+ print(f" [{j+1}] {citation.get('url', '')}")
+
+ if result.get("usage"):
+ print(f"\nUsage: {result['usage']}")
+ else:
+ print(f"\nError in query {i+1}: {result['error']}")
+
+ return 0
+
+ except Exception as e:
+ print(f"Error: {str(e)}")
+ return 1
+
+
+if __name__ == "__main__":
+ exit(main())
diff --git a/scientific-skills/scientific-schematics/QUICK_REFERENCE.md b/scientific-skills/scientific-schematics/QUICK_REFERENCE.md
new file mode 100644
index 0000000..985892a
--- /dev/null
+++ b/scientific-skills/scientific-schematics/QUICK_REFERENCE.md
@@ -0,0 +1,207 @@
+# Scientific Schematics - Quick Reference
+
+**How it works:** Describe your diagram → Nano Banana Pro generates it automatically
+
+## Setup (One-Time)
+
+```bash
+# Get API key from https://openrouter.ai/keys
+export OPENROUTER_API_KEY='sk-or-v1-your_key_here'
+
+# Add to shell profile for persistence
+echo 'export OPENROUTER_API_KEY="sk-or-v1-your_key"' >> ~/.bashrc # or ~/.zshrc
+```
+
+## Basic Usage
+
+```bash
+# Describe your diagram, Nano Banana Pro creates it
+python scripts/generate_schematic.py "your diagram description" -o output.png
+
+# That's it! Automatic:
+# - Iterative refinement (3 rounds)
+# - Quality review and improvement
+# - Publication-ready output
+```
+
+## Common Examples
+
+### CONSORT Flowchart
+```bash
+python scripts/generate_schematic.py \
+ "CONSORT flow: screened n=500, excluded n=150, randomized n=350" \
+ -o consort.png
+```
+
+### Neural Network
+```bash
+python scripts/generate_schematic.py \
+ "Transformer architecture with encoder and decoder stacks" \
+ -o transformer.png
+```
+
+### Biological Pathway
+```bash
+python scripts/generate_schematic.py \
+ "MAPK pathway: EGFR → RAS → RAF → MEK → ERK" \
+ -o mapk.png
+```
+
+### Circuit Diagram
+```bash
+python scripts/generate_schematic.py \
+ "Op-amp circuit with 1kΩ resistor and 10µF capacitor" \
+ -o circuit.png
+```
+
+## Command Options
+
+| Option | Description | Example |
+|--------|-------------|---------|
+| `-o, --output` | Output file path | `-o figures/diagram.png` |
+| `--iterations N` | Number of refinements (1-2) | `--iterations 2` |
+| `-v, --verbose` | Show detailed output | `-v` |
+| `--api-key KEY` | Provide API key | `--api-key sk-or-v1-...` |
+
+## Prompt Tips
+
+### ✓ Good Prompts (Specific)
+- "CONSORT flowchart with screening (n=500), exclusion (n=150), randomization (n=350)"
+- "Transformer architecture: encoder on left with 6 layers, decoder on right, cross-attention connections"
+- "MAPK signaling: receptor → RAS → RAF → MEK → ERK → nucleus, label each phosphorylation"
+
+### ✗ Avoid (Too Vague)
+- "Make a flowchart"
+- "Neural network"
+- "Pathway diagram"
+
+## Output Files
+
+For input `diagram.png`, you get:
+- `diagram_v1.png` - First iteration
+- `diagram_v2.png` - Second iteration
+- `diagram_v3.png` - Final iteration
+- `diagram.png` - Copy of final
+- `diagram_review_log.json` - Quality scores and critiques
+
+## Review Log
+
+```json
+{
+ "iterations": [
+ {
+ "iteration": 1,
+ "score": 7.0,
+ "critique": "Good start. Font too small..."
+ },
+ {
+ "iteration": 2,
+ "score": 8.5,
+ "critique": "Much improved. Minor spacing issues..."
+ },
+ {
+ "iteration": 3,
+ "score": 9.5,
+ "critique": "Excellent. Publication ready."
+ }
+ ],
+ "final_score": 9.5
+}
+```
+
+## Python API
+
+```python
+from scripts.generate_schematic_ai import ScientificSchematicGenerator
+
+# Initialize
+gen = ScientificSchematicGenerator(api_key="your_key")
+
+# Generate
+results = gen.generate_iterative(
+ user_prompt="diagram description",
+ output_path="output.png",
+ iterations=2
+)
+
+# Check quality
+print(f"Score: {results['final_score']}/10")
+```
+
+## Troubleshooting
+
+### API Key Not Found
+```bash
+# Check if set
+echo $OPENROUTER_API_KEY
+
+# Set it
+export OPENROUTER_API_KEY='your_key'
+```
+
+### Import Error
+```bash
+# Install requests
+pip install requests
+```
+
+### Low Quality Score
+- Make prompt more specific
+- Include layout details (left-to-right, top-to-bottom)
+- Specify label requirements
+- Increase iterations: `--iterations 2`
+
+## Testing
+
+```bash
+# Verify installation
+python test_ai_generation.py
+
+# Should show: "6/6 tests passed"
+```
+
+## Cost
+
+Typical cost per diagram (max 2 iterations):
+- Simple (1 iteration): $0.05-0.15
+- Complex (2 iterations): $0.10-0.30
+
+## How Nano Banana Pro Works
+
+**Simply describe your diagram in natural language:**
+- ✓ No coding required
+- ✓ No templates needed
+- ✓ No manual drawing
+- ✓ Automatic quality review
+- ✓ Publication-ready output
+- ✓ Works for any diagram type
+
+**Just describe what you want, and it's generated automatically.**
+
+## Getting Help
+
+```bash
+# Show help
+python scripts/generate_schematic.py --help
+
+# Verbose mode for debugging
+python scripts/generate_schematic.py "diagram" -o out.png -v
+```
+
+## Quick Start Checklist
+
+- [ ] Set `OPENROUTER_API_KEY` environment variable
+- [ ] Run `python test_ai_generation.py` (should pass 6/6)
+- [ ] Try: `python scripts/generate_schematic.py "test diagram" -o test.png`
+- [ ] Review output files (test_v1.png, v2, v3, review_log.json)
+- [ ] Read SKILL.md for detailed documentation
+- [ ] Check README.md for examples
+
+## Resources
+
+- Full documentation: `SKILL.md`
+- Detailed guide: `README.md`
+- Implementation details: `IMPLEMENTATION_SUMMARY.md`
+- Example script: `example_usage.sh`
+- Get API key: https://openrouter.ai/keys
+
diff --git a/scientific-skills/scientific-schematics/README.md b/scientific-skills/scientific-schematics/README.md
new file mode 100644
index 0000000..655727b
--- /dev/null
+++ b/scientific-skills/scientific-schematics/README.md
@@ -0,0 +1,327 @@
+# Scientific Schematics - Nano Banana Pro
+
+**Generate any scientific diagram by describing it in natural language.**
+
+Nano Banana Pro creates publication-quality diagrams automatically - no coding, no templates, no manual drawing required.
+
+## Quick Start
+
+### Generate Any Diagram
+
+```bash
+# Set your OpenRouter API key
+export OPENROUTER_API_KEY='your_api_key_here'
+
+# Generate any scientific diagram
+python scripts/generate_schematic.py "CONSORT participant flow diagram" -o figures/consort.png
+
+# Neural network architecture
+python scripts/generate_schematic.py "Transformer encoder-decoder architecture" -o figures/transformer.png
+
+# Biological pathway
+python scripts/generate_schematic.py "MAPK signaling pathway" -o figures/pathway.png
+```
+
+### What You Get
+
+- **Up to two iterations** (v1, v2) with progressive refinement
+- **Automatic quality review** after each iteration
+- **Detailed review log** with scores and critiques (JSON format)
+- **Publication-ready images** following scientific standards
+
+## Features
+
+### Iterative Refinement Process
+
+1. **Generation 1**: Create initial diagram from your description
+2. **Review 1**: AI evaluates clarity, labels, accuracy, accessibility
+3. **Generation 2**: Improve based on critique
+4. **Review 2**: Second evaluation with specific feedback
+5. **Generation 3**: Final polished version
+
+### Automatic Quality Standards
+
+All diagrams automatically follow:
+- Clean white/light background
+- High contrast for readability
+- Clear labels (minimum 10pt font)
+- Professional typography
+- Colorblind-friendly colors
+- Proper spacing between elements
+- Scale bars, legends, axes where appropriate
+
+## Installation
+
+### For AI Generation
+
+```bash
+# Get OpenRouter API key
+# Visit: https://openrouter.ai/keys
+
+# Set environment variable
+export OPENROUTER_API_KEY='sk-or-v1-...'
+
+# Or add to .env file
+echo "OPENROUTER_API_KEY=sk-or-v1-..." >> .env
+
+# Install Python dependencies (if not already installed)
+pip install requests
+```
+
+## Usage Examples
+
+### Example 1: CONSORT Flowchart
+
+```bash
+python scripts/generate_schematic.py \
+ "CONSORT participant flow diagram for RCT. \
+ Assessed for eligibility (n=500). \
+ Excluded (n=150): age<18 (n=80), declined (n=50), other (n=20). \
+ Randomized (n=350) into Treatment (n=175) and Control (n=175). \
+ Lost to follow-up: 15 and 10 respectively. \
+ Final analysis: 160 and 165." \
+ -o figures/consort.png
+```
+
+**Output:**
+- `figures/consort_v1.png` - Initial generation
+- `figures/consort_v2.png` - After first review
+- `figures/consort_v3.png` - Final version
+- `figures/consort.png` - Copy of final version
+- `figures/consort_review_log.json` - Detailed review log
+
+### Example 2: Neural Network Architecture
+
+```bash
+python scripts/generate_schematic.py \
+ "Transformer architecture with encoder on left (input embedding, \
+ positional encoding, multi-head attention, feed-forward) and \
+ decoder on right (masked attention, cross-attention, feed-forward). \
+ Show cross-attention connection from encoder to decoder." \
+ -o figures/transformer.png \
+ --iterations 2
+```
+
+### Example 3: Biological Pathway
+
+```bash
+python scripts/generate_schematic.py \
+ "MAPK signaling pathway: EGFR receptor → RAS → RAF → MEK → ERK → nucleus. \
+ Label each step with phosphorylation. Use different colors for each kinase." \
+ -o figures/mapk.png
+```
+
+### Example 4: System Architecture
+
+```bash
+python scripts/generate_schematic.py \
+ "IoT system block diagram: sensors (bottom) → microcontroller → \
+ WiFi module and display (middle) → cloud server → mobile app (top). \
+ Label all connections with protocols." \
+ -o figures/iot_system.png
+```
+
+## Command-Line Options
+
+```bash
+python scripts/generate_schematic.py [OPTIONS] "description" -o output.png
+
+Options:
+ --iterations N Number of AI refinement iterations (default: 2, max: 2)
+ --api-key KEY OpenRouter API key (or use env var)
+ -v, --verbose Verbose output
+ -h, --help Show help message
+```
+
+## Python API
+
+```python
+from scripts.generate_schematic_ai import ScientificSchematicGenerator
+
+# Initialize
+generator = ScientificSchematicGenerator(
+ api_key="your_key",
+ verbose=True
+)
+
+# Generate with iterative refinement
+results = generator.generate_iterative(
+ user_prompt="CONSORT flowchart",
+ output_path="figures/consort.png",
+ iterations=2
+)
+
+# Access results
+print(f"Final score: {results['final_score']}/10")
+print(f"Final image: {results['final_image']}")
+
+# Review iterations
+for iteration in results['iterations']:
+ print(f"Iteration {iteration['iteration']}: {iteration['score']}/10")
+ print(f"Critique: {iteration['critique']}")
+```
+
+## Prompt Engineering Tips
+
+### Be Specific About Layout
+✓ "Flowchart with vertical flow, top to bottom"
+✓ "Architecture diagram with encoder on left, decoder on right"
+✗ "Make a diagram" (too vague)
+
+### Include Quantitative Details
+✓ "Neural network: input (784), hidden (128), output (10)"
+✓ "Flowchart: n=500 screened, n=150 excluded, n=350 randomized"
+✗ "Some numbers" (not specific)
+
+### Specify Visual Style
+✓ "Minimalist block diagram with clean lines"
+✓ "Detailed biological pathway with protein structures"
+✓ "Technical schematic with engineering notation"
+
+### Request Specific Labels
+✓ "Label all arrows with activation/inhibition"
+✓ "Include layer dimensions in each box"
+✓ "Show time progression with timestamps"
+
+### Mention Color Requirements
+✓ "Use colorblind-friendly colors"
+✓ "Grayscale-compatible design"
+✓ "Color-code by function: blue=input, green=processing, red=output"
+
+## Review Log Format
+
+Each generation produces a JSON review log:
+
+```json
+{
+ "user_prompt": "CONSORT participant flow diagram...",
+ "iterations": [
+ {
+ "iteration": 1,
+ "image_path": "figures/consort_v1.png",
+ "prompt": "Full generation prompt...",
+ "critique": "Score: 7/10. Issues: font too small...",
+ "score": 7.0,
+ "success": true
+ },
+ {
+ "iteration": 2,
+ "image_path": "figures/consort_v2.png",
+ "score": 8.5,
+ "critique": "Much improved. Remaining issues..."
+ },
+ {
+ "iteration": 3,
+ "image_path": "figures/consort_v3.png",
+ "score": 9.5,
+ "critique": "Excellent. Publication ready."
+ }
+ ],
+ "final_image": "figures/consort_v3.png",
+ "final_score": 9.5,
+ "success": true
+}
+```
+
+## Why Use Nano Banana Pro
+
+**Simply describe what you want - Nano Banana Pro creates it:**
+
+- ✓ **Fast**: Results in minutes
+- ✓ **Easy**: Natural language descriptions (no coding)
+- ✓ **Quality**: Automatic review and refinement
+- ✓ **Universal**: Works for all diagram types
+- ✓ **Publication-ready**: High-quality output immediately
+
+**Just describe your diagram, and it's generated automatically.**
+
+## Troubleshooting
+
+### API Key Issues
+
+```bash
+# Check if key is set
+echo $OPENROUTER_API_KEY
+
+# Set temporarily
+export OPENROUTER_API_KEY='your_key'
+
+# Set permanently (add to ~/.bashrc or ~/.zshrc)
+echo 'export OPENROUTER_API_KEY="your_key"' >> ~/.bashrc
+```
+
+### Import Errors
+
+```bash
+# Install requests library
+pip install requests
+
+# Or use the package manager
+pip install -r requirements.txt
+```
+
+### Generation Fails
+
+```bash
+# Use verbose mode to see detailed errors
+python scripts/generate_schematic.py "diagram" -o out.png -v
+
+# Check API status
+curl https://openrouter.ai/api/v1/models
+```
+
+### Low Quality Scores
+
+If iterations consistently score below 7/10:
+1. Make your prompt more specific
+2. Include more details about layout and labels
+3. Specify visual requirements explicitly
+4. Increase iterations: `--iterations 2`
+
+## Testing
+
+Run verification tests:
+
+```bash
+python test_ai_generation.py
+```
+
+This tests:
+- File structure
+- Module imports
+- Class initialization
+- Error handling
+- Prompt engineering
+- Wrapper script
+
+## Cost Considerations
+
+OpenRouter pricing for models used:
+- **Nano Banana Pro**: ~$2/M input tokens, ~$12/M output tokens
+
+Typical costs per diagram:
+- Simple diagram (1 iteration): ~$0.05-0.15
+- Complex diagram (2 iterations): ~$0.10-0.30
+
+## Examples Gallery
+
+See the full SKILL.md for extensive examples including:
+- CONSORT flowcharts
+- Neural network architectures (Transformers, CNNs, RNNs)
+- Biological pathways
+- Circuit diagrams
+- System architectures
+- Block diagrams
+
+## Support
+
+For issues or questions:
+1. Check SKILL.md for detailed documentation
+2. Run test_ai_generation.py to verify setup
+3. Use verbose mode (-v) to see detailed errors
+4. Review the review_log.json for quality feedback
+
+## License
+
+Part of the scientific-writer package. See main repository for license information.
+
diff --git a/scientific-skills/scientific-schematics/SKILL.md b/scientific-skills/scientific-schematics/SKILL.md
new file mode 100644
index 0000000..00c184b
--- /dev/null
+++ b/scientific-skills/scientific-schematics/SKILL.md
@@ -0,0 +1,615 @@
+---
+name: scientific-schematics
+description: "Create publication-quality scientific diagrams using Nano Banana Pro AI with smart iterative refinement. Uses Gemini 3 Pro for quality review. Only regenerates if quality is below threshold for your document type. Specialized in neural network architectures, system diagrams, flowcharts, biological pathways, and complex scientific visualizations."
+allowed-tools: [Read, Write, Edit, Bash]
+---
+
+# Scientific Schematics and Diagrams
+
+## Overview
+
+Scientific schematics and diagrams transform complex concepts into clear visual representations for publication. **This skill uses Nano Banana Pro AI for diagram generation with Gemini 3 Pro quality review.**
+
+**How it works:**
+- Describe your diagram in natural language
+- Nano Banana Pro generates publication-quality images automatically
+- **Gemini 3 Pro reviews quality** against document-type thresholds
+- **Smart iteration**: Only regenerates if quality is below threshold
+- Publication-ready output in minutes
+- No coding, templates, or manual drawing required
+
+**Quality Thresholds by Document Type:**
+| Document Type | Threshold | Description |
+|---------------|-----------|-------------|
+| journal | 8.5/10 | Nature, Science, peer-reviewed journals |
+| conference | 8.0/10 | Conference papers |
+| thesis | 8.0/10 | Dissertations, theses |
+| grant | 8.0/10 | Grant proposals |
+| preprint | 7.5/10 | arXiv, bioRxiv, etc. |
+| report | 7.5/10 | Technical reports |
+| poster | 7.0/10 | Academic posters |
+| presentation | 6.5/10 | Slides, talks |
+| default | 7.5/10 | General purpose |
+
+**Simply describe what you want, and Nano Banana Pro creates it.** All diagrams are stored in the figures/ subfolder and referenced in papers/posters.
+
+## Quick Start: Generate Any Diagram
+
+Create any scientific diagram by simply describing it. Nano Banana Pro handles everything automatically with **smart iteration**:
+
+```bash
+# Generate for journal paper (highest quality threshold: 8.5/10)
+python scripts/generate_schematic.py "CONSORT participant flow diagram with 500 screened, 150 excluded, 350 randomized" -o figures/consort.png --doc-type journal
+
+# Generate for presentation (lower threshold: 6.5/10 - faster)
+python scripts/generate_schematic.py "Transformer encoder-decoder architecture showing multi-head attention" -o figures/transformer.png --doc-type presentation
+
+# Generate for poster (moderate threshold: 7.0/10)
+python scripts/generate_schematic.py "MAPK signaling pathway from EGFR to gene transcription" -o figures/mapk_pathway.png --doc-type poster
+
+# Custom max iterations (max 2)
+python scripts/generate_schematic.py "Complex circuit diagram with op-amp, resistors, and capacitors" -o figures/circuit.png --iterations 2 --doc-type journal
+```
+
+**What happens behind the scenes:**
+1. **Generation 1**: Nano Banana Pro creates initial image following scientific diagram best practices
+2. **Review 1**: **Gemini 3 Pro** evaluates quality against document-type threshold
+3. **Decision**: If quality >= threshold → **DONE** (no more iterations needed!)
+4. **If below threshold**: Improved prompt based on critique, regenerate
+5. **Repeat**: Until quality meets threshold OR max iterations reached
+
+**Smart Iteration Benefits:**
+- ✅ Saves API calls if first generation is good enough
+- ✅ Higher quality standards for journal papers
+- ✅ Faster turnaround for presentations/posters
+- ✅ Appropriate quality for each use case
+
+**Output**: Versioned images plus a detailed review log with quality scores, critiques, and early-stop information.
+
+### Configuration
+
+Set your OpenRouter API key:
+```bash
+export OPENROUTER_API_KEY='your_api_key_here'
+```
+
+Get an API key at: https://openrouter.ai/keys
+
+### AI Generation Best Practices
+
+**Effective Prompts for Scientific Diagrams:**
+
+✓ **Good prompts** (specific, detailed):
+- "CONSORT flowchart showing participant flow from screening (n=500) through randomization to final analysis"
+- "Transformer neural network architecture with encoder stack on left, decoder stack on right, showing multi-head attention and cross-attention connections"
+- "Biological signaling cascade: EGFR receptor → RAS → RAF → MEK → ERK → nucleus, with phosphorylation steps labeled"
+- "Block diagram of IoT system: sensors → microcontroller → WiFi module → cloud server → mobile app"
+
+✗ **Avoid vague prompts**:
+- "Make a flowchart" (too generic)
+- "Neural network" (which type? what components?)
+- "Pathway diagram" (which pathway? what molecules?)
+
+**Key elements to include:**
+- **Type**: Flowchart, architecture diagram, pathway, circuit, etc.
+- **Components**: Specific elements to include
+- **Flow/Direction**: How elements connect (left-to-right, top-to-bottom)
+- **Labels**: Key annotations or text to include
+- **Style**: Any specific visual requirements
+
+**Scientific Quality Guidelines** (automatically applied):
+- Clean white/light background
+- High contrast for readability
+- Clear, readable labels (minimum 10pt)
+- Professional typography (sans-serif fonts)
+- Colorblind-friendly colors (Okabe-Ito palette)
+- Proper spacing to prevent crowding
+- Scale bars, legends, axes where appropriate
+
+## When to Use This Skill
+
+This skill should be used when:
+- Creating neural network architecture diagrams (Transformers, CNNs, RNNs, etc.)
+- Illustrating system architectures and data flow diagrams
+- Drawing methodology flowcharts for study design (CONSORT, PRISMA)
+- Visualizing algorithm workflows and processing pipelines
+- Creating circuit diagrams and electrical schematics
+- Depicting biological pathways and molecular interactions
+- Generating network topologies and hierarchical structures
+- Illustrating conceptual frameworks and theoretical models
+- Designing block diagrams for technical papers
+
+## How to Use This Skill
+
+**Simply describe your diagram in natural language.** Nano Banana Pro generates it automatically:
+
+```bash
+python scripts/generate_schematic.py "your diagram description" -o output.png
+```
+
+**That's it!** The AI handles:
+- ✓ Layout and composition
+- ✓ Labels and annotations
+- ✓ Colors and styling
+- ✓ Quality review and refinement
+- ✓ Publication-ready output
+
+**Works for all diagram types:**
+- Flowcharts (CONSORT, PRISMA, etc.)
+- Neural network architectures
+- Biological pathways
+- Circuit diagrams
+- System architectures
+- Block diagrams
+- Any scientific visualization
+
+**No coding, no templates, no manual drawing required.**
+
+---
+
+# AI Generation Mode (Nano Banana Pro + Gemini 3 Pro Review)
+
+## Smart Iterative Refinement Workflow
+
+The AI generation system uses **smart iteration** - it only regenerates if quality is below the threshold for your document type:
+
+### How Smart Iteration Works
+
+```
+┌─────────────────────────────────────────────────────┐
+│ 1. Generate image with Nano Banana Pro │
+│ ↓ │
+│ 2. Review quality with Gemini 3 Pro │
+│ ↓ │
+│ 3. Score >= threshold? │
+│ YES → DONE! (early stop) │
+│ NO → Improve prompt, go to step 1 │
+│ ↓ │
+│ 4. Repeat until quality met OR max iterations │
+└─────────────────────────────────────────────────────┘
+```
+
+### Iteration 1: Initial Generation
+**Prompt Construction:**
+```
+Scientific diagram guidelines + User request
+```
+
+**Output:** `diagram_v1.png`
+
+### Quality Review by Gemini 3 Pro
+
+Gemini 3 Pro evaluates the diagram on:
+1. **Scientific Accuracy** (0-2 points) - Correct concepts, notation, relationships
+2. **Clarity and Readability** (0-2 points) - Easy to understand, clear hierarchy
+3. **Label Quality** (0-2 points) - Complete, readable, consistent labels
+4. **Layout and Composition** (0-2 points) - Logical flow, balanced, no overlaps
+5. **Professional Appearance** (0-2 points) - Publication-ready quality
+
+**Example Review Output:**
+```
+SCORE: 8.0
+
+STRENGTHS:
+- Clear flow from top to bottom
+- All phases properly labeled
+- Professional typography
+
+ISSUES:
+- Participant counts slightly small
+- Minor overlap on exclusion box
+
+VERDICT: ACCEPTABLE (for poster, threshold 7.0)
+```
+
+### Decision Point: Continue or Stop?
+
+| If Score... | Action |
+|-------------|--------|
+| >= threshold | **STOP** - Quality is good enough for this document type |
+| < threshold | Continue to next iteration with improved prompt |
+
+**Example:**
+- For a **poster** (threshold 7.0): Score of 7.5 → **DONE after 1 iteration!**
+- For a **journal** (threshold 8.5): Score of 7.5 → Continue improving
+
+### Subsequent Iterations (Only If Needed)
+
+If quality is below threshold, the system:
+1. Extracts specific issues from Gemini 3 Pro's review
+2. Enhances the prompt with improvement instructions
+3. Regenerates with Nano Banana Pro
+4. Reviews again with Gemini 3 Pro
+5. Repeats until threshold met or max iterations reached
+
+### Review Log
+All iterations are saved with a JSON review log that includes early-stop information:
+```json
+{
+ "user_prompt": "CONSORT participant flow diagram...",
+ "doc_type": "poster",
+ "quality_threshold": 7.0,
+ "iterations": [
+ {
+ "iteration": 1,
+ "image_path": "figures/consort_v1.png",
+ "score": 7.5,
+ "needs_improvement": false,
+ "critique": "SCORE: 7.5\nSTRENGTHS:..."
+ }
+ ],
+ "final_score": 7.5,
+ "early_stop": true,
+ "early_stop_reason": "Quality score 7.5 meets threshold 7.0 for poster"
+}
+```
+
+**Note:** With smart iteration, you may see only 1 iteration instead of the full 2 if quality is achieved early!
+
+## Advanced AI Generation Usage
+
+### Python API
+
+```python
+from scripts.generate_schematic_ai import ScientificSchematicGenerator
+
+# Initialize generator
+generator = ScientificSchematicGenerator(
+ api_key="your_openrouter_key",
+ verbose=True
+)
+
+# Generate with iterative refinement (max 2 iterations)
+results = generator.generate_iterative(
+ user_prompt="Transformer architecture diagram",
+ output_path="figures/transformer.png",
+ iterations=2
+)
+
+# Access results
+print(f"Final score: {results['final_score']}/10")
+print(f"Final image: {results['final_image']}")
+
+# Review individual iterations
+for iteration in results['iterations']:
+ print(f"Iteration {iteration['iteration']}: {iteration['score']}/10")
+ print(f"Critique: {iteration['critique']}")
+```
+
+### Command-Line Options
+
+```bash
+# Basic usage (default threshold 7.5/10)
+python scripts/generate_schematic.py "diagram description" -o output.png
+
+# Specify document type for appropriate quality threshold
+python scripts/generate_schematic.py "diagram" -o out.png --doc-type journal # 8.5/10
+python scripts/generate_schematic.py "diagram" -o out.png --doc-type conference # 8.0/10
+python scripts/generate_schematic.py "diagram" -o out.png --doc-type poster # 7.0/10
+python scripts/generate_schematic.py "diagram" -o out.png --doc-type presentation # 6.5/10
+
+# Custom max iterations (1-2)
+python scripts/generate_schematic.py "complex diagram" -o diagram.png --iterations 2
+
+# Verbose output (see all API calls and reviews)
+python scripts/generate_schematic.py "flowchart" -o flow.png -v
+
+# Provide API key via flag
+python scripts/generate_schematic.py "diagram" -o out.png --api-key "sk-or-v1-..."
+
+# Combine options
+python scripts/generate_schematic.py "neural network" -o nn.png --doc-type journal --iterations 2 -v
+```
+
+### Prompt Engineering Tips
+
+**1. Be Specific About Layout:**
+```
+✓ "Flowchart with vertical flow, top to bottom"
+✓ "Architecture diagram with encoder on left, decoder on right"
+✓ "Circular pathway diagram with clockwise flow"
+```
+
+**2. Include Quantitative Details:**
+```
+✓ "Neural network with input layer (784 nodes), hidden layer (128 nodes), output (10 nodes)"
+✓ "Flowchart showing n=500 screened, n=150 excluded, n=350 randomized"
+✓ "Circuit with 1kΩ resistor, 10µF capacitor, 5V source"
+```
+
+**3. Specify Visual Style:**
+```
+✓ "Minimalist block diagram with clean lines"
+✓ "Detailed biological pathway with protein structures"
+✓ "Technical schematic with engineering notation"
+```
+
+**4. Request Specific Labels:**
+```
+✓ "Label all arrows with activation/inhibition"
+✓ "Include layer dimensions in each box"
+✓ "Show time progression with timestamps"
+```
+
+**5. Mention Color Requirements:**
+```
+✓ "Use colorblind-friendly colors"
+✓ "Grayscale-compatible design"
+✓ "Color-code by function: blue for input, green for processing, red for output"
+```
+
+## AI Generation Examples
+
+### Example 1: CONSORT Flowchart
+```bash
+python scripts/generate_schematic.py \
+ "CONSORT participant flow diagram for randomized controlled trial. \
+ Start with 'Assessed for eligibility (n=500)' at top. \
+ Show 'Excluded (n=150)' with reasons: age<18 (n=80), declined (n=50), other (n=20). \
+ Then 'Randomized (n=350)' splits into two arms: \
+ 'Treatment group (n=175)' and 'Control group (n=175)'. \
+ Each arm shows 'Lost to follow-up' (n=15 and n=10). \
+ End with 'Analyzed' (n=160 and n=165). \
+ Use blue boxes for process steps, orange for exclusion, green for final analysis." \
+ -o figures/consort.png
+```
+
+### Example 2: Neural Network Architecture
+```bash
+python scripts/generate_schematic.py \
+ "Transformer encoder-decoder architecture diagram. \
+ Left side: Encoder stack with input embedding, positional encoding, \
+ multi-head self-attention, add & norm, feed-forward, add & norm. \
+ Right side: Decoder stack with output embedding, positional encoding, \
+ masked self-attention, add & norm, cross-attention (receiving from encoder), \
+ add & norm, feed-forward, add & norm, linear & softmax. \
+ Show cross-attention connection from encoder to decoder with dashed line. \
+ Use light blue for encoder, light red for decoder. \
+ Label all components clearly." \
+ -o figures/transformer.png --iterations 2
+```
+
+### Example 3: Biological Pathway
+```bash
+python scripts/generate_schematic.py \
+ "MAPK signaling pathway diagram. \
+ Start with EGFR receptor at cell membrane (top). \
+ Arrow down to RAS (with GTP label). \
+ Arrow to RAF kinase. \
+ Arrow to MEK kinase. \
+ Arrow to ERK kinase. \
+ Final arrow to nucleus showing gene transcription. \
+ Label each arrow with 'phosphorylation' or 'activation'. \
+ Use rounded rectangles for proteins, different colors for each. \
+ Include membrane boundary line at top." \
+ -o figures/mapk_pathway.png
+```
+
+### Example 4: System Architecture
+```bash
+python scripts/generate_schematic.py \
+ "IoT system architecture block diagram. \
+ Bottom layer: Sensors (temperature, humidity, motion) in green boxes. \
+ Middle layer: Microcontroller (ESP32) in blue box. \
+ Connections to WiFi module (orange box) and Display (purple box). \
+ Top layer: Cloud server (gray box) connected to mobile app (light blue box). \
+ Show data flow arrows between all components. \
+ Label connections with protocols: I2C, UART, WiFi, HTTPS." \
+ -o figures/iot_architecture.png
+```
+
+---
+
+## Command-Line Usage
+
+The main entry point for generating scientific schematics:
+
+```bash
+# Basic usage
+python scripts/generate_schematic.py "diagram description" -o output.png
+
+# Custom iterations (max 2)
+python scripts/generate_schematic.py "complex diagram" -o diagram.png --iterations 2
+
+# Verbose mode
+python scripts/generate_schematic.py "diagram" -o out.png -v
+```
+
+**Note:** The Nano Banana Pro AI generation system includes automatic quality review in its iterative refinement process. Each iteration is evaluated for scientific accuracy, clarity, and accessibility.
+
+## Best Practices Summary
+
+### Design Principles
+
+1. **Clarity over complexity** - Simplify, remove unnecessary elements
+2. **Consistent styling** - Use templates and style files
+3. **Colorblind accessibility** - Use Okabe-Ito palette, redundant encoding
+4. **Appropriate typography** - Sans-serif fonts, minimum 7-8 pt
+5. **Vector format** - Always use PDF/SVG for publication
+
+### Technical Requirements
+
+1. **Resolution** - Vector preferred, or 300+ DPI for raster
+2. **File format** - PDF for LaTeX, SVG for web, PNG as fallback
+3. **Color space** - RGB for digital, CMYK for print (convert if needed)
+4. **Line weights** - Minimum 0.5 pt, typical 1-2 pt
+5. **Text size** - 7-8 pt minimum at final size
+
+### Integration Guidelines
+
+1. **Include in LaTeX** - Use `\includegraphics{}` for generated images
+2. **Caption thoroughly** - Describe all elements and abbreviations
+3. **Reference in text** - Explain diagram in narrative flow
+4. **Maintain consistency** - Same style across all figures in paper
+5. **Version control** - Keep prompts and generated images in repository
+
+## Troubleshooting Common Issues
+
+### AI Generation Issues
+
+**Problem**: Overlapping text or elements
+- **Solution**: AI generation automatically handles spacing
+- **Solution**: Increase iterations: `--iterations 2` for better refinement
+
+**Problem**: Elements not connecting properly
+- **Solution**: Make your prompt more specific about connections and layout
+- **Solution**: Increase iterations for better refinement
+
+### Image Quality Issues
+
+**Problem**: Export quality poor
+- **Solution**: AI generation produces high-quality images automatically
+- **Solution**: Increase iterations for better results: `--iterations 2`
+
+**Problem**: Elements overlap after generation
+- **Solution**: AI generation automatically handles spacing
+- **Solution**: Increase iterations: `--iterations 2` for better refinement
+- **Solution**: Make your prompt more specific about layout and spacing requirements
+
+### Quality Check Issues
+
+**Problem**: False positive overlap detection
+- **Solution**: Adjust threshold: `detect_overlaps(image_path, threshold=0.98)`
+- **Solution**: Manually review flagged regions in visual report
+
+**Problem**: Generated image quality is low
+- **Solution**: AI generation produces high-quality images by default
+- **Solution**: Increase iterations for better results: `--iterations 2`
+
+**Problem**: Colorblind simulation shows poor contrast
+- **Solution**: Switch to Okabe-Ito palette explicitly in code
+- **Solution**: Add redundant encoding (shapes, patterns, line styles)
+- **Solution**: Increase color saturation and lightness differences
+
+**Problem**: High-severity overlaps detected
+- **Solution**: Review overlap_report.json for exact positions
+- **Solution**: Increase spacing in those specific regions
+- **Solution**: Re-run with adjusted parameters and verify again
+
+**Problem**: Visual report generation fails
+- **Solution**: Check Pillow and matplotlib installations
+- **Solution**: Ensure image file is readable: `Image.open(path).verify()`
+- **Solution**: Check sufficient disk space for report generation
+
+### Accessibility Problems
+
+**Problem**: Colors indistinguishable in grayscale
+- **Solution**: Run accessibility checker: `verify_accessibility(image_path)`
+- **Solution**: Add patterns, shapes, or line styles for redundancy
+- **Solution**: Increase contrast between adjacent elements
+
+**Problem**: Text too small when printed
+- **Solution**: Run resolution validator: `validate_resolution(image_path)`
+- **Solution**: Design at final size, use minimum 7-8 pt fonts
+- **Solution**: Check physical dimensions in resolution report
+
+**Problem**: Accessibility checks consistently fail
+- **Solution**: Review accessibility_report.json for specific failures
+- **Solution**: Increase color contrast by at least 20%
+- **Solution**: Test with actual grayscale conversion before finalizing
+
+## Resources and References
+
+### Detailed References
+
+Load these files for comprehensive information on specific topics:
+
+- **`references/diagram_types.md`** - Catalog of scientific diagram types with examples
+- **`references/best_practices.md`** - Publication standards and accessibility guidelines
+
+### External Resources
+
+**Python Libraries**
+- Schemdraw Documentation: https://schemdraw.readthedocs.io/
+- NetworkX Documentation: https://networkx.org/documentation/
+- Matplotlib Documentation: https://matplotlib.org/
+
+**Publication Standards**
+- Nature Figure Guidelines: https://www.nature.com/nature/for-authors/final-submission
+- Science Figure Guidelines: https://www.science.org/content/page/instructions-preparing-initial-manuscript
+- CONSORT Diagram: http://www.consort-statement.org/consort-statement/flow-diagram
+
+## Integration with Other Skills
+
+This skill works synergistically with:
+
+- **Scientific Writing** - Diagrams follow figure best practices
+- **Scientific Visualization** - Shares color palettes and styling
+- **LaTeX Posters** - Generate diagrams for poster presentations
+- **Research Grants** - Methodology diagrams for proposals
+- **Peer Review** - Evaluate diagram clarity and accessibility
+
+## Quick Reference Checklist
+
+Before submitting diagrams, verify:
+
+### Visual Quality
+- [ ] High-quality image format (PNG from AI generation)
+- [ ] No overlapping elements (AI handles automatically)
+- [ ] Adequate spacing between all components (AI optimizes)
+- [ ] Clean, professional alignment
+- [ ] All arrows connect properly to intended targets
+
+### Accessibility
+- [ ] Colorblind-safe palette (Okabe-Ito) used
+- [ ] Works in grayscale (tested with accessibility checker)
+- [ ] Sufficient contrast between elements (verified)
+- [ ] Redundant encoding where appropriate (shapes + colors)
+- [ ] Colorblind simulation passes all checks
+
+### Typography and Readability
+- [ ] Text minimum 7-8 pt at final size
+- [ ] All elements labeled clearly and completely
+- [ ] Consistent font family and sizing
+- [ ] No text overlaps or cutoffs
+- [ ] Units included where applicable
+
+### Publication Standards
+- [ ] Consistent styling with other figures in manuscript
+- [ ] Comprehensive caption written with all abbreviations defined
+- [ ] Referenced appropriately in manuscript text
+- [ ] Meets journal-specific dimension requirements
+- [ ] Exported in required format for journal (PDF/EPS/TIFF)
+
+### Quality Verification (Required)
+- [ ] Ran `run_quality_checks()` and achieved PASS status
+- [ ] Reviewed overlap detection report (zero high-severity overlaps)
+- [ ] Passed accessibility verification (grayscale and colorblind)
+- [ ] Resolution validated at target DPI (300+ for print)
+- [ ] Visual quality report generated and reviewed
+- [ ] All quality reports saved with figure files
+
+### Documentation and Version Control
+- [ ] Source files (.tex, .py) saved for future revision
+- [ ] Quality reports archived in `quality_reports/` directory
+- [ ] Configuration parameters documented (colors, spacing, sizes)
+- [ ] Git commit includes source, output, and quality reports
+- [ ] README or comments explain how to regenerate figure
+
+### Final Integration Check
+- [ ] Figure displays correctly in compiled manuscript
+- [ ] Cross-references work (`\ref{}` points to correct figure)
+- [ ] Figure number matches text citations
+- [ ] Caption appears on correct page relative to figure
+- [ ] No compilation warnings or errors related to figure
+
+## Environment Setup
+
+```bash
+# Required
+export OPENROUTER_API_KEY='your_api_key_here'
+
+# Get key at: https://openrouter.ai/keys
+```
+
+## Getting Started
+
+**Simplest possible usage:**
+```bash
+python scripts/generate_schematic.py "your diagram description" -o output.png
+```
+
+---
+
+Use this skill to create clear, accessible, publication-quality diagrams that effectively communicate complex scientific concepts. The AI-powered workflow with iterative refinement ensures diagrams meet professional standards.
+
diff --git a/scientific-skills/scientific-schematics/example_usage.sh b/scientific-skills/scientific-schematics/example_usage.sh
new file mode 100755
index 0000000..2e638d9
--- /dev/null
+++ b/scientific-skills/scientific-schematics/example_usage.sh
@@ -0,0 +1,89 @@
+#!/bin/bash
+# Example usage of AI-powered scientific schematic generation
+#
+# Prerequisites:
+# 1. Set OPENROUTER_API_KEY environment variable
+# 2. Ensure Python 3.10+ is installed
+# 3. Install requests: pip install requests
+
+set -e
+
+echo "=========================================="
+echo "Scientific Schematics - AI Generation"
+echo "Example Usage Demonstrations"
+echo "=========================================="
+echo ""
+
+# Check for API key
+if [ -z "$OPENROUTER_API_KEY" ]; then
+ echo "❌ Error: OPENROUTER_API_KEY environment variable not set"
+ echo ""
+ echo "Get an API key at: https://openrouter.ai/keys"
+ echo "Then set it with: export OPENROUTER_API_KEY='your_key'"
+ exit 1
+fi
+
+echo "✓ OPENROUTER_API_KEY is set"
+echo ""
+
+# Create output directory
+mkdir -p figures
+echo "✓ Created figures/ directory"
+echo ""
+
+# Example 1: Simple flowchart
+echo "Example 1: CONSORT Flowchart"
+echo "----------------------------"
+python scripts/generate_schematic.py \
+ "CONSORT participant flow diagram. Assessed for eligibility (n=500). Excluded (n=150) with reasons: age<18 (n=80), declined (n=50), other (n=20). Randomized (n=350) into Treatment (n=175) and Control (n=175). Lost to follow-up: 15 and 10. Final analysis: 160 and 165." \
+ -o figures/consort_example.png \
+ --iterations 2
+
+echo ""
+echo "✓ Generated: figures/consort_example.png"
+echo " - Also created: consort_example_v1.png, v2.png, v3.png"
+echo " - Review log: consort_example_review_log.json"
+echo ""
+
+# Example 2: Neural network (shorter for demo)
+echo "Example 2: Simple Neural Network"
+echo "--------------------------------"
+python scripts/generate_schematic.py \
+ "Simple feedforward neural network diagram. Input layer with 4 nodes, hidden layer with 6 nodes, output layer with 2 nodes. Show all connections. Label layers clearly." \
+ -o figures/neural_net_example.png \
+ --iterations 2
+
+echo ""
+echo "✓ Generated: figures/neural_net_example.png"
+echo ""
+
+# Example 3: Biological pathway (minimal)
+echo "Example 3: Signaling Pathway"
+echo "---------------------------"
+python scripts/generate_schematic.py \
+ "Simple signaling pathway: Receptor → Kinase A → Kinase B → Transcription Factor → Gene. Show arrows with 'activation' labels. Use different colors for each component." \
+ -o figures/pathway_example.png \
+ --iterations 2
+
+echo ""
+echo "✓ Generated: figures/pathway_example.png"
+echo ""
+
+echo "=========================================="
+echo "All examples completed successfully!"
+echo "=========================================="
+echo ""
+echo "Generated files in figures/:"
+ls -lh figures/*example*.png 2>/dev/null || echo " (Files will appear after running with valid API key)"
+echo ""
+echo "Review the review_log.json files to see:"
+echo " - Quality scores for each iteration"
+echo " - Detailed critiques and suggestions"
+echo " - Improvement progression"
+echo ""
+echo "Next steps:"
+echo " 1. View the generated images"
+echo " 2. Review the quality scores in *_review_log.json"
+echo " 3. Try your own prompts!"
+echo ""
+
diff --git a/scientific-skills/scientific-schematics/references/best_practices.md b/scientific-skills/scientific-schematics/references/best_practices.md
new file mode 100644
index 0000000..4e0f0c9
--- /dev/null
+++ b/scientific-skills/scientific-schematics/references/best_practices.md
@@ -0,0 +1,559 @@
+# Best Practices for Scientific Diagrams
+
+## Overview
+
+This guide provides publication standards, accessibility guidelines, and best practices for creating high-quality scientific diagrams that meet journal requirements and communicate effectively to all readers.
+
+## Publication Standards
+
+### 1. File Format Requirements
+
+**Vector Formats (Preferred)**
+- **PDF**: Universal acceptance, preserves quality, works with LaTeX
+ - Use for: Line drawings, flowcharts, block diagrams, circuit diagrams
+ - Advantages: Scalable, small file size, embeds fonts
+ - Standard for LaTeX workflows
+
+- **EPS (Encapsulated PostScript)**: Legacy format, still accepted
+ - Use for: Older publishing systems
+ - Compatible with most journals
+ - Can be converted from PDF
+
+- **SVG (Scalable Vector Graphics)**: Web-friendly, increasingly accepted
+ - Use for: Online publications, interactive figures
+ - Can be edited in vector graphics software
+ - Not all journals accept SVG
+
+**Raster Formats (When Necessary)**
+- **TIFF**: Professional standard for raster graphics
+ - Use for: Microscopy images, photographs combined with diagrams
+ - Minimum 300 DPI at final print size
+ - Lossless compression (LZW)
+
+- **PNG**: Web-friendly, lossless compression
+ - Use for: Online supplementary materials, presentations
+ - Minimum 300 DPI for print
+ - Supports transparency
+
+**Never Use**
+- **JPEG**: Lossy compression creates artifacts in diagrams
+- **GIF**: Limited colors, inappropriate for scientific figures
+- **BMP**: Uncompressed, unnecessarily large files
+
+### 2. Resolution Requirements
+
+**Vector Graphics**
+- Infinite resolution (scalable)
+- **Recommended**: Always use vector when possible
+
+**Raster Graphics (when vector not possible)**
+- **Publication quality**: 300-600 DPI
+- **Line art**: 600-1200 DPI
+- **Web/screen**: 150 DPI acceptable
+- **Never**: Below 300 DPI for print
+
+**Calculating DPI**
+```
+DPI = pixels / (inches at final size)
+
+Example:
+Image size: 2400 × 1800 pixels
+Final print size: 8 × 6 inches
+DPI = 2400 / 8 = 300 ✓ (acceptable)
+```
+
+### 3. Size and Dimensions
+
+**Journal-Specific Column Widths**
+- **Nature**: Single column 89 mm (3.5 in), Double 183 mm (7.2 in)
+- **Science**: Single column 55 mm (2.17 in), Double 120 mm (4.72 in)
+- **Cell**: Single column 85 mm (3.35 in), Double 178 mm (7 in)
+- **PLOS**: Single column 83 mm (3.27 in), Double 173 mm (6.83 in)
+- **IEEE**: Single column 3.5 in, Double 7.16 in
+
+**Best Practices**
+- Design at final print size (avoid scaling)
+- Use journal templates when available
+- Allow margins for cropping
+- Test appearance at final size before submission
+
+### 4. Typography Standards
+
+**Font Selection**
+- **Recommended**: Arial, Helvetica, Calibri (sans-serif)
+- **Acceptable**: Times New Roman (serif) for mathematics-heavy
+- **Avoid**: Decorative fonts, script fonts, system fonts that may not embed
+
+**Font Sizes (at final print size)**
+- **Minimum**: 6-7 pt (journal dependent)
+- **Axis labels**: 8-9 pt
+- **Figure labels**: 10-12 pt
+- **Panel labels (A, B, C)**: 10-14 pt, bold
+- **Main text**: Should match manuscript body text
+
+**Text Clarity**
+- Use sentence case: "Time (seconds)" not "TIME (SECONDS)"
+- Include units in parentheses: "Temperature (°C)"
+- Spell out abbreviations in figure caption
+- Avoid rotated text when possible (exception: y-axis labels)
+
+### 5. Line Weights and Strokes
+
+**Recommended Line Widths**
+- **Diagram outlines**: 0.5-1.0 pt
+- **Connection lines/arrows**: 1.0-2.0 pt
+- **Emphasis elements**: 2.0-3.0 pt
+- **Minimum visible**: 0.25 pt at final size
+
+**Consistency**
+- Use same line weight for similar elements
+- Vary line weight to show hierarchy
+- Avoid hairline rules (too thin to print reliably)
+
+## Accessibility and Colorblindness
+
+### 1. Colorblind-Safe Palettes
+
+**Okabe-Ito Palette (Recommended)**
+Most distinguishable by all types of colorblindness:
+
+```latex
+% RGB values
+Orange: #E69F00 (230, 159, 0)
+Sky Blue: #56B4E9 ( 86, 180, 233)
+Green: #009E73 ( 0, 158, 115)
+Yellow: #F0E442 (240, 228, 66)
+Blue: #0072B2 ( 0, 114, 178)
+Vermillion: #D55E00 (213, 94, 0)
+Purple: #CC79A7 (204, 121, 167)
+Black: #000000 ( 0, 0, 0)
+```
+
+**Alternative: ColorBrewer Palettes**
+- **Qualitative**: Set2, Paired, Dark2
+- **Sequential**: Blues, Greens, Oranges (avoid Reds/Greens together)
+- **Diverging**: RdBu (Red-Blue), PuOr (Purple-Orange)
+
+**Colors to Avoid Together**
+- Red-Green combinations (8% of males cannot distinguish)
+- Blue-Purple combinations
+- Yellow-Light green combinations
+
+### 2. Redundant Encoding
+
+Don't rely on color alone. Use multiple visual channels:
+
+**Shape + Color**
+```
+Circle + Blue = Condition A
+Square + Orange = Condition B
+Triangle + Green = Condition C
+```
+
+**Line Style + Color**
+```
+Solid + Blue = Treatment 1
+Dashed + Orange = Treatment 2
+Dotted + Green = Control
+```
+
+**Pattern Fill + Color**
+```
+Solid fill + Blue = Group A
+Diagonal stripes + Orange = Group B
+Cross-hatch + Green = Group C
+```
+
+### 3. Grayscale Compatibility
+
+**Test Requirement**: All diagrams must be interpretable in grayscale
+
+**Strategies**
+- Use different shades (light, medium, dark)
+- Add patterns or textures to filled areas
+- Vary line styles (solid, dashed, dotted)
+- Use labels directly on elements
+- Include text annotations
+
+**Grayscale Test**
+```bash
+# Convert to grayscale to test
+convert diagram.pdf -colorspace gray diagram_gray.pdf
+```
+
+### 4. Contrast Requirements
+
+**Minimum Contrast Ratios (WCAG Guidelines)**
+- **Normal text**: 4.5:1
+- **Large text** (≥18pt): 3:1
+- **Graphical elements**: 3:1
+
+**High Contrast Practices**
+- Dark text on light background (or vice versa)
+- Avoid low-contrast color pairs (yellow on white, light gray on white)
+- Use black or dark gray for critical text
+- White text on dark backgrounds needs larger font size
+
+### 5. Alternative Text and Descriptions
+
+**Figure Captions Must Include**
+- Description of diagram type
+- All abbreviations spelled out
+- Explanation of symbols and colors
+- Sample sizes (n) where relevant
+- Statistical annotations explained
+- Reference to detailed methods if applicable
+
+**Example Caption**
+"Participant flow diagram following CONSORT guidelines. Rectangles represent study stages, with participant numbers (n) shown. Exclusion criteria are listed beside each screening stage. Final analysis included n=350 participants across two groups."
+
+## Design Principles
+
+### 1. Simplicity and Clarity
+
+**Occam's Razor for Diagrams**
+- Remove every element that doesn't add information
+- Simplify complex relationships
+- Break complex diagrams into multiple panels
+- Use consistent layouts across related figures
+
+**Visual Hierarchy**
+- Most important elements: Largest, darkest, central
+- Supporting elements: Smaller, lighter, peripheral
+- Annotations: Minimal, clear labels only
+
+### 2. Consistency
+
+**Within a Figure**
+- Same shape/color represents same concept
+- Consistent arrow styles for same relationships
+- Uniform spacing and alignment
+- Matching font sizes for similar elements
+
+**Across Figures in a Paper**
+- Reuse color schemes
+- Maintain consistent node styles
+- Use same notation system
+- Apply same layout principles
+
+### 3. Professional Appearance
+
+**Alignment**
+- Use grids for node placement
+- Align nodes horizontally or vertically
+- Evenly space elements
+- Center labels within shapes
+
+**White Space**
+- Don't overcrowd diagrams
+- Leave breathing room around elements
+- Use white space to group related items
+- Margins around entire diagram
+
+**Polish**
+- No jagged lines or misaligned elements
+- Smooth curves and precise angles
+- Clean connection points
+- No overlapping text
+
+## Common Pitfalls and Solutions
+
+### Pitfall 1: Overcomplicated Diagrams
+
+**Problem**: Too much information in one diagram
+**Solution**:
+- Split into multiple panels (A, B, C)
+- Create overview + detailed diagrams
+- Move details to supplementary figures
+- Use hierarchical presentation
+
+### Pitfall 2: Inconsistent Styling
+
+**Problem**: Different styles for same elements across figures
+**Solution**:
+- Create and use style templates
+- Use the same color palette throughout
+- Document your style choices
+
+### Pitfall 3: Poor Label Placement
+
+**Problem**: Labels overlap elements or are hard to read
+**Solution**:
+- Place labels outside shapes when possible
+- Use leader lines for distant labels
+- Rotate text only when necessary
+- Ensure adequate contrast with background
+
+### Pitfall 4: Tiny Text
+
+**Problem**: Text too small to read at final print size
+**Solution**:
+- Design at final size from the start
+- Test print at final size
+- Minimum 7-8 pt font
+- Simplify labels if space is limited
+
+### Pitfall 5: Ambiguous Arrows
+
+**Problem**: Unclear what arrows represent or where they point
+**Solution**:
+- Use different arrow styles for different meanings
+- Add labels to arrows
+- Include legend for arrow types
+- Use anchor points for precise connections
+
+### Pitfall 6: Color Overuse
+
+**Problem**: Too many colors, confusing or inaccessible
+**Solution**:
+- Limit to 3-5 colors maximum
+- Use color purposefully (categories, emphasis)
+- Stick to colorblind-safe palette
+- Provide redundant encoding
+
+## Quality Control Checklist
+
+### Before Submission
+
+**Technical Requirements**
+- [ ] Correct file format (PDF/EPS preferred for diagrams)
+- [ ] Sufficient resolution (vector or 300+ DPI)
+- [ ] Appropriate size (matches journal column width)
+- [ ] Fonts embedded in PDF
+- [ ] No compression artifacts
+
+**Accessibility**
+- [ ] Colorblind-safe palette used
+- [ ] Works in grayscale (tested)
+- [ ] Text minimum 7-8 pt at final size
+- [ ] High contrast between elements
+- [ ] Redundant encoding (not color alone)
+
+**Design Quality**
+- [ ] Elements aligned properly
+- [ ] Consistent spacing and layout
+- [ ] No overlapping text or elements
+- [ ] Clear visual hierarchy
+- [ ] Professional appearance
+
+**Content**
+- [ ] All elements labeled
+- [ ] Abbreviations defined
+- [ ] Units included where relevant
+- [ ] Legend provided if needed
+- [ ] Caption comprehensive
+
+**Consistency**
+- [ ] Matches other figures in style
+- [ ] Same notation as text
+- [ ] Consistent with journal guidelines
+- [ ] Cross-references work
+
+## Journal-Specific Guidelines
+
+### Nature
+
+**Figure Requirements**
+- **Size**: 89 mm (single) or 183 mm (double column)
+- **Format**: PDF, EPS, or high-res TIFF
+- **Fonts**: Sans-serif preferred
+- **File size**: <10 MB per file
+- **Resolution**: 300 DPI minimum for raster
+
+**Style Notes**
+- Panel labels: lowercase bold (a, b, c)
+- Simple, clean design
+- Minimal colors
+- Clear captions
+
+### Science
+
+**Figure Requirements**
+- **Size**: 55 mm (single) or 120 mm (double column)
+- **Format**: PDF, EPS, TIFF, or JPEG (high quality)
+- **Resolution**: 300 DPI for photos, 600 DPI for line art
+- **File size**: <10 MB
+- **Fonts**: 6-7 pt minimum
+
+**Style Notes**
+- Panel labels: capital bold (A, B, C)
+- High contrast
+- Readable at small size
+
+### Cell
+
+**Figure Requirements**
+- **Size**: 85 mm (single) or 178 mm (double column)
+- **Format**: PDF preferred, TIFF, EPS acceptable
+- **Resolution**: 300 DPI minimum
+- **Fonts**: 8-10 pt for labels
+- **Line weight**: 0.5 pt minimum
+
+**Style Notes**
+- Clean, professional
+- Color or grayscale
+- Panel labels capital (A, B, C)
+
+### IEEE
+
+**Figure Requirements**
+- **Size**: 3.5 in (single) or 7.16 in (double column)
+- **Format**: PDF, EPS (vector preferred)
+- **Resolution**: 600 DPI for line art, 300 DPI for halftone
+- **Fonts**: 8-10 pt minimum
+- **Color**: Grayscale in print, color in digital
+
+**Style Notes**
+- Follow IEEE Graphics Manual
+- Standard symbols for circuits
+- Technical precision
+- Clear axis labels
+
+## Software-Specific Export Settings
+
+### AI-Generated Images
+
+AI-generated diagrams are exported as PNG images and can be included in LaTeX documents using:
+
+```latex
+\includegraphics[width=\textwidth]{diagram.png}
+```
+
+### Python (Matplotlib) Export
+
+```python
+import matplotlib.pyplot as plt
+
+# Set publication quality
+plt.rcParams['font.family'] = 'sans-serif'
+plt.rcParams['font.sans-serif'] = ['Arial']
+plt.rcParams['font.size'] = 8
+plt.rcParams['pdf.fonttype'] = 42 # TrueType fonts in PDF
+
+# Save with proper DPI and cropping
+fig.savefig('diagram.pdf', dpi=300, bbox_inches='tight',
+ pad_inches=0.1, transparent=False)
+fig.savefig('diagram.png', dpi=300, bbox_inches='tight')
+```
+
+### Schemdraw Export
+
+```python
+import schemdraw
+
+d = schemdraw.Drawing()
+# ... build circuit ...
+
+# Export
+d.save('circuit.svg') # Vector
+d.save('circuit.pdf') # Vector
+d.save('circuit.png', dpi=300) # Raster
+```
+
+### Inkscape Command Line
+
+```bash
+# PDF to high-res PNG
+inkscape diagram.pdf --export-png=diagram.png --export-dpi=300
+
+# SVG to PDF
+inkscape diagram.svg --export-pdf=diagram.pdf
+```
+
+## Version Control Best Practices
+
+**Keep Source Files**
+- Save original .tex, .py, or .svg files
+- Use descriptive filenames with versions
+- Document color palette and style choices
+- Include README with regeneration instructions
+
+**Directory Structure**
+```
+figures/
+├── source/ # Editable source files
+│ ├── diagram1.tex
+│ ├── circuit.py
+│ └── pathway.svg
+├── generated/ # Auto-generated outputs
+│ ├── diagram1.pdf
+│ ├── circuit.pdf
+│ └── pathway.pdf
+└── final/ # Final submission versions
+ ├── figure1.pdf
+ └── figure2.pdf
+```
+
+**Git Tracking**
+- Track source files (.tex, .py)
+- Consider .gitignore for generated PDFs (large files)
+- Use releases/tags for submission versions
+- Document generation process in README
+
+## Testing and Validation
+
+### Pre-Submission Tests
+
+**Visual Tests**
+1. **Print test**: Print at final size, check readability
+2. **Grayscale test**: Convert to grayscale, verify interpretability
+3. **Zoom test**: View at 400% and 25% to check scalability
+4. **Screen test**: View on different devices (phone, tablet, desktop)
+
+**Technical Tests**
+1. **Font embedding**: Check PDF properties
+2. **Resolution check**: Verify DPI meets requirements
+3. **File size**: Ensure under journal limits
+4. **Format compliance**: Verify accepted format
+
+**Accessibility Tests**
+1. **Colorblind simulation**: Use tools like Color Oracle
+2. **Contrast checker**: WCAG contrast ratio tools
+3. **Screen reader**: Test alt text (for web figures)
+
+### Tools for Testing
+
+**Colorblind Simulation**
+- Color Oracle (free, cross-platform)
+- Coblis (Color Blindness Simulator)
+- Photoshop/GIMP colorblind preview modes
+
+**PDF Inspection**
+```bash
+# Check PDF properties
+pdfinfo diagram.pdf
+
+# Check fonts
+pdffonts diagram.pdf
+
+# Check image resolution
+identify -verbose diagram.pdf
+```
+
+**Contrast Checking**
+- WebAIM Contrast Checker: https://webaim.org/resources/contrastchecker/
+- Colorable: https://colorable.jxnblk.com/
+
+## Summary: Golden Rules
+
+1. **Vector first**: Always use vector formats when possible
+2. **Design at final size**: Avoid scaling after creation
+3. **Colorblind-safe palette**: Use Okabe-Ito or similar
+4. **Test in grayscale**: Diagrams must work without color
+5. **Minimum 7-8 pt text**: At final print size
+6. **Consistent styling**: Across all figures in paper
+7. **Keep it simple**: Remove unnecessary elements
+8. **High contrast**: Ensure readability
+9. **Align elements**: Professional appearance matters
+10. **Comprehensive caption**: Explain everything
+
+## Further Resources
+
+- **Nature Figure Preparation**: https://www.nature.com/nature/for-authors/final-submission
+- **Science Figure Guidelines**: https://www.science.org/content/page/instructions-preparing-initial-manuscript
+- **WCAG Accessibility Standards**: https://www.w3.org/WAI/WCAG21/quickref/
+- **Color Universal Design (CUD)**: https://jfly.uni-koeln.de/color/
+- **ColorBrewer**: https://colorbrewer2.org/
+
+Following these best practices ensures your diagrams meet publication standards and effectively communicate to all readers, regardless of colorblindness or viewing conditions.
+
diff --git a/scientific-skills/scientific-schematics/scripts/generate_schematic.py b/scientific-skills/scientific-schematics/scripts/generate_schematic.py
new file mode 100644
index 0000000..e5146ce
--- /dev/null
+++ b/scientific-skills/scientific-schematics/scripts/generate_schematic.py
@@ -0,0 +1,139 @@
+#!/usr/bin/env python3
+"""
+Scientific schematic generation using Nano Banana Pro.
+
+Generate any scientific diagram by describing it in natural language.
+Nano Banana Pro handles everything automatically with smart iterative refinement.
+
+Smart iteration: Only regenerates if quality is below threshold for your document type.
+Quality review: Uses Gemini 3 Pro for professional scientific evaluation.
+
+Usage:
+ # Generate for journal paper (highest quality threshold)
+ python generate_schematic.py "CONSORT flowchart" -o flowchart.png --doc-type journal
+
+ # Generate for presentation (lower threshold, faster)
+ python generate_schematic.py "Transformer architecture" -o transformer.png --doc-type presentation
+
+ # Generate for poster
+ python generate_schematic.py "MAPK signaling pathway" -o pathway.png --doc-type poster
+"""
+
+import argparse
+import os
+import subprocess
+import sys
+from pathlib import Path
+
+
+def main():
+ """Command-line interface."""
+ parser = argparse.ArgumentParser(
+ description="Generate scientific schematics using AI with smart iterative refinement",
+ formatter_class=argparse.RawDescriptionHelpFormatter,
+ epilog="""
+How it works:
+ Simply describe your diagram in natural language
+ Nano Banana Pro generates it automatically with:
+ - Smart iteration (only regenerates if quality is below threshold)
+ - Quality review by Gemini 3 Pro
+ - Document-type aware quality thresholds
+ - Publication-ready output
+
+Document Types (quality thresholds):
+ journal 8.5/10 - Nature, Science, peer-reviewed journals
+ conference 8.0/10 - Conference papers
+ thesis 8.0/10 - Dissertations, theses
+ grant 8.0/10 - Grant proposals
+ preprint 7.5/10 - arXiv, bioRxiv, etc.
+ report 7.5/10 - Technical reports
+ poster 7.0/10 - Academic posters
+ presentation 6.5/10 - Slides, talks
+ default 7.5/10 - General purpose
+
+Examples:
+ # Generate for journal paper (strict quality)
+ python generate_schematic.py "CONSORT participant flow" -o flowchart.png --doc-type journal
+
+ # Generate for poster (moderate quality)
+ python generate_schematic.py "Transformer architecture" -o arch.png --doc-type poster
+
+ # Generate for slides (faster, lower threshold)
+ python generate_schematic.py "System diagram" -o system.png --doc-type presentation
+
+ # Custom max iterations
+ python generate_schematic.py "Complex pathway" -o pathway.png --iterations 2
+
+ # Verbose output
+ python generate_schematic.py "Circuit diagram" -o circuit.png -v
+
+Environment Variables:
+ OPENROUTER_API_KEY Required for AI generation
+ """
+ )
+
+ parser.add_argument("prompt",
+ help="Description of the diagram to generate")
+ parser.add_argument("-o", "--output", required=True,
+ help="Output file path")
+ parser.add_argument("--doc-type", default="default",
+ choices=["journal", "conference", "poster", "presentation",
+ "report", "grant", "thesis", "preprint", "default"],
+ help="Document type for quality threshold (default: default)")
+ parser.add_argument("--iterations", type=int, default=2,
+ help="Maximum refinement iterations (default: 2, max: 2)")
+ parser.add_argument("--api-key",
+ help="OpenRouter API key (or use OPENROUTER_API_KEY env var)")
+ parser.add_argument("-v", "--verbose", action="store_true",
+ help="Verbose output")
+
+ args = parser.parse_args()
+
+ # Check for API key
+ api_key = args.api_key or os.getenv("OPENROUTER_API_KEY")
+ if not api_key:
+ print("Error: OPENROUTER_API_KEY environment variable not set")
+ print("\nFor AI generation, you need an OpenRouter API key.")
+ print("Get one at: https://openrouter.ai/keys")
+ print("\nSet it with:")
+ print(" export OPENROUTER_API_KEY='your_api_key'")
+ print("\nOr use --api-key flag")
+ sys.exit(1)
+
+ # Find AI generation script
+ script_dir = Path(__file__).parent
+ ai_script = script_dir / "generate_schematic_ai.py"
+
+ if not ai_script.exists():
+ print(f"Error: AI generation script not found: {ai_script}")
+ sys.exit(1)
+
+ # Build command
+ cmd = [sys.executable, str(ai_script), args.prompt, "-o", args.output]
+
+ if args.doc_type != "default":
+ cmd.extend(["--doc-type", args.doc_type])
+
+ # Enforce max 2 iterations
+ iterations = min(args.iterations, 2)
+ if iterations != 2:
+ cmd.extend(["--iterations", str(iterations)])
+
+ if api_key:
+ cmd.extend(["--api-key", api_key])
+
+ if args.verbose:
+ cmd.append("-v")
+
+ # Execute
+ try:
+ result = subprocess.run(cmd, check=False)
+ sys.exit(result.returncode)
+ except Exception as e:
+ print(f"Error executing AI generation: {e}")
+ sys.exit(1)
+
+
+if __name__ == "__main__":
+ main()
+
diff --git a/scientific-skills/scientific-schematics/scripts/generate_schematic_ai.py b/scientific-skills/scientific-schematics/scripts/generate_schematic_ai.py
new file mode 100644
index 0000000..58b5cc5
--- /dev/null
+++ b/scientific-skills/scientific-schematics/scripts/generate_schematic_ai.py
@@ -0,0 +1,838 @@
+#!/usr/bin/env python3
+"""
+AI-powered scientific schematic generation using Nano Banana Pro.
+
+This script uses a smart iterative refinement approach:
+1. Generate initial image with Nano Banana Pro
+2. AI quality review using Gemini 3 Pro for scientific critique
+3. Only regenerate if quality is below threshold for document type
+4. Repeat until quality meets standards (max iterations)
+
+Requirements:
+ - OPENROUTER_API_KEY environment variable
+ - requests library
+
+Usage:
+ python generate_schematic_ai.py "Create a flowchart showing CONSORT participant flow" -o flowchart.png
+ python generate_schematic_ai.py "Neural network architecture diagram" -o architecture.png --iterations 2
+ python generate_schematic_ai.py "Simple block diagram" -o diagram.png --doc-type poster
+"""
+
+import argparse
+import base64
+import json
+import os
+import sys
+import time
+from pathlib import Path
+from typing import Optional, Dict, Any, List, Tuple
+
+try:
+ import requests
+except ImportError:
+ print("Error: requests library not found. Install with: pip install requests")
+ sys.exit(1)
+
+# Try to load .env file from multiple potential locations
+def _load_env_file():
+ """Load .env file from current directory, parent directories, or package directory.
+
+ Returns True if a .env file was found and loaded, False otherwise.
+ Note: This does NOT override existing environment variables.
+ """
+ try:
+ from dotenv import load_dotenv
+ except ImportError:
+ return False # python-dotenv not installed
+
+ # Try current working directory first
+ env_path = Path.cwd() / ".env"
+ if env_path.exists():
+ load_dotenv(dotenv_path=env_path, override=False)
+ return True
+
+ # Try parent directories (up to 5 levels)
+ cwd = Path.cwd()
+ for _ in range(5):
+ env_path = cwd / ".env"
+ if env_path.exists():
+ load_dotenv(dotenv_path=env_path, override=False)
+ return True
+ cwd = cwd.parent
+ if cwd == cwd.parent: # Reached root
+ break
+
+ # Try the package's parent directory (scientific-writer project root)
+ script_dir = Path(__file__).resolve().parent
+ for _ in range(5):
+ env_path = script_dir / ".env"
+ if env_path.exists():
+ load_dotenv(dotenv_path=env_path, override=False)
+ return True
+ script_dir = script_dir.parent
+ if script_dir == script_dir.parent:
+ break
+
+ return False
+
+
+class ScientificSchematicGenerator:
+ """Generate scientific schematics using AI with smart iterative refinement.
+
+ Uses Gemini 3 Pro for quality review to determine if regeneration is needed.
+ Multiple passes only occur if the generated schematic doesn't meet the
+ quality threshold for the target document type.
+ """
+
+ # Quality thresholds by document type (score out of 10)
+ # Higher thresholds for more formal publications
+ QUALITY_THRESHOLDS = {
+ "journal": 8.5, # Nature, Science, etc. - highest standards
+ "conference": 8.0, # Conference papers - high standards
+ "poster": 7.0, # Academic posters - good quality
+ "presentation": 6.5, # Slides/talks - clear but less formal
+ "report": 7.5, # Technical reports - professional
+ "grant": 8.0, # Grant proposals - must be compelling
+ "thesis": 8.0, # Dissertations - formal academic
+ "preprint": 7.5, # arXiv, etc. - good quality
+ "default": 7.5, # Default threshold
+ }
+
+ # Scientific diagram best practices prompt template
+ SCIENTIFIC_DIAGRAM_GUIDELINES = """
+Create a high-quality scientific diagram with these requirements:
+
+VISUAL QUALITY:
+- Clean white or light background (no textures or gradients)
+- High contrast for readability and printing
+- Professional, publication-ready appearance
+- Sharp, clear lines and text
+- Adequate spacing between elements to prevent crowding
+
+TYPOGRAPHY:
+- Clear, readable sans-serif fonts (Arial, Helvetica style)
+- Minimum 10pt font size for all labels
+- Consistent font sizes throughout
+- All text horizontal or clearly readable
+- No overlapping text
+
+SCIENTIFIC STANDARDS:
+- Accurate representation of concepts
+- Clear labels for all components
+- Include scale bars, legends, or axes where appropriate
+- Use standard scientific notation and symbols
+- Include units where applicable
+
+ACCESSIBILITY:
+- Colorblind-friendly color palette (use Okabe-Ito colors if using color)
+- High contrast between elements
+- Redundant encoding (shapes + colors, not just colors)
+- Works well in grayscale
+
+LAYOUT:
+- Logical flow (left-to-right or top-to-bottom)
+- Clear visual hierarchy
+- Balanced composition
+- Appropriate use of whitespace
+- No clutter or unnecessary decorative elements
+"""
+
+ def __init__(self, api_key: Optional[str] = None, verbose: bool = False):
+ """
+ Initialize the generator.
+
+ Args:
+ api_key: OpenRouter API key (or use OPENROUTER_API_KEY env var)
+ verbose: Print detailed progress information
+ """
+ # Priority: 1) explicit api_key param, 2) environment variable, 3) .env file
+ self.api_key = api_key or os.getenv("OPENROUTER_API_KEY")
+
+ # If not found in environment, try loading from .env file
+ if not self.api_key:
+ _load_env_file()
+ self.api_key = os.getenv("OPENROUTER_API_KEY")
+
+ if not self.api_key:
+ raise ValueError(
+ "OPENROUTER_API_KEY not found. Please either:\n"
+ " 1. Set the OPENROUTER_API_KEY environment variable\n"
+ " 2. Add OPENROUTER_API_KEY to your .env file\n"
+ " 3. Pass api_key parameter to the constructor\n"
+ "Get your API key from: https://openrouter.ai/keys"
+ )
+
+ self.verbose = verbose
+ self._last_error = None # Track last error for better reporting
+ self.base_url = "https://openrouter.ai/api/v1"
+ # Nano Banana Pro - Google's advanced image generation model
+ # https://openrouter.ai/google/gemini-3-pro-image-preview
+ self.image_model = "google/gemini-3-pro-image-preview"
+ # Gemini 3 Pro for quality review - excellent vision and reasoning
+ self.review_model = "google/gemini-3-pro"
+
+ def _log(self, message: str):
+ """Log message if verbose mode is enabled."""
+ if self.verbose:
+ print(f"[{time.strftime('%H:%M:%S')}] {message}")
+
+ def _make_request(self, model: str, messages: List[Dict[str, Any]],
+ modalities: Optional[List[str]] = None) -> Dict[str, Any]:
+ """
+ Make a request to OpenRouter API.
+
+ Args:
+ model: Model identifier
+ messages: List of message dictionaries
+ modalities: Optional list of modalities (e.g., ["image", "text"])
+
+ Returns:
+ API response as dictionary
+ """
+ headers = {
+ "Authorization": f"Bearer {self.api_key}",
+ "Content-Type": "application/json",
+ "HTTP-Referer": "https://github.com/scientific-writer",
+ "X-Title": "Scientific Schematic Generator"
+ }
+
+ payload = {
+ "model": model,
+ "messages": messages
+ }
+
+ if modalities:
+ payload["modalities"] = modalities
+
+ self._log(f"Making request to {model}...")
+
+ try:
+ response = requests.post(
+ f"{self.base_url}/chat/completions",
+ headers=headers,
+ json=payload,
+ timeout=120
+ )
+
+ # Try to get response body even on error
+ try:
+ response_json = response.json()
+ except json.JSONDecodeError:
+ response_json = {"raw_text": response.text[:500]}
+
+ # Check for HTTP errors but include response body in error message
+ if response.status_code != 200:
+ error_detail = response_json.get("error", response_json)
+ self._log(f"HTTP {response.status_code}: {error_detail}")
+ raise RuntimeError(f"API request failed (HTTP {response.status_code}): {error_detail}")
+
+ return response_json
+ except requests.exceptions.Timeout:
+ raise RuntimeError("API request timed out after 120 seconds")
+ except requests.exceptions.RequestException as e:
+ raise RuntimeError(f"API request failed: {str(e)}")
+
+ def _extract_image_from_response(self, response: Dict[str, Any]) -> Optional[bytes]:
+ """
+ Extract base64-encoded image from API response.
+
+ For Nano Banana Pro, images are returned in the 'images' field of the message,
+ not in the 'content' field.
+
+ Args:
+ response: API response dictionary
+
+ Returns:
+ Image bytes or None if not found
+ """
+ try:
+ choices = response.get("choices", [])
+ if not choices:
+ self._log("No choices in response")
+ return None
+
+ message = choices[0].get("message", {})
+
+ # IMPORTANT: Nano Banana Pro returns images in the 'images' field
+ images = message.get("images", [])
+ if images and len(images) > 0:
+ self._log(f"Found {len(images)} image(s) in 'images' field")
+
+ # Get first image
+ first_image = images[0]
+ if isinstance(first_image, dict):
+ # Extract image_url
+ if first_image.get("type") == "image_url":
+ url = first_image.get("image_url", {})
+ if isinstance(url, dict):
+ url = url.get("url", "")
+
+ if url and url.startswith("data:image"):
+ # Extract base64 data after comma
+ if "," in url:
+ base64_str = url.split(",", 1)[1]
+ # Clean whitespace
+ base64_str = base64_str.replace('\n', '').replace('\r', '').replace(' ', '')
+ self._log(f"Extracted base64 data (length: {len(base64_str)})")
+ return base64.b64decode(base64_str)
+
+ # Fallback: check content field (for other models or future changes)
+ content = message.get("content", "")
+
+ if self.verbose:
+ self._log(f"Content type: {type(content)}, length: {len(str(content))}")
+
+ # Handle string content
+ if isinstance(content, str) and "data:image" in content:
+ import re
+ match = re.search(r'data:image/[^;]+;base64,([A-Za-z0-9+/=\n\r]+)', content, re.DOTALL)
+ if match:
+ base64_str = match.group(1).replace('\n', '').replace('\r', '').replace(' ', '')
+ self._log(f"Found image in content field (length: {len(base64_str)})")
+ return base64.b64decode(base64_str)
+
+ # Handle list content
+ if isinstance(content, list):
+ for i, block in enumerate(content):
+ if isinstance(block, dict) and block.get("type") == "image_url":
+ url = block.get("image_url", {})
+ if isinstance(url, dict):
+ url = url.get("url", "")
+ if url and url.startswith("data:image") and "," in url:
+ base64_str = url.split(",", 1)[1].replace('\n', '').replace('\r', '').replace(' ', '')
+ self._log(f"Found image in content block {i}")
+ return base64.b64decode(base64_str)
+
+ self._log("No image data found in response")
+ return None
+
+ except Exception as e:
+ self._log(f"Error extracting image: {str(e)}")
+ import traceback
+ if self.verbose:
+ traceback.print_exc()
+ return None
+
+ def _image_to_base64(self, image_path: str) -> str:
+ """
+ Convert image file to base64 data URL.
+
+ Args:
+ image_path: Path to image file
+
+ Returns:
+ Base64 data URL string
+ """
+ with open(image_path, "rb") as f:
+ image_data = f.read()
+
+ # Determine image type from extension
+ ext = Path(image_path).suffix.lower()
+ mime_type = {
+ ".png": "image/png",
+ ".jpg": "image/jpeg",
+ ".jpeg": "image/jpeg",
+ ".gif": "image/gif",
+ ".webp": "image/webp"
+ }.get(ext, "image/png")
+
+ base64_data = base64.b64encode(image_data).decode("utf-8")
+ return f"data:{mime_type};base64,{base64_data}"
+
+ def generate_image(self, prompt: str) -> Optional[bytes]:
+ """
+ Generate an image using Nano Banana Pro.
+
+ Args:
+ prompt: Description of the diagram to generate
+
+ Returns:
+ Image bytes or None if generation failed
+ """
+ self._last_error = None # Reset error
+
+ messages = [
+ {
+ "role": "user",
+ "content": prompt
+ }
+ ]
+
+ try:
+ response = self._make_request(
+ model=self.image_model,
+ messages=messages,
+ modalities=["image", "text"]
+ )
+
+ # Debug: print response structure if verbose
+ if self.verbose:
+ self._log(f"Response keys: {response.keys()}")
+ if "error" in response:
+ self._log(f"API Error: {response['error']}")
+ if "choices" in response and response["choices"]:
+ msg = response["choices"][0].get("message", {})
+ self._log(f"Message keys: {msg.keys()}")
+ # Show content preview without printing huge base64 data
+ content = msg.get("content", "")
+ if isinstance(content, str):
+ preview = content[:200] + "..." if len(content) > 200 else content
+ self._log(f"Content preview: {preview}")
+ elif isinstance(content, list):
+ self._log(f"Content is list with {len(content)} items")
+ for i, item in enumerate(content[:3]):
+ if isinstance(item, dict):
+ self._log(f" Item {i}: type={item.get('type')}")
+
+ # Check for API errors in response
+ if "error" in response:
+ error_msg = response["error"]
+ if isinstance(error_msg, dict):
+ error_msg = error_msg.get("message", str(error_msg))
+ self._last_error = f"API Error: {error_msg}"
+ print(f"✗ {self._last_error}")
+ return None
+
+ image_data = self._extract_image_from_response(response)
+ if image_data:
+ self._log(f"✓ Generated image ({len(image_data)} bytes)")
+ else:
+ self._last_error = "No image data in API response - model may not support image generation"
+ self._log(f"✗ {self._last_error}")
+ # Additional debug info when image extraction fails
+ if self.verbose and "choices" in response:
+ msg = response["choices"][0].get("message", {})
+ self._log(f"Full message structure: {json.dumps({k: type(v).__name__ for k, v in msg.items()})}")
+
+ return image_data
+ except RuntimeError as e:
+ self._last_error = str(e)
+ self._log(f"✗ Generation failed: {self._last_error}")
+ return None
+ except Exception as e:
+ self._last_error = f"Unexpected error: {str(e)}"
+ self._log(f"✗ Generation failed: {self._last_error}")
+ import traceback
+ if self.verbose:
+ traceback.print_exc()
+ return None
+
+ def review_image(self, image_path: str, original_prompt: str,
+ iteration: int, doc_type: str = "default",
+ max_iterations: int = 2) -> Tuple[str, float, bool]:
+ """
+ Review generated image using Gemini 3 Pro for quality analysis.
+
+ Uses Gemini 3 Pro's superior vision and reasoning capabilities to
+ evaluate the schematic quality and determine if regeneration is needed.
+
+ Args:
+ image_path: Path to the generated image
+ original_prompt: Original user prompt
+ iteration: Current iteration number
+ doc_type: Document type (journal, poster, presentation, etc.)
+ max_iterations: Maximum iterations allowed
+
+ Returns:
+ Tuple of (critique text, quality score 0-10, needs_improvement bool)
+ """
+ # Use Gemini 3 Pro for review - excellent vision and analysis
+ image_data_url = self._image_to_base64(image_path)
+
+ # Get quality threshold for this document type
+ threshold = self.QUALITY_THRESHOLDS.get(doc_type.lower(),
+ self.QUALITY_THRESHOLDS["default"])
+
+ review_prompt = f"""You are an expert reviewer evaluating a scientific diagram for publication quality.
+
+ORIGINAL REQUEST: {original_prompt}
+
+DOCUMENT TYPE: {doc_type} (quality threshold: {threshold}/10)
+ITERATION: {iteration}/{max_iterations}
+
+Carefully evaluate this diagram on these criteria:
+
+1. **Scientific Accuracy** (0-2 points)
+ - Correct representation of concepts
+ - Proper notation and symbols
+ - Accurate relationships shown
+
+2. **Clarity and Readability** (0-2 points)
+ - Easy to understand at a glance
+ - Clear visual hierarchy
+ - No ambiguous elements
+
+3. **Label Quality** (0-2 points)
+ - All important elements labeled
+ - Labels are readable (appropriate font size)
+ - Consistent labeling style
+
+4. **Layout and Composition** (0-2 points)
+ - Logical flow (top-to-bottom or left-to-right)
+ - Balanced use of space
+ - No overlapping elements
+
+5. **Professional Appearance** (0-2 points)
+ - Publication-ready quality
+ - Clean, crisp lines and shapes
+ - Appropriate colors/contrast
+
+RESPOND IN THIS EXACT FORMAT:
+SCORE: [total score 0-10]
+
+STRENGTHS:
+- [strength 1]
+- [strength 2]
+
+ISSUES:
+- [issue 1 if any]
+- [issue 2 if any]
+
+VERDICT: [ACCEPTABLE or NEEDS_IMPROVEMENT]
+
+If score >= {threshold}, the diagram is ACCEPTABLE for {doc_type} publication.
+If score < {threshold}, mark as NEEDS_IMPROVEMENT with specific suggestions."""
+
+ messages = [
+ {
+ "role": "user",
+ "content": [
+ {
+ "type": "text",
+ "text": review_prompt
+ },
+ {
+ "type": "image_url",
+ "image_url": {
+ "url": image_data_url
+ }
+ }
+ ]
+ }
+ ]
+
+ try:
+ # Use Gemini 3 Pro for high-quality review
+ response = self._make_request(
+ model=self.review_model,
+ messages=messages
+ )
+
+ # Extract text response
+ choices = response.get("choices", [])
+ if not choices:
+ return "Image generated successfully", 8.0
+
+ message = choices[0].get("message", {})
+ content = message.get("content", "")
+
+ # Check reasoning field (Nano Banana Pro puts analysis here)
+ reasoning = message.get("reasoning", "")
+ if reasoning and not content:
+ content = reasoning
+
+ if isinstance(content, list):
+ # Extract text from content blocks
+ text_parts = []
+ for block in content:
+ if isinstance(block, dict) and block.get("type") == "text":
+ text_parts.append(block.get("text", ""))
+ content = "\n".join(text_parts)
+
+ # Try to extract score
+ score = 7.5 # Default score if extraction fails
+ import re
+
+ # Look for SCORE: X or SCORE: X/10 format
+ score_match = re.search(r'SCORE:\s*(\d+(?:\.\d+)?)', content, re.IGNORECASE)
+ if score_match:
+ score = float(score_match.group(1))
+ else:
+ # Fallback: look for any score pattern
+ score_match = re.search(r'(?:score|rating|quality)[:\s]+(\d+(?:\.\d+)?)\s*(?:/\s*10)?', content, re.IGNORECASE)
+ if score_match:
+ score = float(score_match.group(1))
+
+ # Determine if improvement is needed based on verdict or score
+ needs_improvement = False
+ if "NEEDS_IMPROVEMENT" in content.upper():
+ needs_improvement = True
+ elif score < threshold:
+ needs_improvement = True
+
+ self._log(f"✓ Review complete (Score: {score}/10, Threshold: {threshold}/10)")
+ self._log(f" Verdict: {'Needs improvement' if needs_improvement else 'Acceptable'}")
+
+ return (content if content else "Image generated successfully",
+ score,
+ needs_improvement)
+ except Exception as e:
+ self._log(f"Review skipped: {str(e)}")
+ # Don't fail the whole process if review fails - assume acceptable
+ return "Image generated successfully (review skipped)", 7.5, False
+
+ def improve_prompt(self, original_prompt: str, critique: str,
+ iteration: int) -> str:
+ """
+ Improve the generation prompt based on critique.
+
+ Args:
+ original_prompt: Original user prompt
+ critique: Review critique from previous iteration
+ iteration: Current iteration number
+
+ Returns:
+ Improved prompt for next generation
+ """
+ improved_prompt = f"""{self.SCIENTIFIC_DIAGRAM_GUIDELINES}
+
+USER REQUEST: {original_prompt}
+
+ITERATION {iteration}: Based on previous feedback, address these specific improvements:
+{critique}
+
+Generate an improved version that addresses all the critique points while maintaining scientific accuracy and professional quality."""
+
+ return improved_prompt
+
+ def generate_iterative(self, user_prompt: str, output_path: str,
+ iterations: int = 2,
+ doc_type: str = "default") -> Dict[str, Any]:
+ """
+ Generate scientific schematic with smart iterative refinement.
+
+ Only regenerates if the quality score is below the threshold for the
+ specified document type. This saves API calls and time when the first
+ generation is already good enough.
+
+ Args:
+ user_prompt: User's description of desired diagram
+ output_path: Path to save final image
+ iterations: Maximum refinement iterations (default: 2, max: 2)
+ doc_type: Document type for quality threshold (journal, poster, etc.)
+
+ Returns:
+ Dictionary with generation results and metadata
+ """
+ output_path = Path(output_path)
+ output_dir = output_path.parent
+ output_dir.mkdir(parents=True, exist_ok=True)
+
+ base_name = output_path.stem
+ extension = output_path.suffix or ".png"
+
+ # Get quality threshold for this document type
+ threshold = self.QUALITY_THRESHOLDS.get(doc_type.lower(),
+ self.QUALITY_THRESHOLDS["default"])
+
+ results = {
+ "user_prompt": user_prompt,
+ "doc_type": doc_type,
+ "quality_threshold": threshold,
+ "iterations": [],
+ "final_image": None,
+ "final_score": 0.0,
+ "success": False,
+ "early_stop": False,
+ "early_stop_reason": None
+ }
+
+ current_prompt = f"""{self.SCIENTIFIC_DIAGRAM_GUIDELINES}
+
+USER REQUEST: {user_prompt}
+
+Generate a publication-quality scientific diagram that meets all the guidelines above."""
+
+ print(f"\n{'='*60}")
+ print(f"Generating Scientific Schematic")
+ print(f"{'='*60}")
+ print(f"Description: {user_prompt}")
+ print(f"Document Type: {doc_type}")
+ print(f"Quality Threshold: {threshold}/10")
+ print(f"Max Iterations: {iterations}")
+ print(f"Output: {output_path}")
+ print(f"{'='*60}\n")
+
+ for i in range(1, iterations + 1):
+ print(f"\n[Iteration {i}/{iterations}]")
+ print("-" * 40)
+
+ # Generate image
+ print(f"Generating image...")
+ image_data = self.generate_image(current_prompt)
+
+ if not image_data:
+ error_msg = getattr(self, '_last_error', 'Image generation failed - no image data returned')
+ print(f"✗ Generation failed: {error_msg}")
+ results["iterations"].append({
+ "iteration": i,
+ "success": False,
+ "error": error_msg
+ })
+ continue
+
+ # Save iteration image
+ iter_path = output_dir / f"{base_name}_v{i}{extension}"
+ with open(iter_path, "wb") as f:
+ f.write(image_data)
+ print(f"✓ Saved: {iter_path}")
+
+ # Review image using Gemini 3 Pro
+ print(f"Reviewing image with Gemini 3 Pro...")
+ critique, score, needs_improvement = self.review_image(
+ str(iter_path), user_prompt, i, doc_type, iterations
+ )
+ print(f"✓ Score: {score}/10 (threshold: {threshold}/10)")
+
+ # Save iteration results
+ iteration_result = {
+ "iteration": i,
+ "image_path": str(iter_path),
+ "prompt": current_prompt,
+ "critique": critique,
+ "score": score,
+ "needs_improvement": needs_improvement,
+ "success": True
+ }
+ results["iterations"].append(iteration_result)
+
+ # Check if quality is acceptable - STOP EARLY if so
+ if not needs_improvement:
+ print(f"\n✓ Quality meets {doc_type} threshold ({score} >= {threshold})")
+ print(f" No further iterations needed!")
+ results["final_image"] = str(iter_path)
+ results["final_score"] = score
+ results["success"] = True
+ results["early_stop"] = True
+ results["early_stop_reason"] = f"Quality score {score} meets threshold {threshold} for {doc_type}"
+ break
+
+ # If this is the last iteration, we're done regardless
+ if i == iterations:
+ print(f"\n⚠ Maximum iterations reached")
+ results["final_image"] = str(iter_path)
+ results["final_score"] = score
+ results["success"] = True
+ break
+
+ # Quality below threshold - improve prompt for next iteration
+ print(f"\n⚠ Quality below threshold ({score} < {threshold})")
+ print(f"Improving prompt based on feedback...")
+ current_prompt = self.improve_prompt(user_prompt, critique, i + 1)
+
+ # Copy final version to output path
+ if results["success"] and results["final_image"]:
+ final_iter_path = Path(results["final_image"])
+ if final_iter_path != output_path:
+ import shutil
+ shutil.copy(final_iter_path, output_path)
+ print(f"\n✓ Final image: {output_path}")
+
+ # Save review log
+ log_path = output_dir / f"{base_name}_review_log.json"
+ with open(log_path, "w") as f:
+ json.dump(results, f, indent=2)
+ print(f"✓ Review log: {log_path}")
+
+ print(f"\n{'='*60}")
+ print(f"Generation Complete!")
+ print(f"Final Score: {results['final_score']}/10")
+ if results["early_stop"]:
+ print(f"Iterations Used: {len([r for r in results['iterations'] if r.get('success')])}/{iterations} (early stop)")
+ print(f"{'='*60}\n")
+
+ return results
+
+
+def main():
+ """Command-line interface."""
+ parser = argparse.ArgumentParser(
+ description="Generate scientific schematics using AI with smart iterative refinement",
+ formatter_class=argparse.RawDescriptionHelpFormatter,
+ epilog="""
+Examples:
+ # Generate a flowchart for a journal paper
+ python generate_schematic_ai.py "CONSORT participant flow diagram" -o flowchart.png --doc-type journal
+
+ # Generate neural network architecture for presentation (lower threshold)
+ python generate_schematic_ai.py "Transformer encoder-decoder architecture" -o transformer.png --doc-type presentation
+
+ # Generate with custom max iterations for poster
+ python generate_schematic_ai.py "Biological signaling pathway" -o pathway.png --iterations 2 --doc-type poster
+
+ # Verbose output
+ python generate_schematic_ai.py "Circuit diagram" -o circuit.png -v
+
+Document Types (quality thresholds):
+ journal 8.5/10 - Nature, Science, peer-reviewed journals
+ conference 8.0/10 - Conference papers
+ thesis 8.0/10 - Dissertations, theses
+ grant 8.0/10 - Grant proposals
+ preprint 7.5/10 - arXiv, bioRxiv, etc.
+ report 7.5/10 - Technical reports
+ poster 7.0/10 - Academic posters
+ presentation 6.5/10 - Slides, talks
+ default 7.5/10 - General purpose
+
+Note: Multiple iterations only occur if quality is BELOW the threshold.
+ If the first generation meets the threshold, no extra API calls are made.
+
+Environment:
+ OPENROUTER_API_KEY OpenRouter API key (required)
+ """
+ )
+
+ parser.add_argument("prompt", help="Description of the diagram to generate")
+ parser.add_argument("-o", "--output", required=True,
+ help="Output image path (e.g., diagram.png)")
+ parser.add_argument("--iterations", type=int, default=2,
+ help="Maximum refinement iterations (default: 2, max: 2)")
+ parser.add_argument("--doc-type", default="default",
+ choices=["journal", "conference", "poster", "presentation",
+ "report", "grant", "thesis", "preprint", "default"],
+ help="Document type for quality threshold (default: default)")
+ parser.add_argument("--api-key", help="OpenRouter API key (or set OPENROUTER_API_KEY)")
+ parser.add_argument("-v", "--verbose", action="store_true",
+ help="Verbose output")
+
+ args = parser.parse_args()
+
+ # Check for API key
+ api_key = args.api_key or os.getenv("OPENROUTER_API_KEY")
+ if not api_key:
+ print("Error: OPENROUTER_API_KEY environment variable not set")
+ print("\nSet it with:")
+ print(" export OPENROUTER_API_KEY='your_api_key'")
+ print("\nOr provide via --api-key flag")
+ sys.exit(1)
+
+ # Validate iterations - enforce max of 2
+ if args.iterations < 1 or args.iterations > 2:
+ print("Error: Iterations must be between 1 and 2")
+ sys.exit(1)
+
+ try:
+ generator = ScientificSchematicGenerator(api_key=api_key, verbose=args.verbose)
+ results = generator.generate_iterative(
+ user_prompt=args.prompt,
+ output_path=args.output,
+ iterations=args.iterations,
+ doc_type=args.doc_type
+ )
+
+ if results["success"]:
+ print(f"\n✓ Success! Image saved to: {args.output}")
+ if results.get("early_stop"):
+ print(f" (Completed in {len([r for r in results['iterations'] if r.get('success')])} iteration(s) - quality threshold met)")
+ sys.exit(0)
+ else:
+ print(f"\n✗ Generation failed. Check review log for details.")
+ sys.exit(1)
+ except Exception as e:
+ print(f"\n✗ Error: {str(e)}")
+ sys.exit(1)
+
+
+if __name__ == "__main__":
+ main()
+
diff --git a/scientific-skills/scientific-schematics/test_ai_generation.py b/scientific-skills/scientific-schematics/test_ai_generation.py
new file mode 100644
index 0000000..0c4db82
--- /dev/null
+++ b/scientific-skills/scientific-schematics/test_ai_generation.py
@@ -0,0 +1,243 @@
+#!/usr/bin/env python3
+"""
+Test script to verify AI generation implementation.
+
+This script performs dry-run tests without making actual API calls.
+It verifies:
+1. Script structure and imports
+2. Class initialization
+3. Method signatures
+4. Error handling
+5. Command-line interface
+
+Usage:
+ python test_ai_generation.py
+"""
+
+import sys
+import os
+from pathlib import Path
+
+# Add scripts directory to path
+scripts_dir = Path(__file__).parent / "scripts"
+sys.path.insert(0, str(scripts_dir))
+
+def test_imports():
+ """Test that all required modules can be imported."""
+ print("Testing imports...")
+ try:
+ from generate_schematic_ai import ScientificSchematicGenerator
+ print("✓ generate_schematic_ai imports successfully")
+ return True
+ except ImportError as e:
+ print(f"✗ Import failed: {e}")
+ return False
+
+def test_class_structure():
+ """Test class initialization and structure."""
+ print("\nTesting class structure...")
+ try:
+ from generate_schematic_ai import ScientificSchematicGenerator
+
+ # Test initialization with dummy key
+ generator = ScientificSchematicGenerator(api_key="test_key", verbose=False)
+ print("✓ Class initializes successfully")
+
+ # Check required methods exist
+ required_methods = [
+ 'generate_image',
+ 'review_image',
+ 'improve_prompt',
+ 'generate_iterative'
+ ]
+
+ for method in required_methods:
+ if not hasattr(generator, method):
+ print(f"✗ Missing method: {method}")
+ return False
+ print(f"✓ Method exists: {method}")
+
+ # Check attributes
+ if not hasattr(generator, 'api_key'):
+ print("✗ Missing attribute: api_key")
+ return False
+ print("✓ Attribute exists: api_key")
+
+ if not hasattr(generator, 'image_model'):
+ print("✗ Missing attribute: image_model")
+ return False
+ print(f"✓ Image model: {generator.image_model}")
+
+ if not hasattr(generator, 'review_model'):
+ print("✗ Missing attribute: review_model")
+ return False
+ print(f"✓ Review model: {generator.review_model}")
+
+ return True
+ except Exception as e:
+ print(f"✗ Class structure test failed: {e}")
+ return False
+
+def test_error_handling():
+ """Test error handling for missing API key."""
+ print("\nTesting error handling...")
+ try:
+ from generate_schematic_ai import ScientificSchematicGenerator
+
+ # Clear environment variable
+ old_key = os.environ.get("OPENROUTER_API_KEY")
+ if old_key:
+ del os.environ["OPENROUTER_API_KEY"]
+
+ # Try to initialize without key
+ try:
+ generator = ScientificSchematicGenerator()
+ print("✗ Should have raised ValueError for missing API key")
+ return False
+ except ValueError as e:
+ if "OPENROUTER_API_KEY" in str(e):
+ print("✓ Correctly raises ValueError for missing API key")
+ else:
+ print(f"✗ Wrong error message: {e}")
+ return False
+
+ # Restore environment variable
+ if old_key:
+ os.environ["OPENROUTER_API_KEY"] = old_key
+
+ return True
+ except Exception as e:
+ print(f"✗ Error handling test failed: {e}")
+ return False
+
+def test_wrapper_script():
+ """Test wrapper script structure."""
+ print("\nTesting wrapper script...")
+ try:
+ import generate_schematic
+ print("✓ generate_schematic imports successfully")
+
+ # Check main functions exist
+ if not hasattr(generate_schematic, 'main'):
+ print("✗ Missing function: main")
+ return False
+ print("✓ Function exists: main")
+
+ return True
+ except Exception as e:
+ print(f"✗ Wrapper script test failed: {e}")
+ return False
+
+def test_prompt_engineering():
+ """Test prompt construction."""
+ print("\nTesting prompt engineering...")
+ try:
+ from generate_schematic_ai import ScientificSchematicGenerator
+
+ generator = ScientificSchematicGenerator(api_key="test_key", verbose=False)
+
+ # Test improve_prompt method
+ original = "Create a flowchart"
+ critique = "Add more spacing between boxes"
+ improved = generator.improve_prompt(original, critique, 2)
+
+ if not improved:
+ print("✗ improve_prompt returned empty string")
+ return False
+
+ if original not in improved:
+ print("✗ Improved prompt doesn't include original")
+ return False
+
+ if critique not in improved:
+ print("✗ Improved prompt doesn't include critique")
+ return False
+
+ if "ITERATION 2" not in improved:
+ print("✗ Improved prompt doesn't include iteration number")
+ return False
+
+ print("✓ Prompt engineering works correctly")
+ print(f" Original length: {len(original)} chars")
+ print(f" Improved length: {len(improved)} chars")
+
+ return True
+ except Exception as e:
+ print(f"✗ Prompt engineering test failed: {e}")
+ return False
+
+def test_file_paths():
+ """Test that all required files exist."""
+ print("\nTesting file structure...")
+
+ base_dir = Path(__file__).parent
+ required_files = [
+ "scripts/generate_schematic_ai.py",
+ "scripts/generate_schematic.py",
+ "SKILL.md",
+ "README.md"
+ ]
+
+ all_exist = True
+ for file_path in required_files:
+ full_path = base_dir / file_path
+ if full_path.exists():
+ print(f"✓ {file_path}")
+ else:
+ print(f"✗ Missing: {file_path}")
+ all_exist = False
+
+ return all_exist
+
+def main():
+ """Run all tests."""
+ print("="*60)
+ print("Scientific Schematics AI Generation - Verification Tests")
+ print("="*60)
+
+ tests = [
+ ("File Structure", test_file_paths),
+ ("Imports", test_imports),
+ ("Class Structure", test_class_structure),
+ ("Error Handling", test_error_handling),
+ ("Wrapper Script", test_wrapper_script),
+ ("Prompt Engineering", test_prompt_engineering),
+ ]
+
+ results = []
+ for test_name, test_func in tests:
+ try:
+ result = test_func()
+ results.append((test_name, result))
+ except Exception as e:
+ print(f"\n✗ Test '{test_name}' crashed: {e}")
+ results.append((test_name, False))
+
+ # Summary
+ print("\n" + "="*60)
+ print("Test Summary")
+ print("="*60)
+
+ passed = sum(1 for _, result in results if result)
+ total = len(results)
+
+ for test_name, result in results:
+ status = "✓ PASS" if result else "✗ FAIL"
+ print(f"{status}: {test_name}")
+
+ print(f"\nTotal: {passed}/{total} tests passed")
+
+ if passed == total:
+ print("\n✓ All tests passed! Implementation verified.")
+ print("\nNext steps:")
+ print("1. Set OPENROUTER_API_KEY environment variable")
+ print("2. Test with actual API call:")
+ print(" python scripts/generate_schematic.py 'test diagram' -o test.png")
+ return 0
+ else:
+ print(f"\n✗ {total - passed} test(s) failed. Please review errors above.")
+ return 1
+
+if __name__ == "__main__":
+ sys.exit(main())
+
diff --git a/scientific-skills/scientific-slides/SKILL.md b/scientific-skills/scientific-slides/SKILL.md
new file mode 100644
index 0000000..c87dbea
--- /dev/null
+++ b/scientific-skills/scientific-slides/SKILL.md
@@ -0,0 +1,1150 @@
+---
+name: scientific-slides
+description: "Build slide decks and presentations for research talks. Use this for making PowerPoint slides, conference presentations, seminar talks, research presentations, thesis defense slides, or any scientific talk. Provides slide structure, design templates, timing guidance, and visual validation. Works with PowerPoint and LaTeX Beamer."
+allowed-tools: [Read, Write, Edit, Bash]
+---
+
+# Scientific Slides
+
+## Overview
+
+Scientific presentations are a critical medium for communicating research, sharing findings, and engaging with academic and professional audiences. This skill provides comprehensive guidance for creating effective scientific presentations, from structure and content development to visual design and delivery preparation.
+
+**Key Focus**: Oral presentations for conferences, seminars, defenses, and professional talks.
+
+**CRITICAL DESIGN PHILOSOPHY**: Scientific presentations should be VISUALLY ENGAGING and RESEARCH-BACKED. Avoid dry, text-heavy slides at all costs. Great scientific presentations combine:
+- **Compelling visuals**: High-quality figures, images, diagrams (not just bullet points)
+- **Research context**: Proper citations from research-lookup establishing credibility
+- **Minimal text**: Bullet points as prompts, YOU provide the explanation verbally
+- **Professional design**: Modern color schemes, strong visual hierarchy, generous white space
+- **Story-driven**: Clear narrative arc, not just data dumps
+
+**Remember**: Boring presentations = forgotten science. Make your slides visually memorable while maintaining scientific rigor through proper citations.
+
+## When to Use This Skill
+
+This skill should be used when:
+- Preparing conference presentations (5-20 minutes)
+- Developing academic seminars (45-60 minutes)
+- Creating thesis or dissertation defense presentations
+- Designing grant pitch presentations
+- Preparing journal club presentations
+- Giving research talks at institutions or companies
+- Teaching or tutorial presentations on scientific topics
+
+## Slide Generation with Nano Banana Pro
+
+**This skill uses Nano Banana Pro AI to generate stunning presentation slides automatically.**
+
+There are two workflows depending on output format:
+
+### Default Workflow: PDF Slides (Recommended)
+
+Generate each slide as a complete image using Nano Banana Pro, then combine into a PDF. This produces the most visually stunning results.
+
+**How it works:**
+1. **Plan the deck**: Create a detailed plan for each slide (title, key points, visual elements)
+2. **Generate slides**: Call Nano Banana Pro for each slide to create complete slide images
+3. **Combine to PDF**: Assemble slide images into a single PDF presentation
+
+**Step 1: Plan Each Slide**
+
+Before generating, create a detailed plan for your presentation:
+
+```markdown
+# Presentation Plan: Introduction to Machine Learning
+
+## Slide 1: Title Slide
+- Title: "Machine Learning: From Theory to Practice"
+- Subtitle: "AI Conference 2025"
+- Speaker: Dr. Jane Smith, University of XYZ
+- Visual: Modern abstract neural network background
+
+## Slide 2: Introduction
+- Title: "Why Machine Learning Matters"
+- Key points: Industry adoption, breakthrough applications, future potential
+- Visual: Icons showing different ML applications (healthcare, finance, robotics)
+
+## Slide 3: Core Concepts
+- Title: "The Three Types of Learning"
+- Content: Supervised, Unsupervised, Reinforcement
+- Visual: Three-part diagram showing each type with examples
+
+... (continue for all slides)
+```
+
+**Step 2: Generate Each Slide**
+
+Use the `generate_slide_image.py` script to create each slide.
+
+**CRITICAL: Formatting Consistency Protocol**
+
+To ensure unified formatting across all slides in a presentation:
+
+1. **Define a Formatting Goal** at the start of your presentation and include it in EVERY prompt:
+ - Color scheme (e.g., "dark blue background, white text, gold accents")
+ - Typography style (e.g., "bold sans-serif titles, clean body text")
+ - Visual style (e.g., "minimal, professional, corporate aesthetic")
+ - Layout approach (e.g., "generous white space, left-aligned content")
+
+2. **Always attach the previous slide** when generating subsequent slides using `--attach`:
+ - This allows Nano Banana Pro to see and match the existing style
+ - Creates visual continuity throughout the deck
+ - Ensures consistent colors, fonts, and design language
+
+3. **Default author is "K-Dense"** unless another name is specified
+
+4. **Include citations directly in the prompt** for slides that reference research:
+ - Add citations in the prompt text so they appear on the generated slide
+ - Use format: "Include citation: (Author et al., Year)" or "Show reference: Author et al., Year"
+ - For multiple citations, list them all in the prompt
+ - Citations should appear in small text at the bottom of the slide or near relevant content
+
+5. **Attach existing figures/data for results slides** (CRITICAL for data-driven presentations):
+ - When creating slides about results, ALWAYS check for existing figures in:
+ - The working directory (e.g., `figures/`, `results/`, `plots/`, `images/`)
+ - User-provided input files or directories
+ - Any data visualizations, charts, or graphs relevant to the presentation
+ - Use `--attach` to include these figures so Nano Banana Pro can incorporate them:
+ - Attach the actual data figure/chart for results slides
+ - Attach relevant diagrams for methodology slides
+ - Attach logos or institutional images for title slides
+ - When attaching data figures, describe what you want in the prompt:
+ - "Create a slide presenting the attached results chart with key findings highlighted"
+ - "Build a slide around this attached figure, add title and bullet points explaining the data"
+ - "Incorporate the attached graph into a results slide with interpretation"
+ - **Before generating results slides**: List files in the working directory to find relevant figures
+ - Multiple figures can be attached: `--attach fig1.png --attach fig2.png`
+
+**Example with formatting consistency, citations, and figure attachments:**
+
+```bash
+# Title slide (first slide - establishes the style)
+python scripts/generate_slide_image.py "Title slide for presentation: 'Machine Learning: From Theory to Practice'. Subtitle: 'AI Conference 2025'. Speaker: K-Dense. FORMATTING GOAL: Dark blue background (#1a237e), white text, gold accents (#ffc107), minimal design, sans-serif fonts, generous margins, no decorative elements." -o slides/01_title.png
+
+# Content slide with citations (attach previous slide for consistency)
+python scripts/generate_slide_image.py "Presentation slide titled 'Why Machine Learning Matters'. Three key points with simple icons: 1) Industry adoption, 2) Breakthrough applications, 3) Future potential. CITATIONS: Include at bottom in small text: (LeCun et al., 2015; Goodfellow et al., 2016). FORMATTING GOAL: Match attached slide style - dark blue background, white text, gold accents, minimal professional design, no visual clutter." -o slides/02_intro.png --attach slides/01_title.png
+
+# Background slide with multiple citations
+python scripts/generate_slide_image.py "Presentation slide titled 'Deep Learning Revolution'. Key milestones: ImageNet breakthrough (2012), transformer architecture (2017), GPT models (2018-present). CITATIONS: Show references at bottom: (Krizhevsky et al., 2012; Vaswani et al., 2017; Brown et al., 2020). FORMATTING GOAL: Match attached slide style exactly - same colors, fonts, minimal design." -o slides/03_background.png --attach slides/02_intro.png
+
+# RESULTS SLIDE - Attach actual data figure from working directory
+# First, check what figures exist: ls figures/ or ls results/
+python scripts/generate_slide_image.py "Presentation slide titled 'Model Performance Results'. Create a slide presenting the attached accuracy chart. Key findings to highlight: 1) 95% accuracy achieved, 2) Outperforms baseline by 12%, 3) Consistent across test sets. CITATIONS: Include at bottom: (Our results, 2025). FORMATTING GOAL: Match attached slide style exactly." -o slides/04_results.png --attach slides/03_background.png --attach figures/accuracy_chart.png
+
+# RESULTS SLIDE - Multiple figures comparison
+python scripts/generate_slide_image.py "Presentation slide titled 'Before vs After Comparison'. Build a side-by-side comparison slide using the two attached figures. Left: baseline results, Right: our improved results. Add brief labels explaining the improvement. FORMATTING GOAL: Match attached slide style exactly." -o slides/05_comparison.png --attach slides/04_results.png --attach figures/baseline.png --attach figures/improved.png
+
+# METHODOLOGY SLIDE - Attach existing diagram
+python scripts/generate_slide_image.py "Presentation slide titled 'System Architecture'. Present the attached architecture diagram with brief explanatory bullet points: 1) Input processing, 2) Model inference, 3) Output generation. FORMATTING GOAL: Match attached slide style exactly." -o slides/06_architecture.png --attach slides/05_comparison.png --attach diagrams/system_architecture.png
+```
+
+**IMPORTANT: Before creating results slides, always:**
+1. List files in working directory: `ls -la figures/` or `ls -la results/`
+2. Check user-provided directories for relevant figures
+3. Attach ALL relevant figures that should appear on the slide
+4. Describe how Nano Banana Pro should incorporate the attached figures
+
+**Prompt Template:**
+
+Include these elements in every prompt (customize as needed):
+```
+[Slide content description]
+CITATIONS: Include at bottom: (Author1 et al., Year; Author2 et al., Year)
+FORMATTING GOAL: [Background color], [text color], [accent color], minimal professional design, no decorative elements, consistent with attached slide style.
+```
+
+**Step 3: Combine to PDF**
+
+```bash
+# Combine all slides into a PDF presentation
+python scripts/slides_to_pdf.py slides/*.png -o presentation.pdf
+```
+
+### PPT Workflow: PowerPoint with Generated Visuals
+
+When creating PowerPoint presentations, use Nano Banana Pro to generate images and figures for each slide, then add text separately using the PPTX skill.
+
+**How it works:**
+1. **Plan the deck**: Create content plan for each slide
+2. **Generate visuals**: Use Nano Banana Pro with `--visual-only` flag to create images for slides
+3. **Build PPTX**: Use the PPTX skill (html2pptx or template-based) to create slides with generated visuals and separate text
+
+**Step 1: Generate Visuals for Each Slide**
+
+```bash
+# Generate a figure for the introduction slide
+python scripts/generate_slide_image.py "Professional illustration showing machine learning applications: healthcare diagnosis, financial analysis, autonomous vehicles, and robotics. Modern flat design, colorful icons on white background." -o figures/ml_applications.png --visual-only
+
+# Generate a diagram for the methods slide
+python scripts/generate_slide_image.py "Neural network architecture diagram showing input layer, three hidden layers, and output layer. Clean, technical style with node connections. Blue and gray color scheme." -o figures/neural_network.png --visual-only
+
+# Generate a conceptual graphic for results
+python scripts/generate_slide_image.py "Before and after comparison showing improvement: left side shows cluttered data, right side shows organized insights. Arrow connecting them. Professional business style." -o figures/results_visual.png --visual-only
+```
+
+**Step 2: Build PowerPoint with PPTX Skill**
+
+Use the PPTX skill's html2pptx workflow to create slides that include:
+- Generated images from step 1
+- Title and body text added separately
+- Professional layout and formatting
+
+See `document-skills/pptx/SKILL.md` for complete PPTX creation documentation.
+
+---
+
+## Nano Banana Pro Script Reference
+
+### generate_slide_image.py
+
+Generate presentation slides or visuals using Nano Banana Pro AI.
+
+```bash
+# Full slide (default) - generates complete slide as image
+python scripts/generate_slide_image.py "slide description" -o output.png
+
+# Visual only - generates just the image/figure for embedding in PPT
+python scripts/generate_slide_image.py "visual description" -o output.png --visual-only
+
+# With reference images attached (Nano Banana Pro will see these)
+python scripts/generate_slide_image.py "Create a slide explaining this chart" -o slide.png --attach chart.png
+python scripts/generate_slide_image.py "Combine these into a comparison slide" -o compare.png --attach before.png --attach after.png
+```
+
+**Options:**
+- `-o, --output`: Output file path (required)
+- `--attach IMAGE`: Attach image file(s) as context for generation (can use multiple times)
+- `--visual-only`: Generate just the visual/figure, not a complete slide
+- `--iterations`: Max refinement iterations (default: 2)
+- `--api-key`: OpenRouter API key (or set OPENROUTER_API_KEY env var)
+- `-v, --verbose`: Verbose output
+
+**Attaching Reference Images:**
+
+Use `--attach` when you want Nano Banana Pro to see existing images as context:
+- "Create a slide about this data" + attach the data chart
+- "Make a title slide with this logo" + attach the logo
+- "Combine these figures into one slide" + attach multiple images
+- "Explain this diagram in a slide" + attach the diagram
+
+**Environment Setup:**
+```bash
+export OPENROUTER_API_KEY='your_api_key_here'
+# Get key at: https://openrouter.ai/keys
+```
+
+### slides_to_pdf.py
+
+Combine multiple slide images into a single PDF.
+
+```bash
+# Combine PNG files
+python scripts/slides_to_pdf.py slides/*.png -o presentation.pdf
+
+# Combine specific files in order
+python scripts/slides_to_pdf.py title.png intro.png methods.png -o talk.pdf
+
+# From directory (sorted by filename)
+python scripts/slides_to_pdf.py slides/ -o presentation.pdf
+```
+
+**Options:**
+- `-o, --output`: Output PDF path (required)
+- `--dpi`: PDF resolution (default: 150)
+- `-v, --verbose`: Verbose output
+
+**Tip:** Name slides with numbers for correct ordering: `01_title.png`, `02_intro.png`, etc.
+
+---
+
+## Prompt Writing for Slide Generation
+
+### Full Slide Prompts (PDF Workflow)
+
+For complete slides, include:
+1. **Slide type**: Title slide, content slide, diagram slide, etc.
+2. **Title**: The slide title text
+3. **Content**: Key points, bullet items, or descriptions
+4. **Visual elements**: What imagery, icons, or graphics to include
+5. **Design style**: Color scheme, mood, aesthetic
+
+**Example prompts:**
+
+```
+Title slide:
+"Title slide for a medical research presentation. Title: 'Advances in Cancer Immunotherapy'. Subtitle: 'Clinical Trial Results 2024'. Professional medical theme with subtle DNA helix in background. Navy blue and white color scheme."
+
+Content slide:
+"Presentation slide titled 'Key Findings'. Three bullet points: 1) 40% improvement in response rate, 2) Reduced side effects, 3) Extended survival outcomes. Include relevant medical icons. Clean, professional design with green and white colors."
+
+Diagram slide:
+"Presentation slide showing the research methodology. Title: 'Study Design'. Flowchart showing: Patient Screening → Randomization → Treatment Groups (A, B, Control) → Follow-up → Analysis. CONSORT-style flow diagram. Professional academic style."
+```
+
+### Visual-Only Prompts (PPT Workflow)
+
+For images to embed in PowerPoint, focus on the visual element only:
+
+```
+"Flowchart showing machine learning pipeline: Data Collection → Preprocessing → Model Training → Validation → Deployment. Clean technical style, blue and gray colors."
+
+"Conceptual illustration of cloud computing with servers, data flow, and connected devices. Modern flat design, suitable for business presentation."
+
+"Scientific diagram of cell division process showing mitosis phases. Educational style with labels, colorblind-friendly colors."
+```
+
+---
+
+## Visual Enhancement with Scientific Schematics
+
+In addition to slide generation, use the **scientific-schematics** skill for technical diagrams:
+
+**When to use scientific-schematics instead:**
+- Complex technical diagrams (circuit diagrams, chemical structures)
+- Publication-quality figures for papers (higher quality threshold)
+- Diagrams requiring scientific accuracy review
+
+**How to generate schematics:**
+```bash
+python scripts/generate_schematic.py "your diagram description" -o figures/output.png
+```
+
+For detailed guidance on creating schematics, refer to the scientific-schematics skill documentation.
+
+---
+
+## Core Capabilities
+
+### 1. Presentation Structure and Organization
+
+Build presentations with clear narrative flow and appropriate structure for different contexts. For detailed guidance, refer to `references/presentation_structure.md`.
+
+**Universal Story Arc**:
+1. **Hook**: Grab attention (30-60 seconds)
+2. **Context**: Establish importance (5-10% of talk)
+3. **Problem/Gap**: Identify what's unknown (5-10% of talk)
+4. **Approach**: Explain your solution (15-25% of talk)
+5. **Results**: Present key findings (40-50% of talk)
+6. **Implications**: Discuss meaning (15-20% of talk)
+7. **Closure**: Memorable conclusion (1-2 minutes)
+
+**Talk-Specific Structures**:
+- **Conference talks (15 min)**: Focused on 1-2 key findings, minimal methods
+- **Academic seminars (45 min)**: Comprehensive coverage, detailed methods, multiple studies
+- **Thesis defenses (60 min)**: Complete dissertation overview, all studies covered
+- **Grant pitches (15 min)**: Emphasis on significance, feasibility, and impact
+- **Journal clubs (30 min)**: Critical analysis of published work
+
+### 2. Slide Design Principles
+
+Create professional, readable, and accessible slides that enhance understanding. For complete design guidelines, refer to `references/slide_design_principles.md`.
+
+**ANTI-PATTERN: Avoid Dry, Text-Heavy Presentations**
+
+❌ **What Makes Presentations Dry and Forgettable:**
+- Walls of text (more than 6 bullets per slide)
+- Small fonts (<24pt body text)
+- Black text on white background only (no visual interest)
+- No images or graphics (bullet points only)
+- Generic templates with no customization
+- Dense, paragraph-like bullet points
+- Missing research context (no citations)
+- All slides look the same (repetitive)
+
+✅ **What Makes Presentations Engaging and Memorable:**
+- HIGH-QUALITY VISUALS dominate (figures, photos, diagrams, icons)
+- Large, clear text as accent (not the main content)
+- Modern, purposeful color schemes (not default themes)
+- Generous white space (slides breathe)
+- Research-backed context (proper citations from research-lookup)
+- Variety in slide layouts (not all bullet lists)
+- Story-driven flow with visual anchors
+- Professional, polished appearance
+
+**Core Design Principles**:
+
+**Visual-First Approach** (CRITICAL):
+- Start with visuals (figures, images, diagrams), add text as support
+- Every slide should have STRONG visual element (figure, chart, photo, diagram)
+- Text explains or complements visuals, not replaces them
+- Think: "How can I show this, not just tell it?"
+- Target: 60-70% visual content, 30-40% text
+
+**Simplicity with Impact**:
+- One main idea per slide
+- MINIMAL text (3-4 bullets, 4-6 words each preferred)
+- Generous white space (40-50% of slide)
+- Clear visual focus
+- Bold, confident design choices
+
+**Typography for Engagement**:
+- Sans-serif fonts (Arial, Calibri, Helvetica)
+- LARGE fonts: 24-28pt for body text (not minimum 18pt)
+- 36-44pt for slide titles (make bold)
+- High contrast (minimum 4.5:1, prefer 7:1)
+- Use size for hierarchy, not just weight
+
+**Color for Impact**:
+- MODERN color palettes (not default blue/gray)
+- Consider your topic: biotech? vibrant colors. Physics? sleek darks. Health? warm tones.
+- Limited palette (3-5 colors total)
+- High contrast combinations
+- Color-blind safe (avoid red-green combinations)
+- Use color purposefully (not decoration)
+
+**Layout for Visual Interest**:
+- Vary layouts (not all bullet lists)
+- Use two-column layouts (text + figure)
+- Full-slide figures for key results
+- Asymmetric compositions (more interesting than centered)
+- Rule of thirds for focal points
+- Consistent but not repetitive
+
+### 3. Data Visualization for Slides
+
+Adapt scientific figures for presentation context. For detailed guidance, refer to `references/data_visualization_slides.md`.
+
+**Key Differences from Journal Figures**:
+- Simplify, don't replicate
+- Larger fonts (18-24pt minimum)
+- Fewer panels (split across slides)
+- Direct labeling (not legends)
+- Emphasis through color and size
+- Progressive disclosure for complex data
+
+**Visualization Best Practices**:
+- **Bar charts**: Comparing discrete categories
+- **Line graphs**: Trends and trajectories
+- **Scatter plots**: Relationships and correlations
+- **Heatmaps**: Matrix data and patterns
+- **Network diagrams**: Relationships and connections
+
+**Common Mistakes to Avoid**:
+- Tiny fonts (<18pt)
+- Too many panels on one slide
+- Complex legends
+- Insufficient contrast
+- Cluttered layouts
+
+### 4. Talk-Specific Guidance
+
+Different presentation contexts require different approaches. For comprehensive guidance on each type, refer to `references/talk_types_guide.md`.
+
+**Conference Talks** (10-20 minutes):
+- Structure: Brief intro → minimal methods → key results → quick conclusion
+- Focus: 1-2 main findings only
+- Style: Engaging, fast-paced, memorable
+- Goal: Generate interest, network, get invited
+
+**Academic Seminars** (45-60 minutes):
+- Structure: Comprehensive coverage with detailed methods
+- Focus: Multiple findings, depth of analysis
+- Style: Scholarly, interactive, discussion-oriented
+- Goal: Demonstrate expertise, get feedback, collaborate
+
+**Thesis Defenses** (45-60 minutes):
+- Structure: Complete dissertation overview, all studies
+- Focus: Demonstrating mastery and independent thinking
+- Style: Formal, comprehensive, prepared for interrogation
+- Goal: Pass examination, defend research decisions
+
+**Grant Pitches** (10-20 minutes):
+- Structure: Problem → significance → approach → feasibility → impact
+- Focus: Innovation, preliminary data, team qualifications
+- Style: Persuasive, focused on outcomes and impact
+- Goal: Secure funding, demonstrate viability
+
+**Journal Clubs** (20-45 minutes):
+- Structure: Context → methods → results → critical analysis
+- Focus: Understanding and critiquing published work
+- Style: Educational, critical, discussion-facilitating
+- Goal: Learn, critique, discuss implications
+
+### 5. Implementation Options
+
+#### Nano Banana Pro PDF (Default - Recommended)
+
+**Best for**: Visually stunning slides, fast creation, non-technical audiences
+
+**This is the default and recommended approach.** Generate each slide as a complete image using AI.
+
+**Workflow**:
+1. Plan each slide (title, content, visual elements)
+2. Generate each slide with `generate_slide_image.py`
+3. Combine into PDF with `slides_to_pdf.py`
+
+```bash
+# Generate slides
+python scripts/generate_slide_image.py "Title: Introduction..." -o slides/01.png
+python scripts/generate_slide_image.py "Title: Methods..." -o slides/02.png
+
+# Combine to PDF
+python scripts/slides_to_pdf.py slides/*.png -o presentation.pdf
+```
+
+**Advantages**:
+- Most visually impressive results
+- Fast creation (describe and generate)
+- No design skills required
+- Consistent, professional appearance
+- Perfect for general audiences
+
+**Best for**:
+- Conference talks
+- Business presentations
+- General scientific talks
+- Pitch presentations
+
+#### PowerPoint via PPTX Skill
+
+**Best for**: Editable slides, custom designs, template-based workflows
+
+**Reference**: See `document-skills/pptx/SKILL.md` for complete documentation
+
+Use Nano Banana Pro with `--visual-only` to generate images, then build PPTX with text.
+
+**Key Resources**:
+- `assets/powerpoint_design_guide.md`: Complete PowerPoint design guide
+- PPTX skill's `html2pptx.md`: Programmatic creation workflow
+- PPTX skill's scripts: `rearrange.py`, `inventory.py`, `replace.py`, `thumbnail.py`
+
+**Workflow**:
+1. Generate visuals with `generate_slide_image.py --visual-only`
+2. Design HTML slides (for programmatic) or use templates
+3. Create presentation using html2pptx or template editing
+4. Add generated images and text content
+5. Generate thumbnails for visual validation
+6. Iterate based on visual inspection
+
+**Advantages**:
+- Editable slides (can modify text later)
+- Complex animations and transitions
+- Interactive elements
+- Company template compatibility
+
+#### LaTeX Beamer
+
+**Best for**: Mathematical content, consistent formatting, version control
+
+**Reference**: See `references/beamer_guide.md` for complete documentation
+
+**Templates Available**:
+- `assets/beamer_template_conference.tex`: 15-minute conference talk
+- `assets/beamer_template_seminar.tex`: 45-minute academic seminar
+- `assets/beamer_template_defense.tex`: Dissertation defense
+
+**Workflow**:
+1. Choose appropriate template
+2. Customize theme and colors
+3. Add content (LaTeX native: equations, code, algorithms)
+4. Compile to PDF
+5. Convert to images for visual validation
+
+**Advantages**:
+- Beautiful mathematics and equations
+- Consistent, professional appearance
+- Version control friendly (plain text)
+- Excellent for algorithms and code
+- Reproducible and programmatic
+
+### 6. Visual Review and Iteration
+
+Implement iterative improvement through visual inspection. For complete workflow, refer to `references/visual_review_workflow.md`.
+
+**Visual Validation Workflow**:
+
+**Step 1: Generate PDF** (if not already PDF)
+- PowerPoint: Export as PDF
+- Beamer: Compile LaTeX source
+
+**Step 2: Convert to Images**
+```bash
+# Using the pdf_to_images script
+python scripts/pdf_to_images.py presentation.pdf review/slide --dpi 150
+
+# Or use pptx skill's thumbnail tool
+python ../document-skills/pptx/scripts/thumbnail.py presentation.pptx review/thumb
+```
+
+**Step 3: Systematic Inspection**
+
+Check each slide for:
+- **Text overflow**: Text cut off at edges
+- **Element overlap**: Text overlapping images or other text
+- **Font sizes**: Text too small (<18pt)
+- **Contrast**: Insufficient contrast between text and background
+- **Layout issues**: Misalignment, poor spacing
+- **Visual quality**: Pixelated images, poor rendering
+
+**Step 4: Document Issues**
+
+Create issue log:
+```
+Slide # | Issue Type | Description | Priority
+--------|-----------|-------------|----------
+3 | Text overflow | Bullet 4 extends beyond box | High
+7 | Overlap | Figure overlaps with caption | High
+12 | Font size | Axis labels too small | Medium
+```
+
+**Step 5: Apply Fixes**
+
+Make corrections to source files:
+- PowerPoint: Edit text boxes, resize elements
+- Beamer: Adjust LaTeX code, recompile
+
+**Step 6: Re-Validate**
+
+Repeat Steps 1-5 until no critical issues remain.
+
+**Stopping Criteria**:
+- No text overflow
+- No inappropriate overlaps
+- All text readable (≥18pt equivalent)
+- Adequate contrast (≥4.5:1)
+- Professional appearance
+
+### 7. Timing and Pacing
+
+Ensure presentations fit allocated time. For comprehensive timing guidance, refer to `assets/timing_guidelines.md`.
+
+**The One-Slide-Per-Minute Rule**:
+- General guideline: ~1 slide per minute
+- Adjust for complex slides (2-3 minutes)
+- Adjust for simple slides (15-30 seconds)
+
+**Time Allocation**:
+- Introduction: 15-20%
+- Methods: 15-20%
+- Results: 40-50% (MOST TIME)
+- Discussion: 15-20%
+- Conclusion: 5%
+
+**Practice Requirements**:
+- 5-minute talk: Practice 5-7 times
+- 15-minute talk: Practice 3-5 times
+- 45-minute talk: Practice 3-4 times
+- Defense: Practice 4-6 times
+
+**Timing Checkpoints**:
+
+For 15-minute talk:
+- 3-4 minutes: Finishing introduction
+- 7-8 minutes: Halfway through results
+- 12-13 minutes: Starting conclusions
+
+**Emergency Strategies**:
+- Running behind: Skip backup slides (prepare in advance)
+- Running ahead: Expand examples, slow slightly
+- Never skip conclusions
+
+### 8. Validation and Quality Assurance
+
+**Automated Validation**:
+```bash
+# Validate slide count, timing, file size
+python scripts/validate_presentation.py presentation.pdf --duration 15
+
+# Generates report on:
+# - Slide count vs. recommended range
+# - File size warnings
+# - Slide dimensions
+# - Font size issues (PowerPoint)
+# - Compilation success (Beamer)
+```
+
+**Manual Validation Checklist**:
+- [ ] Slide count appropriate for duration
+- [ ] Title slide complete (name, affiliation, date)
+- [ ] Clear narrative flow
+- [ ] One main idea per slide
+- [ ] Font sizes ≥18pt (preferably 24pt+)
+- [ ] High contrast colors
+- [ ] Figures large and readable
+- [ ] No text overflow or element overlap
+- [ ] Consistent design throughout
+- [ ] Slide numbers present
+- [ ] Contact info on final slide
+- [ ] Backup slides prepared
+- [ ] Tested on projector (if possible)
+
+## Workflow for Presentation Development
+
+### Stage 1: Planning (Before Creating Slides)
+
+**Define Context**:
+1. What type of talk? (Conference, seminar, defense, etc.)
+2. How long? (Duration in minutes)
+3. Who is the audience? (Specialists, general, mixed)
+4. What's the venue? (Room size, A/V setup, virtual/in-person)
+5. What happens after? (Q&A, discussion, networking)
+
+**Research and Literature Review** (Use research-lookup skill):
+1. **Search for background literature**: Find 5-10 key papers establishing context
+2. **Identify knowledge gaps**: Use research-lookup to find what's unknown
+3. **Locate comparison studies**: Find papers with similar methods or results
+4. **Gather supporting citations**: Collect papers supporting your interpretations
+5. **Build reference list**: Create .bib file or citation list for slides
+6. **Note key findings to cite**: Document specific results to reference
+
+**Develop Content Outline**:
+1. Identify 1-3 core messages
+2. Select key findings to present
+3. Choose essential figures (typically 3-6 for 15-min talk)
+4. Plan narrative arc with proper citations
+5. Allocate time by section
+
+**Example Outline for 15-Minute Talk**:
+```
+1. Title (30 sec)
+2. Hook: Compelling problem (60 sec) [Cite 1-2 papers via research-lookup]
+3. Background (90 sec) [Cite 3-4 key papers establishing context]
+4. Research question (45 sec) [Cite papers showing gap]
+5. Methods overview (2 min)
+6-8. Main result 1 (3 min, 3 slides)
+9-10. Main result 2 (2 min, 2 slides)
+11-12. Result 3 or validation (2 min, 2 slides)
+13-14. Discussion and implications (2 min) [Compare to 2-3 prior studies]
+15. Conclusions (45 sec)
+16. Acknowledgments (15 sec)
+
+NOTE: Use research-lookup to find papers for background (slides 2-4)
+and discussion (slides 13-14) BEFORE creating slides.
+```
+
+### Stage 2: Design and Creation
+
+**Choose Implementation Method**:
+
+**Option A: PowerPoint (via PPTX skill)**
+1. Read `assets/powerpoint_design_guide.md`
+2. Read `document-skills/pptx/SKILL.md`
+3. Choose approach (programmatic or template-based)
+4. Create master slides with consistent design
+5. Build presentation following outline
+
+**Option B: LaTeX Beamer**
+1. Read `references/beamer_guide.md`
+2. Select appropriate template from `assets/`
+3. Customize theme and colors
+4. Write content in LaTeX
+5. Compile to PDF
+
+**Design Considerations** (Make It Visually Appealing):
+- **Select MODERN color palette**: Match your topic (biotech=vibrant, physics=sleek, health=warm)
+ - Use pptx skill's color palette examples (Teal & Coral, Bold Red, Deep Purple & Emerald, etc.)
+ - NOT just default blue/gray themes
+ - 3-5 colors with high contrast
+- **Choose clean fonts**: Sans-serif, large sizes (24pt+ body)
+- **Plan visual elements**: What images, diagrams, icons for each slide?
+- **Create varied layouts**: Mix full-figure, two-column, text-overlay (not all bullets)
+- **Design section dividers**: Visual breaks with striking graphics
+- **Plan animations/builds**: Control information flow for complex slides
+- **Add visual interest**: Background images, color blocks, shapes, icons
+
+### Stage 3: Content Development
+
+**Populate Slides** (Visual-First Strategy):
+1. **Start with visuals**: Plan which figures, images, diagrams for each key point
+2. **Use research-lookup extensively**: Find 8-15 papers for proper citations
+3. **Create visual backbone first**: Add all figures, charts, images, diagrams
+4. **Add minimal text as support**: Bullet points complement visuals, don't replace them
+5. **Design section dividers**: Visual breaks with images or graphics (not just text)
+6. **Polish title/closing**: Make visually striking, include contact info
+7. **Add transitions/builds**: Control information flow
+
+**VISUAL CONTENT REQUIREMENTS** (Make Slides Engaging):
+- **Images**: Use high-quality photos, illustrations, conceptual graphics
+- **Icons**: Visual representations of concepts (not decoration)
+- **Diagrams**: Flowcharts, schematics, process diagrams
+- **Figures**: Simplified research figures with LARGE labels (18-24pt)
+- **Charts**: Clean data visualizations with clear messages
+- **Graphics**: Visual metaphors, conceptual illustrations
+- **Color blocks**: Use colored shapes to organize content visually
+- Target: MINIMUM 1-2 strong visual elements per slide
+
+**Scientific Content** (Research-Backed):
+- **Citations**: Use research-lookup EXTENSIVELY to find relevant papers
+ - Introduction: Cite 3-5 papers establishing context and gap
+ - Background: Show key prior work visually (not just cite)
+ - Discussion: Cite 3-5 papers for comparison with your results
+ - Use author-year format (Smith et al., 2023) for readability
+ - Citations establish credibility and scientific rigor
+- **Figures**: Simplified from papers, LARGE labels (18-24pt minimum)
+- **Equations**: Large, clear, explain each term (use sparingly)
+- **Tables**: Minimal, highlight key comparisons (not data dumps)
+- **Code/Algorithms**: Use syntax highlighting, keep brief
+
+**Text Guidelines** (Less is More):
+- Bullet points, NEVER paragraphs
+- 3-4 bullets per slide (max 6 only if essential)
+- 4-6 words per bullet (shorter than 6×6 rule)
+- Key terms in bold
+- Text is SUPPORTING ROLE, visuals are stars
+- Use builds to control pacing
+
+### Stage 4: Visual Validation
+
+**Generate Images**:
+```bash
+# Convert PDF to images
+python scripts/pdf_to_images.py presentation.pdf review/slides
+
+# Or create thumbnail grid
+python ../document-skills/pptx/scripts/thumbnail.py presentation.pptx review/grid
+```
+
+**Systematic Review**:
+1. View each slide image
+2. Check against issue checklist
+3. Document problems with slide numbers
+4. Test readability from distance (view at 50% size)
+
+**Common Issues to Fix**:
+- Text extending beyond boundaries
+- Figures overlapping with text
+- Font sizes too small
+- Poor contrast
+- Misalignment
+
+**Iteration**:
+1. Fix identified issues in source
+2. Regenerate PDF/presentation
+3. Convert to images again
+4. Re-inspect
+5. Repeat until clean
+
+### Stage 5: Practice and Refinement
+
+**Practice Schedule**:
+- Run 1: Rough draft (will run long)
+- Run 2: Smooth transitions
+- Run 3: Exact timing
+- Run 4: Final polish
+- Run 5+: Maintenance (day before, morning of)
+
+**What to Practice**:
+- Full talk with timer
+- Difficult explanations
+- Transitions between sections
+- Opening and closing (until flawless)
+- Anticipated questions
+
+**Refinement Based on Practice**:
+- Cut slides if running over
+- Expand explanations if unclear
+- Adjust wording for clarity
+- Mark timing checkpoints
+- Prepare backup slides
+
+### Stage 6: Final Preparation
+
+**Technical Checks**:
+- [ ] Multiple copies saved (laptop, cloud, USB)
+- [ ] Works on presentation computer
+- [ ] Adapters/cables available
+- [ ] Backup PDF version
+- [ ] Tested with projector (if possible)
+
+**Content Final**:
+- [ ] No typos or errors
+- [ ] All figures high quality
+- [ ] Slide numbers correct
+- [ ] Contact info on final slide
+- [ ] Backup slides ready
+
+**Delivery Prep**:
+- [ ] Notes prepared (if using)
+- [ ] Timer/phone ready
+- [ ] Water available
+- [ ] Business cards/handouts
+- [ ] Comfortable with material (3+ practices)
+
+## Integration with Other Skills
+
+**Research Lookup** (Critical for Scientific Presentations):
+- **Background development**: Search literature to build introduction context
+- **Citation gathering**: Find key papers to cite in your talk
+- **Gap identification**: Identify what's unknown to motivate research
+- **Prior work comparison**: Find papers to compare your results against
+- **Supporting evidence**: Locate literature supporting your interpretations
+- **Question preparation**: Find papers that might inform Q&A responses
+- **Always use research-lookup** when developing any scientific presentation to ensure proper context and citations
+
+**Scientific Writing**:
+- Convert paper content to presentation format
+- Extract key findings and simplify
+- Use same figures (but redesigned for slides)
+- Maintain consistent terminology
+
+**PPTX Skill**:
+- Use for PowerPoint creation and editing
+- Leverage scripts for template workflows
+- Use thumbnail generation for validation
+- Reference html2pptx for programmatic creation
+
+**Data Visualization**:
+- Create presentation-appropriate figures
+- Simplify complex visualizations
+- Ensure readability from distance
+- Use progressive disclosure
+
+## Common Pitfalls to Avoid
+
+### Content Mistakes
+
+**Dry, Boring Presentations** (CRITICAL TO AVOID):
+- Problem: Text-heavy slides with no visual interest, missing research context
+- Signs: All bullet points, no images, default templates, no citations
+- Solution:
+ - Use research-lookup to find 8-15 papers for credible context
+ - Add high-quality visuals to EVERY slide (figures, photos, diagrams, icons)
+ - Choose modern color palette reflecting your topic
+ - Vary slide layouts (not all bullet lists)
+ - Tell a story with visuals, use text sparingly
+
+**Too Much Content**:
+- Problem: Trying to include everything from paper
+- Solution: Focus on 1-2 key findings for short talks, show visually
+
+**Too Much Text**:
+- Problem: Full paragraphs on slides, dense bullet points, reading verbatim
+- Solution: 3-4 bullets with 4-6 words each, let visuals carry the message
+
+**Missing Research Context**:
+- Problem: No citations, claims without support, unclear positioning
+- Solution: Use research-lookup to find papers, cite 3-5 in intro, 3-5 in discussion
+
+**Poor Narrative**:
+- Problem: Jumping between topics, no clear story, no flow
+- Solution: Follow story arc, use visual transitions, maintain thread
+
+**Rushing Through Results**:
+- Problem: Brief methods, brief results, long discussion
+- Solution: Spend 40-50% of time on results, show data visually
+
+### Design Mistakes
+
+**Generic, Default Appearance**:
+- Problem: Using default PowerPoint/Beamer themes without customization, looks dated
+- Solution: Choose modern color palette, customize fonts/layouts, add visual personality
+
+**Text-Heavy, Visual-Poor**:
+- Problem: All bullet point slides, no images or graphics, boring to look at
+- Solution: Add figures, photos, diagrams, icons to EVERY slide, make visually interesting
+
+**Small Fonts**:
+- Problem: Body text <18pt, unreadable from back, looks unprofessional
+- Solution: 24-28pt for body (not just 18pt minimum), 36-44pt for titles
+
+**Low Contrast**:
+- Problem: Light text on light background, poor visibility, hard to read
+- Solution: High contrast (7:1 preferred, not just 4.5:1 minimum), test with contrast checker
+
+**Cluttered Slides**:
+- Problem: Too many elements, no white space, overwhelming
+- Solution: One idea per slide, 40-50% white space, generous spacing
+
+**Inconsistent Formatting**:
+- Problem: Different fonts, colors, layouts slide-to-slide, looks amateurish
+- Solution: Use master slides, maintain design system, professional consistency
+
+**Missing Visual Hierarchy**:
+- Problem: Everything same size and color, no emphasis, unclear focus
+- Solution: Size differences (titles large, body medium), color for emphasis, clear focal point
+
+### Timing Mistakes
+
+**Not Practicing**:
+- Problem: First time through is during presentation
+- Solution: Practice minimum 3 times with timer
+
+**No Time Checkpoints**:
+- Problem: Don't realize running behind until too late
+- Solution: Set 3-4 checkpoints, monitor throughout
+
+**Going Over Time**:
+- Problem: Extremely unprofessional, cuts into Q&A
+- Solution: Practice to exact time, prepare Plan B (slides to skip)
+
+**Skipping Conclusions**:
+- Problem: Running out of time, rush through or skip ending
+- Solution: Never skip conclusions, cut earlier content instead
+
+## Tools and Scripts
+
+### Nano Banana Pro Scripts
+
+**generate_slide_image.py** - Generate slides or visuals with AI:
+```bash
+# Full slide (for PDF workflow)
+python scripts/generate_slide_image.py "Title: Introduction\nContent: Key points" -o slide.png
+
+# Visual only (for PPT workflow)
+python scripts/generate_slide_image.py "Diagram description" -o figure.png --visual-only
+
+# Options:
+# -o, --output Output file path (required)
+# --visual-only Generate just the visual, not complete slide
+# --iterations N Max refinement iterations (default: 2)
+# -v, --verbose Verbose output
+```
+
+**slides_to_pdf.py** - Combine slide images into PDF:
+```bash
+# From glob pattern
+python scripts/slides_to_pdf.py slides/*.png -o presentation.pdf
+
+# From directory (sorted by filename)
+python scripts/slides_to_pdf.py slides/ -o presentation.pdf
+
+# Options:
+# -o, --output Output PDF path (required)
+# --dpi N PDF resolution (default: 150)
+# -v, --verbose Verbose output
+```
+
+### Validation Scripts
+
+**validate_presentation.py**:
+```bash
+python scripts/validate_presentation.py presentation.pdf --duration 15
+
+# Checks:
+# - Slide count vs. recommended range
+# - File size warnings
+# - Slide dimensions
+# - Font sizes (PowerPoint)
+# - Compilation (Beamer)
+```
+
+**pdf_to_images.py**:
+```bash
+python scripts/pdf_to_images.py presentation.pdf output/slide --dpi 150
+
+# Converts PDF to images for visual inspection
+# Supports: JPG, PNG
+# Adjustable DPI
+# Page range selection
+```
+
+### PPTX Skill Scripts
+
+From `document-skills/pptx/scripts/`:
+- `thumbnail.py`: Create thumbnail grids
+- `rearrange.py`: Duplicate and reorder slides
+- `inventory.py`: Extract text content
+- `replace.py`: Update text programmatically
+
+### External Tools
+
+**Recommended**:
+- PDF viewer: For reviewing presentations
+- Color contrast checker: WebAIM Contrast Checker
+- Color blindness simulator: Coblis
+- Timer app: For practice sessions
+- Screen recorder: For self-review
+
+## Reference Files
+
+Comprehensive guides for specific aspects:
+
+- **`references/presentation_structure.md`**: Detailed structure for all talk types, timing allocation, opening/closing strategies, transition techniques
+- **`references/slide_design_principles.md`**: Typography, color theory, layout, accessibility, visual hierarchy, design workflow
+- **`references/data_visualization_slides.md`**: Simplifying figures, chart types, progressive disclosure, common mistakes, recreation workflow
+- **`references/talk_types_guide.md`**: Specific guidance for conferences, seminars, defenses, grants, journal clubs, with examples
+- **`references/beamer_guide.md`**: Complete LaTeX Beamer documentation, themes, customization, advanced features, compilation
+- **`references/visual_review_workflow.md`**: PDF to images conversion, systematic inspection, issue documentation, iterative improvement
+
+## Assets
+
+### Templates
+
+- **`assets/beamer_template_conference.tex`**: 15-minute conference talk template
+- **`assets/beamer_template_seminar.tex`**: 45-minute academic seminar template
+- **`assets/beamer_template_defense.tex`**: Dissertation defense template
+
+### Guides
+
+- **`assets/powerpoint_design_guide.md`**: Complete PowerPoint design and implementation guide
+- **`assets/timing_guidelines.md`**: Comprehensive timing, pacing, and practice strategies
+
+## Quick Start Guide
+
+### For a 15-Minute Conference Talk (PDF Workflow - Recommended)
+
+1. **Research & Plan** (45 minutes):
+ - **Use research-lookup** to find 8-12 relevant papers for citations
+ - Build reference list (background, comparison studies)
+ - Outline content (intro → methods → 2-3 key results → conclusion)
+ - **Create detailed plan for each slide** (title, key points, visual elements)
+ - Target 15-18 slides
+
+2. **Generate Slides with Nano Banana Pro** (1-2 hours):
+
+ **Important: Use consistent formatting, attach previous slides, and include citations!**
+
+ ```bash
+ # Title slide (establishes style - default author: K-Dense)
+ python scripts/generate_slide_image.py "Title slide: 'Your Research Title'. Conference name, K-Dense. FORMATTING GOAL: [your color scheme], minimal professional design, no decorative elements, clean and corporate." -o slides/01_title.png
+
+ # Introduction slide with citations (attach previous for consistency)
+ python scripts/generate_slide_image.py "Slide titled 'Why This Matters'. Three key points with simple icons. CITATIONS: Include at bottom: (Smith et al., 2023; Jones et al., 2024). FORMATTING GOAL: Match attached slide style exactly." -o slides/02_intro.png --attach slides/01_title.png
+
+ # Continue for each slide (always attach previous, include citations where relevant)
+ python scripts/generate_slide_image.py "Slide titled 'Methods'. Key methodology points. CITATIONS: (Based on Chen et al., 2022). FORMATTING GOAL: Match attached slide style exactly." -o slides/03_methods.png --attach slides/02_intro.png
+
+ # Combine to PDF
+ python scripts/slides_to_pdf.py slides/*.png -o presentation.pdf
+ ```
+
+3. **Review & Iterate** (30 minutes):
+ - Open the PDF and review each slide
+ - Regenerate any slides that need improvement
+ - Re-combine to PDF
+
+4. **Practice** (2-3 hours):
+ - Practice 3-5 times with timer
+ - Aim for 13-14 minutes (leave buffer)
+ - Record yourself, watch playback
+ - **Prepare for questions** (use research-lookup to anticipate)
+
+5. **Finalize** (30 minutes):
+ - Generate backup/appendix slides if needed
+ - Save multiple copies
+ - Test on presentation computer
+
+Total time: ~5-6 hours for quality AI-generated presentation
+
+### Alternative: PowerPoint Workflow
+
+If you need editable slides (e.g., for company templates):
+
+1. **Plan slides** as above
+2. **Generate visuals** with `--visual-only` flag:
+ ```bash
+ python scripts/generate_slide_image.py "diagram description" -o figures/fig1.png --visual-only
+ ```
+3. **Build PPTX** using the PPTX skill with generated images
+4. **Add text** separately using PPTX workflow
+
+See `document-skills/pptx/SKILL.md` for complete PowerPoint workflow.
+
+## Summary: Key Principles
+
+1. **Visual-First Design**: Every slide needs strong visual element (figure, image, diagram) - avoid text-only slides
+2. **Research-Backed**: Use research-lookup to find 8-15 papers, cite 3-5 in intro, 3-5 in discussion
+3. **Modern Aesthetics**: Choose contemporary color palette matching topic, not default themes
+4. **Minimal Text**: 3-4 bullets, 4-6 words each (24-28pt font), let visuals tell story
+5. **Structure**: Follow story arc, spend 40-50% on results
+6. **High Contrast**: 7:1 preferred for professional appearance
+7. **Varied Layouts**: Mix full-figure, two-column, visual overlays (not all bullets)
+8. **Timing**: Practice 3-5 times, ~1 slide per minute, never skip conclusions
+9. **Validation**: Visual review workflow to catch overflow and overlap
+10. **White Space**: 40-50% of slide empty for visual breathing room
+
+**Remember**:
+- **Boring = Forgotten**: Dry, text-heavy slides fail to communicate your science
+- **Visual + Research = Impact**: Combine compelling visuals with research-backed context
+- **You are the presentation, slides are visual support**: They should enhance, not replace your talk
diff --git a/scientific-skills/scientific-slides/assets/beamer_template_conference.tex b/scientific-skills/scientific-slides/assets/beamer_template_conference.tex
new file mode 100644
index 0000000..831373d
--- /dev/null
+++ b/scientific-skills/scientific-slides/assets/beamer_template_conference.tex
@@ -0,0 +1,407 @@
+\documentclass[aspectratio=169,11pt]{beamer}
+
+% Encoding
+\usepackage[utf8]{inputenc}
+\usepackage[T1]{fontenc}
+
+% Theme and colors
+\usetheme{Madrid}
+\usecolortheme{beaver}
+
+% Remove navigation symbols
+\setbeamertemplate{navigation symbols}{}
+
+% Page numbers in footer
+\setbeamertemplate{footline}[frame number]
+
+% Graphics
+\usepackage{graphicx}
+\graphicspath{{./figures/}}
+
+% Math
+\usepackage{amsmath, amssymb}
+
+% Tables
+\usepackage{booktabs}
+
+% Citations
+\usepackage[style=authoryear,maxcitenames=2,backend=biber]{biblatex}
+\addbibresource{references.bib}
+\renewcommand*{\bibfont}{\tiny}
+
+% Colors (customize these)
+\definecolor{primaryblue}{RGB}{0,90,156}
+\definecolor{secondaryorange}{RGB}{228,108,10}
+
+% Custom colors for theme elements
+\setbeamercolor{structure}{fg=primaryblue}
+\setbeamercolor{title}{fg=primaryblue}
+\setbeamercolor{frametitle}{fg=primaryblue}
+\setbeamercolor{block title}{fg=white,bg=primaryblue}
+
+% Title page information
+\title[Short Title]{Full Presentation Title:\\Descriptive and Specific}
+\subtitle{Optional Subtitle}
+\author[Author Name]{Author Name\inst{1}}
+\institute[Institution]{
+ \inst{1}
+ Department of XYZ\\
+ University Name\\
+ \vspace{0.2cm}
+ \texttt{email@university.edu}
+}
+\date{Conference Name\\Month Day, Year}
+
+% Optional: Logo
+% \logo{\includegraphics[height=0.8cm]{logo.png}}
+
+\begin{document}
+
+% Title slide
+\begin{frame}[plain]
+ \titlepage
+\end{frame}
+
+% Outline (optional for conference talks)
+% \begin{frame}{Outline}
+% \tableofcontents
+% \end{frame}
+
+%==============================================
+% INTRODUCTION
+%==============================================
+
+\section{Introduction}
+
+\begin{frame}{The Problem}
+ \begin{itemize}
+ \item<1-> Start with a compelling hook or problem statement
+ \item<2-> Establish why this research matters
+ \item<3-> Set up the knowledge gap
+ \item<4-> Preview your contribution
+ \end{itemize}
+
+ \vfill
+
+ \uncover<4->{
+ \begin{block}{Research Question}
+ State your specific research question or hypothesis clearly
+ \end{block}
+ }
+\end{frame}
+
+\begin{frame}{Background and Context}
+ \begin{columns}[T]
+
+ \begin{column}{0.5\textwidth}
+ \textbf{Prior Work:}
+ \begin{itemize}
+ \item Key finding 1 \cite{reference1}
+ \item Key finding 2 \cite{reference2}
+ \item Knowledge gap identified
+ \end{itemize}
+ \end{column}
+
+ \begin{column}{0.5\textwidth}
+ % Example figure
+ \begin{figure}
+ \centering
+ % \includegraphics[width=\textwidth]{context_figure.pdf}
+ \framebox[0.9\textwidth][c]{[Figure: Context or Prior Work]}
+ \caption{Illustration of the problem}
+ \end{figure}
+ \end{column}
+
+ \end{columns}
+\end{frame}
+
+%==============================================
+% METHODS
+%==============================================
+
+\section{Methods}
+
+\begin{frame}{Study Design}
+ \begin{columns}[T]
+
+ \begin{column}{0.6\textwidth}
+ \textbf{Approach:}
+ \begin{itemize}
+ \item Study type/design
+ \item Participants/sample (n = X)
+ \item Key procedures
+ \item Analysis strategy
+ \end{itemize}
+
+ \vspace{0.5cm}
+
+ \begin{alertblock}{Key Innovation}
+ Highlight what makes your approach novel or improved
+ \end{alertblock}
+ \end{column}
+
+ \begin{column}{0.4\textwidth}
+ \begin{figure}
+ \centering
+ % \includegraphics[width=\textwidth]{methods_schematic.pdf}
+ \framebox[0.9\textwidth][c]{[Methods Diagram]}
+ \caption{Experimental design}
+ \end{figure}
+ \end{column}
+
+ \end{columns}
+\end{frame}
+
+\begin{frame}{Analysis Overview}
+ \begin{itemize}
+ \item \textbf{Primary outcome:} What you measured
+ \item \textbf{Statistical approach:} Tests used
+ \item \textbf{Sample size justification:} Power analysis (if applicable)
+ \item \textbf{Software:} Tools and versions used
+ \end{itemize}
+
+ \vspace{0.5cm}
+
+ % Optional: Show key equation
+ \begin{exampleblock}{Key Model}
+ \begin{equation}
+ Y = \beta_0 + \beta_1 X_1 + \beta_2 X_2 + \epsilon
+ \end{equation}
+ \end{exampleblock}
+\end{frame}
+
+%==============================================
+% RESULTS
+%==============================================
+
+\section{Results}
+
+\begin{frame}{Main Finding 1}
+ \begin{figure}
+ \centering
+ % \includegraphics[width=0.85\textwidth]{result1.pdf}
+ \framebox[0.8\textwidth][c]{[Figure: Main Result 1]}
+ \caption{Primary outcome showing significant effect ($p < 0.001$)}
+ \end{figure}
+
+ \vspace{0.3cm}
+
+ \begin{itemize}
+ \item<2-> Key observation: Description of pattern
+ \item<3-> Statistical result: Effect size and significance
+ \item<4-> Interpretation: What this means
+ \end{itemize}
+\end{frame}
+
+\begin{frame}{Main Finding 2}
+ \begin{columns}[c]
+
+ \begin{column}{0.5\textwidth}
+ \begin{figure}
+ \centering
+ % \includegraphics[width=\textwidth]{result2a.pdf}
+ \framebox[0.9\textwidth][c]{[Result 2A]}
+ \caption{Condition A}
+ \end{figure}
+ \end{column}
+
+ \begin{column}{0.5\textwidth}
+ \begin{figure}
+ \centering
+ % \includegraphics[width=\textwidth]{result2b.pdf}
+ \framebox[0.9\textwidth][c]{[Result 2B]}
+ \caption{Condition B}
+ \end{figure}
+ \end{column}
+
+ \end{columns}
+
+ \vspace{0.5cm}
+
+ \begin{itemize}
+ \item Comparison shows: Key difference
+ \item Statistical test: $t(50) = 3.4, p = 0.001$
+ \end{itemize}
+\end{frame}
+
+\begin{frame}{Supporting Evidence}
+ \begin{table}
+ \centering
+ \caption{Summary of key results across conditions}
+ \begin{tabular}{lccc}
+ \toprule
+ \textbf{Condition} & \textbf{Metric 1} & \textbf{Metric 2} & \textbf{$p$-value} \\
+ \midrule
+ Control & 45.2 $\pm$ 3.1 & 0.65 & --- \\
+ Treatment & 67.8 $\pm$ 2.9 & 0.82 & $< 0.001$ \\
+ \bottomrule
+ \end{tabular}
+ \end{table}
+
+ \vspace{0.5cm}
+
+ \begin{itemize}
+ \item Consistent pattern across multiple metrics
+ \item Effect robust to various controls
+ \end{itemize}
+\end{frame}
+
+%==============================================
+% DISCUSSION
+%==============================================
+
+\section{Discussion}
+
+\begin{frame}{Interpretation}
+ \textbf{Key Findings:}
+ \begin{enumerate}
+ \item First main result and its significance
+ \item Second main result and its implications
+ \item Supporting evidence strengthens conclusions
+ \end{enumerate}
+
+ \vspace{0.5cm}
+
+ \textbf{Relation to Prior Work:}
+ \begin{itemize}
+ \item Consistent with \cite{reference1}
+ \item Extends beyond \cite{reference2}
+ \item Resolves controversy from \cite{reference3}
+ \end{itemize}
+\end{frame}
+
+\begin{frame}{Implications and Impact}
+ \begin{columns}[T]
+
+ \begin{column}{0.5\textwidth}
+ \textbf{Scientific Impact:}
+ \begin{itemize}
+ \item Advances understanding of X
+ \item Provides new framework for Y
+ \item Opens avenue for Z research
+ \end{itemize}
+ \end{column}
+
+ \begin{column}{0.5\textwidth}
+ \textbf{Practical Applications:}
+ \begin{itemize}
+ \item Clinical relevance
+ \item Policy implications
+ \item Technological applications
+ \end{itemize}
+ \end{column}
+
+ \end{columns}
+
+ \vspace{0.5cm}
+
+ \begin{block}{Limitations}
+ \begin{itemize}
+ \item Acknowledge key limitation 1
+ \item Note limitation 2 and how future work addresses it
+ \end{itemize}
+ \end{block}
+\end{frame}
+
+%==============================================
+% CONCLUSION
+%==============================================
+
+\section{Conclusion}
+
+\begin{frame}{Conclusions}
+ \begin{block}{Key Takeaways}
+ \begin{enumerate}
+ \item \textbf{First main finding:} Brief statement
+ \item \textbf{Second main finding:} Brief statement
+ \item \textbf{Broader impact:} Significance for field
+ \end{enumerate}
+ \end{block}
+
+ \vspace{0.5cm}
+
+ \textbf{Future Directions:}
+ \begin{itemize}
+ \item Extend to population/context Y
+ \item Investigate mechanism Z
+ \item Collaborate with domain X
+ \end{itemize}
+\end{frame}
+
+\begin{frame}[plain]
+ \begin{center}
+ {\Large \textbf{Thank You}}
+
+ \vspace{1cm}
+
+ {\large Questions?}
+
+ \vspace{1cm}
+
+ \begin{columns}
+ \begin{column}{0.5\textwidth}
+ \textbf{Contact:}\\
+ Author Name\\
+ \texttt{email@university.edu}\\
+ \url{https://yourwebsite.edu}
+ \end{column}
+
+ \begin{column}{0.5\textwidth}
+ % Optional: QR code to paper or website
+ % \includegraphics[width=3cm]{qrcode.png}\\
+ % {\small Scan for paper/code}
+ \end{column}
+ \end{columns}
+
+ \vspace{0.5cm}
+
+ {\footnotesize
+ Funding: Grant Agency Award \#12345\\
+ Collaborators: Colleague 1, Colleague 2
+ }
+ \end{center}
+\end{frame}
+
+%==============================================
+% BACKUP SLIDES
+%==============================================
+
+\appendix
+
+\begin{frame}{Backup: Additional Data}
+ \begin{figure}
+ \centering
+ % \includegraphics[width=0.7\textwidth]{supplementary_figure.pdf}
+ \framebox[0.6\textwidth][c]{[Supplementary Analysis]}
+ \caption{Additional analysis for questions}
+ \end{figure}
+\end{frame}
+
+\begin{frame}{Backup: Methodological Details}
+ \textbf{Detailed Procedure:}
+ \begin{itemize}
+ \item Step-by-step protocol details
+ \item Equipment specifications
+ \item Parameter settings
+ \item Quality control measures
+ \end{itemize}
+
+ \vspace{0.5cm}
+
+ \textbf{Alternative Analyses:}
+ \begin{itemize}
+ \item Sensitivity analysis results
+ \item Different statistical approaches
+ \item Subgroup analyses
+ \end{itemize}
+\end{frame}
+
+%==============================================
+% REFERENCES
+%==============================================
+
+\begin{frame}[allowframebreaks]{References}
+ \printbibliography
+\end{frame}
+
+\end{document}
diff --git a/scientific-skills/scientific-slides/assets/beamer_template_defense.tex b/scientific-skills/scientific-slides/assets/beamer_template_defense.tex
new file mode 100644
index 0000000..8f6c14f
--- /dev/null
+++ b/scientific-skills/scientific-slides/assets/beamer_template_defense.tex
@@ -0,0 +1,906 @@
+\documentclass[aspectratio=169,12pt]{beamer}
+
+% Encoding
+\usepackage[utf8]{inputenc}
+\usepackage[T1]{fontenc}
+
+% Theme - professional and formal for defense
+\usetheme{Boadilla}
+\usecolortheme{whale}
+
+% Remove navigation symbols
+\setbeamertemplate{navigation symbols}{}
+
+% Page numbers with total
+\setbeamertemplate{footline}{
+ \leavevmode%
+ \hbox{%
+ \begin{beamercolorbox}[wd=.333333\paperwidth,ht=2.25ex,dp=1ex,center]{author in head/foot}%
+ \usebeamerfont{author in head/foot}\insertshortauthor
+ \end{beamercolorbox}%
+ \begin{beamercolorbox}[wd=.333333\paperwidth,ht=2.25ex,dp=1ex,center]{title in head/foot}%
+ \usebeamerfont{title in head/foot}\insertshorttitle
+ \end{beamercolorbox}%
+ \begin{beamercolorbox}[wd=.333333\paperwidth,ht=2.25ex,dp=1ex,right]{date in head/foot}%
+ \usebeamerfont{date in head/foot}\insertshortdate{}\hspace*{2em}
+ \insertframenumber{} / \inserttotalframenumber\hspace*{2ex}
+ \end{beamercolorbox}}%
+ \vskip0pt%
+}
+
+% Section pages
+\AtBeginSection[]{
+ \begin{frame}
+ \vfill
+ \centering
+ \begin{beamercolorbox}[sep=8pt,center,shadow=true,rounded=true]{title}
+ \usebeamerfont{title}\insertsectionhead\par%
+ \end{beamercolorbox}
+ \vfill
+ \end{frame}
+}
+
+% Graphics
+\usepackage{graphicx}
+\graphicspath{{./figures/}}
+
+% Math
+\usepackage{amsmath, amssymb, amsthm}
+
+% Tables
+\usepackage{booktabs}
+\usepackage{multirow}
+
+% Citations
+\usepackage[style=authoryear,maxcitenames=2,backend=biber]{biblatex}
+\addbibresource{references.bib}
+\renewcommand*{\bibfont}{\scriptsize}
+
+% Custom colors - conservative for formal defense
+\definecolor{universityblue}{RGB}{0,60,113}
+\definecolor{accentgold}{RGB}{179,136,12}
+
+\setbeamercolor{structure}{fg=universityblue}
+\setbeamercolor{title}{fg=universityblue}
+\setbeamercolor{frametitle}{fg=universityblue}
+\setbeamercolor{block title}{fg=white,bg=universityblue}
+
+% Title page information
+\title[Dissertation Defense]{Title of Your Dissertation:\\Comprehensive and Descriptive}
+\subtitle{Dissertation Defense}
+\author[Your Name]{Your Name, M.S.\\
+ \vspace{0.3cm}
+ Doctoral Candidate\\
+ Department of Your Field}
+\institute[University]{
+ University Name\\
+ \vspace{0.3cm}
+ \textbf{Dissertation Committee:}\\
+ Prof. Advisor Name (Chair)\\
+ Prof. Committee Member 2\\
+ Prof. Committee Member 3\\
+ Prof. Committee Member 4\\
+ Prof. External Member
+}
+\date{\today}
+
+% University logo
+% \logo{\includegraphics[height=0.8cm]{university_logo.png}}
+
+\begin{document}
+
+% Title slide
+\begin{frame}[plain]
+ \titlepage
+\end{frame}
+
+% Committee and acknowledgments
+\begin{frame}{Dissertation Committee}
+ \begin{center}
+ \textbf{Committee Chair:}\\
+ Prof. Advisor Name, PhD\\
+ Department of Your Field
+
+ \vspace{0.5cm}
+
+ \textbf{Committee Members:}\\
+ Prof. Member 2, PhD -- Department of Related Field\\
+ Prof. Member 3, PhD -- Department of Your Field\\
+ Prof. Member 4, PhD -- Department of Statistics\\
+ Prof. External Member, PhD -- External Institution
+
+ \vspace{0.8cm}
+
+ \textit{Thank you to my committee for your guidance, support, and invaluable feedback throughout this dissertation research.}
+ \end{center}
+\end{frame}
+
+% Overview
+\begin{frame}{Dissertation Overview}
+ \begin{exampleblock}{Central Thesis}
+ Brief statement of the overarching thesis or argument that ties together all dissertation studies.
+ \end{exampleblock}
+
+ \vspace{0.5cm}
+
+ \textbf{Dissertation Structure:}
+ \begin{itemize}
+ \item \textbf{Chapter 1:} Introduction and theoretical framework
+ \item \textbf{Chapter 2:} Study 1 -- [Brief description]
+ \item \textbf{Chapter 3:} Study 2 -- [Brief description]
+ \item \textbf{Chapter 4:} Study 3 -- [Brief description]
+ \item \textbf{Chapter 5:} General discussion and conclusions
+ \end{itemize}
+\end{frame}
+
+\begin{frame}{Outline}
+ \tableofcontents
+\end{frame}
+
+%==============================================
+% CHAPTER 1: INTRODUCTION
+%==============================================
+
+\section{Chapter 1: Introduction and Background}
+
+\begin{frame}{The Problem}
+ \begin{columns}[T]
+
+ \begin{column}{0.5\textwidth}
+ \textbf{Real-World Significance:}
+ \begin{itemize}
+ \item Prevalence: X affects Y million people
+ \item Impact: Costs \$Z billion annually
+ \item Need: Current solutions inadequate
+ \item Opportunity: New approach needed
+ \end{itemize}
+ \end{column}
+
+ \begin{column}{0.5\textwidth}
+ \begin{figure}
+ \centering
+ % \includegraphics[width=\textwidth]{problem_figure.pdf}
+ \framebox[0.9\textwidth][c]{[Problem Illustration]}
+ \caption{Visualization of the problem}
+ \end{figure}
+ \end{column}
+
+ \end{columns}
+
+ \vspace{0.5cm}
+
+ \begin{alertblock}{Central Question}
+ How can we understand and address this critical challenge using novel theoretical framework X?
+ \end{alertblock}
+\end{frame}
+
+\subsection{Theoretical Framework}
+
+\begin{frame}{Theoretical Background}
+ \textbf{Historical Development:}
+ \begin{itemize}
+ \item \textbf{Early theories (1950s-1980s):} Established foundational concepts \cite{foundational1975}
+ \item \textbf{Modern frameworks (1990s-2000s):} Refined understanding \cite{refinement2000}
+ \item \textbf{Recent advances (2010s-present):} Novel approaches emerge \cite{recent2018}
+ \end{itemize}
+
+ \vspace{0.5cm}
+
+ \textbf{Key Theoretical Constructs:}
+ \begin{enumerate}
+ \item \textbf{Construct A:} Describes mechanism X
+ \item \textbf{Construct B:} Explains process Y
+ \item \textbf{Construct C:} Predicts outcome Z
+ \end{enumerate}
+
+ \vspace{0.5cm}
+
+ \begin{block}{Theoretical Gap}
+ Existing theories fail to account for interaction between A and B under conditions C
+ \end{block}
+\end{frame}
+
+\begin{frame}{Literature Review: What We Know}
+ \begin{columns}[T]
+
+ \begin{column}{0.5\textwidth}
+ \textbf{Established Findings:}
+ \begin{itemize}
+ \item Finding 1: Well-replicated
+ \item Finding 2: Meta-analytically supported
+ \item Finding 3: Cross-culturally validated
+ \item Finding 4: Mechanism partially understood
+ \end{itemize}
+
+ \vspace{0.3cm}
+
+ \textbf{Methodological Advances:}
+ \begin{itemize}
+ \item Technique A: Improved measurement
+ \item Technique B: Better controls
+ \item Technique C: Novel analysis
+ \end{itemize}
+ \end{column}
+
+ \begin{column}{0.5\textwidth}
+ \textbf{Remaining Questions:}
+ \begin{itemize}
+ \item[\alert{?}] How does A interact with B?
+ \item[\alert{?}] What role does C play?
+ \item[\alert{?}] Does effect generalize to D?
+ \item[\alert{?}] What are boundary conditions?
+ \end{itemize}
+
+ \vspace{0.3cm}
+
+ \begin{exampleblock}{Dissertation Focus}
+ This dissertation addresses these gaps through three complementary studies
+ \end{exampleblock}
+ \end{column}
+
+ \end{columns}
+\end{frame}
+
+\subsection{Dissertation Aims}
+
+\begin{frame}{Overarching Goals and Specific Aims}
+ \begin{block}{Overall Dissertation Goal}
+ To develop and test a comprehensive framework for understanding how X influences Y through mechanisms A, B, and C across contexts.
+ \end{block}
+
+ \vspace{0.5cm}
+
+ \textbf{Specific Aims:}
+
+ \begin{enumerate}
+ \item \textbf{Study 1:} Establish relationship between X and Y
+ \begin{itemize}
+ \item Method: Cross-sectional survey (n = 500)
+ \item Goal: Characterize X→Y relationship
+ \end{itemize}
+
+ \item \textbf{Study 2:} Identify mediating mechanisms A and B
+ \begin{itemize}
+ \item Method: Longitudinal study (n = 250, 3 waves)
+ \item Goal: Test mediation and temporal precedence
+ \end{itemize}
+
+ \item \textbf{Study 3:} Test causal model and generalizability
+ \begin{itemize}
+ \item Method: Experimental manipulation (n = 180)
+ \item Goal: Establish causality and boundary conditions
+ \end{itemize}
+ \end{enumerate}
+\end{frame}
+
+%==============================================
+% CHAPTER 2: STUDY 1
+%==============================================
+
+\section{Chapter 2: Study 1}
+
+\begin{frame}{Study 1: Overview}
+ \begin{columns}[T]
+
+ \begin{column}{0.5\textwidth}
+ \textbf{Research Question:}\\
+ Does X predict Y, and is this relationship moderated by individual difference Z?
+
+ \vspace{0.5cm}
+
+ \textbf{Hypotheses:}
+ \begin{enumerate}
+ \item H1: X positively predicts Y
+ \item H2: Z moderates X→Y
+ \item H3: Effect varies by demographic factors
+ \end{enumerate}
+ \end{column}
+
+ \begin{column}{0.5\textwidth}
+ \textbf{Design:}
+ \begin{itemize}
+ \item Cross-sectional survey
+ \item N = 500 participants
+ \item Online recruitment
+ \item Power: .95 for medium effects
+ \end{itemize}
+
+ \vspace{0.3cm}
+
+ \textbf{Measures:}
+ \begin{itemize}
+ \item X: Validated scale (α = .89)
+ \item Y: Performance measure
+ \item Z: Individual difference
+ \item Controls: Demographics
+ \end{itemize}
+ \end{column}
+
+ \end{columns}
+\end{frame}
+
+\begin{frame}{Study 1: Methods}
+ \textbf{Participants:}
+ \begin{itemize}
+ \item N = 500 (62\% female; Age: $M = 34.2$, $SD = 11.5$)
+ \item Recruited via university participant pool and online platforms
+ \item Inclusion: Ages 18-65, fluent in English
+ \item Exclusion: Prior participation in related studies
+ \end{itemize}
+
+ \vspace{0.5cm}
+
+ \textbf{Procedure:}
+ \begin{enumerate}
+ \item Informed consent and demographics
+ \item Battery of questionnaires (45 minutes)
+ \item Debriefing and compensation
+ \end{enumerate}
+
+ \vspace{0.5cm}
+
+ \textbf{Analysis:}
+ \begin{itemize}
+ \item Hierarchical regression for H1 and H2
+ \item Moderation analysis using PROCESS macro
+ \item Subgroup analyses for H3
+ \end{itemize}
+\end{frame}
+
+\begin{frame}{Study 1: Results}
+ \begin{columns}[c]
+
+ \begin{column}{0.6\textwidth}
+ \begin{figure}
+ \centering
+ % \includegraphics[width=\textwidth]{study1_main_result.pdf}
+ \framebox[0.9\textwidth][c]{[Study 1: Main Result]}
+ \caption{X predicts Y ($\beta = 0.47$, $p < .001$, $R^2 = .22$)}
+ \end{figure}
+ \end{column}
+
+ \begin{column}{0.4\textwidth}
+ \textbf{Key Findings:}
+ \begin{itemize}
+ \item H1 supported: Strong X→Y relationship
+ \item H2 supported: Z moderates effect
+ \item H3 partially supported: Age effects found
+ \end{itemize}
+
+ \vspace{0.5cm}
+
+ \begin{block}{Conclusion}
+ Study 1 establishes foundational X→Y relationship
+ \end{block}
+ \end{column}
+
+ \end{columns}
+\end{frame}
+
+%==============================================
+% CHAPTER 3: STUDY 2
+%==============================================
+
+\section{Chapter 3: Study 2}
+
+\begin{frame}{Study 2: Overview}
+ \begin{exampleblock}{Research Question}
+ What mechanisms (A and B) mediate the X→Y relationship, and what is the temporal ordering?
+ \end{exampleblock}
+
+ \vspace{0.5cm}
+
+ \textbf{Rationale:}
+ \begin{itemize}
+ \item Study 1 showed X→Y relationship exists
+ \item Need to identify mediating processes
+ \item Longitudinal design establishes temporal precedence
+ \item Tests proposed theoretical model
+ \end{itemize}
+
+ \vspace{0.5cm}
+
+ \textbf{Design:}
+ \begin{itemize}
+ \item Three-wave longitudinal study
+ \item N = 250, assessments 6 months apart
+ \item Measures: X (T1), A and B (T2), Y (T3)
+ \item Analysis: Cross-lagged panel model, mediation
+ \end{itemize}
+\end{frame}
+
+\begin{frame}{Study 2: Methods}
+ \begin{columns}[T]
+
+ \begin{column}{0.5\textwidth}
+ \textbf{Sample:}
+ \begin{itemize}
+ \item N = 250 at baseline
+ \item Retention: 88\% at T2, 82\% at T3
+ \item Age: $M = 36.4$, $SD = 12.1$
+ \item 58\% female, diverse sample
+ \end{itemize}
+
+ \vspace{0.5cm}
+
+ \textbf{Timeline:}
+ \begin{itemize}
+ \item T1 (baseline): X measured
+ \item T2 (+6 months): A, B measured
+ \item T3 (+12 months): Y measured
+ \end{itemize}
+ \end{column}
+
+ \begin{column}{0.5\textwidth}
+ \begin{figure}
+ \centering
+ % \includegraphics[width=\textwidth]{study2_design.pdf}
+ \framebox[0.9\textwidth][c]{[Longitudinal Design]}
+ \caption{Three-wave design with proposed mediation model}
+ \end{figure}
+ \end{column}
+
+ \end{columns}
+
+ \vspace{0.5cm}
+
+ \textbf{Analysis:}
+ \begin{itemize}
+ \item Structural equation modeling for mediation
+ \item Cross-lagged panel model for temporal precedence
+ \item Missing data handled via FIML
+ \end{itemize}
+\end{frame}
+
+\begin{frame}{Study 2: Results}
+ \begin{figure}
+ \centering
+ % \includegraphics[width=0.8\textwidth]{study2_mediation.pdf}
+ \framebox[0.75\textwidth][c]{[Mediation Model with Path Coefficients]}
+ \caption{Serial mediation: X → A → B → Y}
+ \end{figure}
+
+ \vspace{0.5cm}
+
+ \textbf{Path Coefficients:}
+ \begin{itemize}
+ \item X → A: $\beta = 0.42$, $p < .001$
+ \item A → B: $\beta = 0.35$, $p < .001$
+ \item B → Y: $\beta = 0.38$, $p < .001$
+ \item X → Y (direct): $\beta = 0.18$, $p = .032$
+ \item Indirect effect: $\beta = 0.29$, 95\% CI [0.19, 0.41]
+ \end{itemize}
+
+ \alert{61\% of total effect mediated by A→B pathway}
+\end{frame}
+
+%==============================================
+% CHAPTER 4: STUDY 3
+%==============================================
+
+\section{Chapter 4: Study 3}
+
+\begin{frame}{Study 3: Overview}
+ \begin{alertblock}{Research Question}
+ Can we establish causality by experimentally manipulating X, and does the effect generalize across contexts?
+ \end{alertblock}
+
+ \vspace{0.5cm}
+
+ \textbf{Motivation:}
+ \begin{itemize}
+ \item Studies 1-2 showed correlational evidence
+ \item Need experimental test for causality
+ \item Test generalizability to applied context
+ \item Examine boundary conditions
+ \end{itemize}
+
+ \vspace{0.5cm}
+
+ \textbf{Design:}
+ \begin{itemize}
+ \item 2 (X: low vs. high) × 2 (Context: lab vs. field) factorial
+ \item N = 180 (45 per condition)
+ \item Random assignment to conditions
+ \item Outcome: Y measured post-manipulation
+ \end{itemize}
+\end{frame}
+
+\begin{frame}{Study 3: Methods}
+ \textbf{Experimental Manipulation:}
+ \begin{itemize}
+ \item \textbf{Low X condition:} Control procedure
+ \item \textbf{High X condition:} Experimental manipulation designed to increase X
+ \item Manipulation check: Successful ($t(178) = 8.92$, $p < .001$, $d = 1.34$)
+ \end{itemize}
+
+ \vspace{0.5cm}
+
+ \textbf{Contexts:}
+ \begin{itemize}
+ \item \textbf{Lab context:} Controlled laboratory setting (original)
+ \item \textbf{Field context:} Applied real-world setting (generalization test)
+ \end{itemize}
+
+ \vspace{0.5cm}
+
+ \textbf{Measures:}
+ \begin{itemize}
+ \item Primary outcome Y (same as Studies 1-2)
+ \item Mediators A and B
+ \item Moderator Z
+ \item Potential confounds
+ \end{itemize}
+\end{frame}
+
+\begin{frame}{Study 3: Results}
+ \begin{columns}[T]
+
+ \begin{column}{0.5\textwidth}
+ \begin{figure}
+ \centering
+ % \includegraphics[width=\textwidth]{study3_results.pdf}
+ \framebox[0.9\textwidth][c]{[Experimental Results]}
+ \caption{Main effect of X on Y}
+ \end{figure}
+ \end{column}
+
+ \begin{column}{0.5\textwidth}
+ \textbf{ANOVA Results:}
+ \begin{itemize}
+ \item Main effect of X: $F(1,176) = 45.2$, $p < .001$, $\eta^2_p = .20$
+ \item Main effect of Context: $F(1,176) = 2.1$, $p = .15$
+ \item X × Context: $F(1,176) = 0.8$, $p = .38$
+ \end{itemize}
+
+ \vspace{0.5cm}
+
+ \begin{block}{Key Finding}
+ Causal effect of X on Y confirmed; generalizes across contexts
+ \end{block}
+ \end{column}
+
+ \end{columns}
+
+ \vspace{0.5cm}
+
+ \textbf{Mediation:} Experimental mediation analysis confirmed A and B as mechanisms
+\end{frame}
+
+%==============================================
+% CHAPTER 5: GENERAL DISCUSSION
+%==============================================
+
+\section{Chapter 5: General Discussion}
+
+\begin{frame}{Synthesis Across Studies}
+ \begin{table}
+ \centering
+ \caption{Summary of findings across three studies}
+ \small
+ \begin{tabular}{lccc}
+ \toprule
+ \textbf{Finding} & \textbf{Study 1} & \textbf{Study 2} & \textbf{Study 3} \\
+ \midrule
+ X → Y relationship & Yes & Yes & Yes (causal) \\
+ Mediation by A & --- & Yes & Yes \\
+ Mediation by B & --- & Yes & Yes \\
+ Moderation by Z & Yes & Yes & Yes \\
+ Generalization & --- & --- & Yes \\
+ \bottomrule
+ \end{tabular}
+ \end{table}
+
+ \vspace{0.5cm}
+
+ \textbf{Convergent Evidence:}
+ \begin{itemize}
+ \item Robust X→Y relationship across designs and samples
+ \item Consistent mediation by A→B pathway
+ \item Moderation by Z replicated
+ \item Effects generalize from lab to field
+ \end{itemize}
+\end{frame}
+
+\begin{frame}{Theoretical Contributions}
+ \begin{exampleblock}{Novel Theoretical Framework}
+ This dissertation proposes and validates the XYZ Model, which integrates constructs A, B, and C to explain how X influences Y.
+ \end{exampleblock}
+
+ \vspace{0.5cm}
+
+ \textbf{Specific Contributions:}
+ \begin{enumerate}
+ \item \textbf{Integration:} Bridges previously separate literatures on A and B
+ \item \textbf{Mechanism:} Identifies A→B as key mediating pathway
+ \item \textbf{Boundary conditions:} Specifies role of moderator Z
+ \item \textbf{Generalizability:} Shows effects across contexts
+ \item \textbf{Causality:} Establishes X as causal factor
+ \end{enumerate}
+
+ \vspace{0.5cm}
+
+ \textbf{Advances Beyond Prior Work:}
+ \begin{itemize}
+ \item More comprehensive than Theory 1 \cite{theory1}
+ \item Resolves contradictions between Studies A and B
+ \item Provides testable predictions for future research
+ \end{itemize}
+\end{frame}
+
+\begin{frame}{Practical Implications}
+ \begin{columns}[T]
+
+ \begin{column}{0.5\textwidth}
+ \textbf{Clinical Applications:}
+ \begin{itemize}
+ \item Assessment: Screen for X
+ \item Intervention target: Increase A and B
+ \item Tailoring: Consider moderator Z
+ \item Outcome: Expect improvement in Y
+ \end{itemize}
+
+ \vspace{0.5cm}
+
+ \textbf{Implementation:}
+ \begin{itemize}
+ \item Feasibility demonstrated in field study
+ \item Scalable to larger populations
+ \item Cost-effective approach
+ \end{itemize}
+ \end{column}
+
+ \begin{column}{0.5\textwidth}
+ \textbf{Policy Recommendations:}
+ \begin{enumerate}
+ \item Support programs targeting X
+ \item Fund interventions enhancing A
+ \item Consider individual differences Z
+ \item Monitor outcomes Y
+ \end{enumerate}
+
+ \vspace{0.5cm}
+
+ \begin{alertblock}{Impact}
+ Findings suggest potential to improve outcomes for population experiencing low X
+ \end{alertblock}
+ \end{column}
+
+ \end{columns}
+\end{frame}
+
+\begin{frame}{Limitations and Future Directions}
+ \textbf{Study Limitations:}
+ \begin{enumerate}
+ \item \textbf{Sample:} Primarily university-educated, young adults
+ \begin{itemize}
+ \item Future: Community samples, diverse populations
+ \end{itemize}
+
+ \item \textbf{Measures:} Some reliance on self-report
+ \begin{itemize}
+ \item Future: Multi-method assessment (behavioral, biological)
+ \end{itemize}
+
+ \item \textbf{Time frame:} Longest follow-up was 12 months
+ \begin{itemize}
+ \item Future: Longer-term longitudinal studies
+ \end{itemize}
+
+ \item \textbf{Mechanisms:} Other pathways may exist
+ \begin{itemize}
+ \item Future: Explore alternative mediators
+ \end{itemize}
+ \end{enumerate}
+\end{frame}
+
+\begin{frame}{Future Research Program}
+ \begin{block}{Immediate Next Steps}
+ \begin{itemize}
+ \item Replicate in clinical populations
+ \item Develop intervention based on findings
+ \item Test with diverse samples
+ \item Examine individual differences in response
+ \end{itemize}
+ \end{block}
+
+ \vspace{0.5cm}
+
+ \textbf{Long-Term Research Agenda:}
+ \begin{enumerate}
+ \item \textbf{Mechanism refinement:} Neural/biological underpinnings
+ \item \textbf{Intervention development:} RCT of theory-driven treatment
+ \item \textbf{Moderator exploration:} Genetic, environmental factors
+ \item \textbf{Translation:} Dissemination and implementation science
+ \item \textbf{Extension:} Apply framework to related phenomena
+ \end{enumerate}
+
+ \vspace{0.5cm}
+
+ \textbf{Collaboration Opportunities:}
+ \begin{itemize}
+ \item Clinical partners for intervention trials
+ \item Neuroscientists for mechanism studies
+ \item Community organizations for implementation
+ \end{itemize}
+\end{frame}
+
+%==============================================
+% CONCLUSIONS
+%==============================================
+
+\section{Conclusions}
+
+\begin{frame}{Dissertation Conclusions}
+ \begin{exampleblock}{Central Thesis (Revisited)}
+ Through three complementary studies, this dissertation demonstrates that X influences Y through mechanisms A and B, moderated by Z, with effects generalizing across contexts.
+ \end{exampleblock}
+
+ \vspace{0.5cm}
+
+ \textbf{Key Achievements:}
+ \begin{enumerate}
+ \item Established robust X→Y relationship across designs
+ \item Identified and validated A→B mediating pathway
+ \item Demonstrated causality via experimental manipulation
+ \item Showed generalizability from lab to field
+ \item Proposed novel XYZ theoretical framework
+ \end{enumerate}
+
+ \vspace{0.5cm}
+
+ \textbf{Significance:}
+ \begin{itemize}
+ \item Theoretical advancement in understanding X→Y processes
+ \item Methodological contribution through multi-study design
+ \item Practical applications for intervention and policy
+ \item Foundation for sustained research program
+ \end{itemize}
+\end{frame}
+
+\begin{frame}{Final Thoughts}
+ \begin{block}{Take-Home Message}
+ This dissertation provides compelling converging evidence that X causes Y through mechanisms A and B, offering both theoretical understanding and practical pathways for intervention.
+ \end{block}
+
+ \vspace{1cm}
+
+ \textbf{Broader Impact:}
+ \begin{itemize}
+ \item Advances scientific understanding of fundamental process
+ \item Provides evidence-based framework for practitioners
+ \item Opens new avenues for future research
+ \item Demonstrates potential to improve outcomes for affected populations
+ \end{itemize}
+
+ \vspace{1cm}
+
+ \begin{center}
+ \textit{"The best way to predict the future is to create it."} \\
+ -- Peter Drucker
+ \end{center}
+\end{frame}
+
+\begin{frame}[plain]
+ \begin{center}
+ {\LARGE \textbf{Thank You}}
+
+ \vspace{1cm}
+
+ {\Large Questions from the Committee}
+
+ \vspace{1.5cm}
+
+ \textbf{Your Name, M.S.}\\
+ Doctoral Candidate\\
+ Department of Your Field\\
+ University Name\\
+ \texttt{yourname@university.edu}
+
+ \vspace{1cm}
+
+ {\footnotesize
+ \textbf{Funding Acknowledgment:}\\
+ This research was supported by [Grant Agency] Grant \#[Number],\\
+ [Fellowship Name], and [University] Dissertation Fellowship
+
+ \vspace{0.5cm}
+
+ \textbf{Special Thanks:}\\
+ My advisor Prof. [Name], committee members, lab colleagues,\\
+ study participants, and my family for their unwavering support
+ }
+ \end{center}
+\end{frame}
+
+%==============================================
+% BACKUP SLIDES
+%==============================================
+
+\appendix
+
+\begin{frame}{Backup: Study 1 Full Results}
+ \begin{table}
+ \centering
+ \caption{Complete regression results for Study 1}
+ \footnotesize
+ \begin{tabular}{lcccc}
+ \toprule
+ \textbf{Predictor} & $\boldsymbol{\beta}$ & \textbf{SE} & \textbf{$t$} & \textbf{$p$} \\
+ \midrule
+ \multicolumn{5}{l}{\textit{Step 1: Demographics}} \\
+ Age & 0.12 & 0.04 & 3.00 & .003 \\
+ Gender & 0.08 & 0.05 & 1.60 & .110 \\
+ Education & 0.15 & 0.04 & 3.75 & < .001 \\
+ \midrule
+ \multicolumn{5}{l}{\textit{Step 2: Main Effect}} \\
+ X & 0.47 & 0.04 & 11.75 & < .001 \\
+ \midrule
+ \multicolumn{5}{l}{\textit{Step 3: Moderation}} \\
+ Z & 0.18 & 0.04 & 4.50 & < .001 \\
+ X × Z & 0.12 & 0.04 & 3.00 & .003 \\
+ \bottomrule
+ \multicolumn{5}{l}{Final model: $R^2 = .28$, $F(6,493) = 32.1$, $p < .001$} \\
+ \end{tabular}
+ \end{table}
+\end{frame}
+
+\begin{frame}{Backup: Study 2 Model Fit}
+ \textbf{Structural Equation Model Fit Indices:}
+
+ \begin{table}
+ \centering
+ \begin{tabular}{lcc}
+ \toprule
+ \textbf{Index} & \textbf{Value} & \textbf{Criterion} \\
+ \midrule
+ $\chi^2$/df & 2.34 & < 3.0 \\
+ CFI & 0.96 & > 0.95 \\
+ TLI & 0.95 & > 0.95 \\
+ RMSEA & 0.045 & < 0.06 \\
+ SRMR & 0.038 & < 0.08 \\
+ \bottomrule
+ \end{tabular}
+ \end{table}
+
+ \vspace{0.5cm}
+
+ \textbf{Conclusion:} Excellent model fit, proposed model fits data well
+
+ \vspace{0.5cm}
+
+ \textbf{Alternative Models Tested:}
+ \begin{itemize}
+ \item Direct-only model: $\Delta\chi^2(2) = 45.6$, $p < .001$ (worse fit)
+ \item Reverse mediation: $\Delta\chi^2(2) = 38.2$, $p < .001$ (worse fit)
+ \item Proposed model provides best fit
+ \end{itemize}
+\end{frame}
+
+\begin{frame}{Backup: Study 3 Additional Analyses}
+ \textbf{Subgroup Effects:}
+
+ \begin{figure}
+ \centering
+ % \includegraphics[width=0.7\textwidth]{study3_subgroups.pdf}
+ \framebox[0.65\textwidth][c]{[Subgroup Analysis Results]}
+ \caption{Effect of X on Y by moderator Z levels}
+ \end{figure}
+
+ \begin{itemize}
+ \item High Z: $d = 0.95$, $p < .001$
+ \item Medium Z: $d = 0.72$, $p < .001$
+ \item Low Z: $d = 0.45$, $p = .008$
+ \item Moderation: $F(2,174) = 6.8$, $p = .001$
+ \end{itemize}
+\end{frame}
+
+%==============================================
+% REFERENCES
+%==============================================
+
+\begin{frame}[allowframebreaks]{References}
+ \printbibliography
+\end{frame}
+
+\end{document}
diff --git a/scientific-skills/scientific-slides/assets/beamer_template_seminar.tex b/scientific-skills/scientific-slides/assets/beamer_template_seminar.tex
new file mode 100644
index 0000000..1464a5b
--- /dev/null
+++ b/scientific-skills/scientific-slides/assets/beamer_template_seminar.tex
@@ -0,0 +1,870 @@
+\documentclass[aspectratio=169,11pt]{beamer}
+
+% Encoding
+\usepackage[utf8]{inputenc}
+\usepackage[T1]{fontenc}
+
+% Theme and colors
+\usetheme{Madrid}
+\usecolortheme{dolphin}
+
+% Remove navigation symbols
+\setbeamertemplate{navigation symbols}{}
+
+% Section pages
+\AtBeginSection[]{
+ \begin{frame}
+ \vfill
+ \centering
+ \begin{beamercolorbox}[sep=8pt,center,shadow=true,rounded=true]{title}
+ \usebeamerfont{title}\insertsectionhead\par%
+ \end{beamercolorbox}
+ \vfill
+ \end{frame}
+}
+
+% Graphics
+\usepackage{graphicx}
+\graphicspath{{./figures/}}
+
+% Math
+\usepackage{amsmath, amssymb, amsthm}
+
+% Tables
+\usepackage{booktabs}
+\usepackage{multirow}
+
+% Citations
+\usepackage[style=authoryear,maxcitenames=2,backend=biber]{biblatex}
+\addbibresource{references.bib}
+\renewcommand*{\bibfont}{\tiny}
+
+% Algorithms
+\usepackage{algorithm}
+\usepackage{algorithmic}
+
+% Code
+\usepackage{listings}
+\lstset{
+ basicstyle=\ttfamily\small,
+ keywordstyle=\color{blue},
+ commentstyle=\color{green!60!black},
+ stringstyle=\color{orange},
+ numbers=left,
+ numberstyle=\tiny,
+ frame=single,
+ breaklines=true
+}
+
+% Custom colors
+\definecolor{darkblue}{RGB}{0,75,135}
+\definecolor{lightblue}{RGB}{100,150,200}
+
+\setbeamercolor{structure}{fg=darkblue}
+\setbeamercolor{title}{fg=darkblue}
+\setbeamercolor{frametitle}{fg=darkblue}
+
+% Title information
+\title[Short Title for Footer]{Full Title of Your Research:\\Comprehensive and Descriptive}
+\subtitle{Research Seminar Presentation}
+\author[Your Name]{Your Name, PhD Candidate\\
+ Advisor: Prof. Advisor Name}
+\institute[University]{
+ Department of Your Field\\
+ University Name\\
+ \vspace{0.2cm}
+ \texttt{yourname@university.edu}
+}
+\date{\today}
+
+% Logo (optional)
+% \logo{\includegraphics[height=0.8cm]{university_logo.png}}
+
+\begin{document}
+
+% Title slide
+\begin{frame}[plain]
+ \titlepage
+\end{frame}
+
+% Outline
+\begin{frame}{Outline}
+ \tableofcontents
+\end{frame}
+
+%==============================================
+% INTRODUCTION
+%==============================================
+
+\section{Introduction}
+
+\begin{frame}{Motivation}
+ \begin{columns}[T]
+
+ \begin{column}{0.5\textwidth}
+ \textbf{The Big Picture:}
+ \begin{itemize}
+ \item Why this research area matters
+ \item Real-world impact and applications
+ \item Current challenges in the field
+ \item Opportunity for advancement
+ \end{itemize}
+ \end{column}
+
+ \begin{column}{0.5\textwidth}
+ \begin{figure}
+ \centering
+ % \includegraphics[width=\textwidth]{motivation_figure.pdf}
+ \framebox[0.9\textwidth][c]{[Motivating Figure]}
+ \caption{Illustration of the problem or impact}
+ \end{figure}
+ \end{column}
+
+ \end{columns}
+
+ \vspace{0.5cm}
+
+ \begin{block}{Central Question}
+ How can we address this important challenge using novel approach X?
+ \end{block}
+\end{frame}
+
+\subsection{Background}
+
+\begin{frame}{Prior Work: Overview}
+ \textbf{Historical Development:}
+ \begin{itemize}
+ \item Early work established foundation \cite{seminal1990}
+ \item Key advances in 2000s \cite{advance2005,advance2007}
+ \item Recent developments \cite{recent2020,recent2022}
+ \end{itemize}
+
+ \vspace{0.5cm}
+
+ \textbf{Current State of Knowledge:}
+ \begin{enumerate}
+ \item We know that X affects Y
+ \item Evidence suggests mechanism involves Z
+ \item However, questions remain about W
+ \end{enumerate}
+\end{frame}
+
+\begin{frame}{Knowledge Gap}
+ \begin{columns}[c]
+
+ \begin{column}{0.6\textwidth}
+ \textbf{What We Know:}
+ \begin{itemize}
+ \item Point 1: Established finding
+ \item Point 2: Replicated result
+ \item Point 3: General consensus
+ \end{itemize}
+
+ \vspace{0.5cm}
+
+ \textbf{What Remains Unknown:}
+ \begin{itemize}
+ \item \alert{Gap 1:} Critical unknown
+ \item \alert{Gap 2:} Methodological limitation
+ \item \alert{Gap 3:} Unexplored context
+ \end{itemize}
+ \end{column}
+
+ \begin{column}{0.4\textwidth}
+ \begin{alertblock}{The Problem}
+ Existing approaches fail to account for X, limiting our understanding of Y and preventing application to Z.
+ \end{alertblock}
+ \end{column}
+
+ \end{columns}
+\end{frame}
+
+\subsection{Research Questions}
+
+\begin{frame}{Research Objectives}
+ \begin{exampleblock}{Overall Goal}
+ To investigate how X influences Y under conditions Z, and develop a framework for understanding mechanism W.
+ \end{exampleblock}
+
+ \vspace{0.5cm}
+
+ \textbf{Specific Aims:}
+ \begin{enumerate}
+ \item \textbf{Aim 1:} Characterize relationship between X and Y
+ \begin{itemize}
+ \item Hypothesis: X positively correlates with Y
+ \end{itemize}
+
+ \item \textbf{Aim 2:} Identify mechanism W mediating X→Y
+ \begin{itemize}
+ \item Hypothesis: W explains the X-Y relationship
+ \end{itemize}
+
+ \item \textbf{Aim 3:} Test generalizability to context Z
+ \begin{itemize}
+ \item Hypothesis: Effect persists across conditions
+ \end{itemize}
+ \end{enumerate}
+\end{frame}
+
+%==============================================
+% METHODS
+%==============================================
+
+\section{Methods}
+
+\subsection{Study Design}
+
+\begin{frame}{Overall Approach}
+ \begin{figure}
+ \centering
+ % \includegraphics[width=0.9\textwidth]{study_design.pdf}
+ \framebox[0.8\textwidth][c]{[Study Design Schematic]}
+ \caption{Three-phase experimental design}
+ \end{figure}
+
+ \begin{itemize}
+ \item \textbf{Phase 1:} Observational study (n = 150)
+ \item \textbf{Phase 2:} Controlled experiment (n = 80)
+ \item \textbf{Phase 3:} Validation in new context (n = 120)
+ \end{itemize}
+\end{frame}
+
+\subsection{Participants and Materials}
+
+\begin{frame}{Sample Characteristics}
+ \begin{columns}[T]
+
+ \begin{column}{0.5\textwidth}
+ \textbf{Inclusion Criteria:}
+ \begin{itemize}
+ \item Age 18-65 years
+ \item Criterion 2
+ \item Criterion 3
+ \end{itemize}
+
+ \vspace{0.3cm}
+
+ \textbf{Exclusion Criteria:}
+ \begin{itemize}
+ \item Confound 1
+ \item Confound 2
+ \end{itemize}
+ \end{column}
+
+ \begin{column}{0.5\textwidth}
+ \begin{table}
+ \centering
+ \caption{Sample demographics}
+ \small
+ \begin{tabular}{lc}
+ \toprule
+ \textbf{Variable} & \textbf{Value} \\
+ \midrule
+ N & 150 \\
+ Age (years) & 32.5 $\pm$ 8.2 \\
+ Female (\%) & 58 \\
+ Education (years) & 15.2 $\pm$ 2.1 \\
+ \bottomrule
+ \end{tabular}
+ \end{table}
+ \end{column}
+
+ \end{columns}
+
+ \vspace{0.3cm}
+
+ \footnotesize Recruitment: University community and online platforms
+\end{frame}
+
+\subsection{Procedures}
+
+\begin{frame}{Experimental Procedure}
+ \begin{columns}[T]
+
+ \begin{column}{0.5\textwidth}
+ \textbf{Session 1 (60 min):}
+ \begin{enumerate}
+ \item Informed consent
+ \item Baseline measures
+ \item Training phase (20 min)
+ \item Test phase (30 min)
+ \end{enumerate}
+
+ \vspace{0.5cm}
+
+ \textbf{Session 2 (45 min):}
+ \begin{enumerate}
+ \setcounter{enumi}{4}
+ \item Follow-up measures
+ \item Manipulation (15 min)
+ \item Final assessment (25 min)
+ \end{enumerate}
+ \end{column}
+
+ \begin{column}{0.5\textwidth}
+ \begin{figure}
+ \centering
+ % \includegraphics[width=\textwidth]{procedure_timeline.pdf}
+ \framebox[0.9\textwidth][c]{[Timeline Diagram]}
+ \caption{Experimental timeline}
+ \end{figure}
+
+ \vspace{0.5cm}
+
+ \begin{alertblock}{Key Innovation}
+ Novel manipulation technique combining approach A with method B
+ \end{alertblock}
+ \end{column}
+
+ \end{columns}
+\end{frame}
+
+\subsection{Analysis}
+
+\begin{frame}{Statistical Analysis Plan}
+ \textbf{Primary Analyses:}
+ \begin{itemize}
+ \item \textbf{Aim 1:} Linear regression: $Y = \beta_0 + \beta_1 X + \epsilon$
+ \item \textbf{Aim 2:} Mediation analysis using bootstrapping (5000 iterations)
+ \item \textbf{Aim 3:} Mixed-effects model accounting for context effects
+ \end{itemize}
+
+ \vspace{0.5cm}
+
+ \textbf{Secondary Analyses:}
+ \begin{itemize}
+ \item Sensitivity analyses with different covariates
+ \item Subgroup analyses by demographic factors
+ \item Exploratory analyses of individual differences
+ \end{itemize}
+
+ \vspace{0.5cm}
+
+ \begin{block}{Software}
+ R 4.2.1 (lme4, lavaan packages); Python 3.10 (scikit-learn); SPSS 28
+ \end{block}
+\end{frame}
+
+%==============================================
+% RESULTS
+%==============================================
+
+\section{Results}
+
+\subsection{Preliminary Analyses}
+
+\begin{frame}{Data Quality and Assumptions}
+ \begin{columns}[T]
+
+ \begin{column}{0.5\textwidth}
+ \textbf{Data Screening:}
+ \begin{itemize}
+ \item Missing data: < 5\% per variable
+ \item Outliers: 3 cases removed
+ \item Assumptions: All met
+ \end{itemize}
+
+ \vspace{0.3cm}
+
+ \textbf{Descriptive Statistics:}
+ \begin{itemize}
+ \item Variable X: $M = 45.2$, $SD = 8.1$
+ \item Variable Y: $M = 67.8$, $SD = 12.3$
+ \item Correlation: $r = 0.54$, $p < .001$
+ \end{itemize}
+ \end{column}
+
+ \begin{column}{0.5\textwidth}
+ \begin{figure}
+ \centering
+ % \includegraphics[width=\textwidth]{descriptives.pdf}
+ \framebox[0.9\textwidth][c]{[Descriptive Plots]}
+ \caption{Variable distributions}
+ \end{figure}
+ \end{column}
+
+ \end{columns}
+\end{frame}
+
+\subsection{Aim 1 Results}
+
+\begin{frame}{Aim 1: X Predicts Y}
+ \begin{columns}[c]
+
+ \begin{column}{0.6\textwidth}
+ \begin{figure}
+ \centering
+ % \includegraphics[width=\textwidth]{aim1_result.pdf}
+ \framebox[0.9\textwidth][c]{[Regression Plot]}
+ \caption{Relationship between X and Y ($R^2 = 0.29$, $p < .001$)}
+ \end{figure}
+ \end{column}
+
+ \begin{column}{0.4\textwidth}
+ \begin{table}
+ \centering
+ \caption{Regression results}
+ \tiny
+ \begin{tabular}{lccc}
+ \toprule
+ \textbf{Predictor} & $\boldsymbol{\beta}$ & \textbf{SE} & \textbf{$p$} \\
+ \midrule
+ Intercept & 12.45 & 3.21 & < .001 \\
+ X & 0.54 & 0.08 & < .001 \\
+ Age & 0.12 & 0.05 & .018 \\
+ Gender & 2.34 & 1.12 & .038 \\
+ \bottomrule
+ \end{tabular}
+ \end{table}
+
+ \vspace{0.3cm}
+
+ \begin{block}{Key Finding}
+ X significantly predicts Y, controlling for demographics
+ \end{block}
+ \end{column}
+
+ \end{columns}
+\end{frame}
+
+\subsection{Aim 2 Results}
+
+\begin{frame}{Aim 2: Mediation by W}
+ \begin{figure}
+ \centering
+ % \includegraphics[width=0.8\textwidth]{mediation_model.pdf}
+ \framebox[0.7\textwidth][c]{[Mediation Diagram]}
+ \caption{Mediation analysis showing W mediates X→Y relationship}
+ \end{figure}
+
+ \begin{itemize}
+ \item \textbf{Direct effect:} $c' = 0.31$, $p = .021$ (reduced from $c = 0.54$)
+ \item \textbf{Indirect effect:} $ab = 0.23$, 95\% CI [0.14, 0.35]
+ \item \textbf{Proportion mediated:} 43\% of total effect
+ \end{itemize}
+
+ \vspace{0.3cm}
+
+ \alert{W partially mediates the relationship between X and Y}
+\end{frame}
+
+\subsection{Aim 3 Results}
+
+\begin{frame}{Aim 3: Generalization to Context Z}
+ \begin{columns}[T]
+
+ \begin{column}{0.5\textwidth}
+ \begin{figure}
+ \centering
+ % \includegraphics[width=\textwidth]{aim3_context1.pdf}
+ \framebox[0.9\textwidth][c]{[Context 1]}
+ \caption{Original context}
+ \end{figure}
+ \end{column}
+
+ \begin{column}{0.5\textwidth}
+ \begin{figure}
+ \centering
+ % \includegraphics[width=\textwidth]{aim3_context2.pdf}
+ \framebox[0.9\textwidth][c]{[Context 2]}
+ \caption{New context Z}
+ \end{figure}
+ \end{column}
+
+ \end{columns}
+
+ \vspace{0.5cm}
+
+ \textbf{Mixed-Effects Model Results:}
+ \begin{itemize}
+ \item Main effect of X: $\beta = 0.51$, $p < .001$
+ \item Context × X interaction: $\beta = -0.08$, $p = .231$ (ns)
+ \item \alert{Effect generalizes across contexts}
+ \end{itemize}
+\end{frame}
+
+\subsection{Additional Analyses}
+
+\begin{frame}{Sensitivity and Robustness Checks}
+ \textbf{Alternative Specifications:}
+ \begin{itemize}
+ \item Result robust to different model specifications
+ \item Consistent across multiple imputation methods
+ \item Findings hold with/without covariates
+ \end{itemize}
+
+ \vspace{0.5cm}
+
+ \textbf{Subgroup Analyses:}
+ \begin{table}
+ \centering
+ \caption{Effect sizes by subgroup}
+ \small
+ \begin{tabular}{lccc}
+ \toprule
+ \textbf{Subgroup} & \textbf{$n$} & $\boldsymbol{\beta}$ & \textbf{$p$} \\
+ \midrule
+ Young (< 30) & 67 & 0.58 & < .001 \\
+ Older ($\geq$ 30) & 83 & 0.49 & < .001 \\
+ Male & 63 & 0.52 & < .001 \\
+ Female & 87 & 0.55 & < .001 \\
+ \bottomrule
+ \end{tabular}
+ \end{table}
+
+ Effect consistent across demographic groups
+\end{frame}
+
+%==============================================
+% DISCUSSION
+%==============================================
+
+\section{Discussion}
+
+\subsection{Summary of Findings}
+
+\begin{frame}{Key Results Recap}
+ \begin{exampleblock}{Main Findings}
+ \begin{enumerate}
+ \item X significantly predicts Y ($\beta = 0.54$, $p < .001$), explaining 29\% of variance
+ \item W mediates 43\% of the X→Y relationship
+ \item Effect generalizes to new context Z
+ \item Results robust across subgroups and specifications
+ \end{enumerate}
+ \end{exampleblock}
+
+ \vspace{0.5cm}
+
+ \textbf{These findings:}
+ \begin{itemize}
+ \item Support our hypotheses
+ \item Provide evidence for mechanism W
+ \item Extend previous work to new domains
+ \item Have implications for theory and practice
+ \end{itemize}
+\end{frame}
+
+\subsection{Interpretation}
+
+\begin{frame}{Relation to Previous Research}
+ \begin{columns}[T]
+
+ \begin{column}{0.5\textwidth}
+ \textbf{Consistent With:}
+ \begin{itemize}
+ \item Prior findings on X→Y \cite{jones2020}
+ \item Theoretical predictions \cite{smith2019}
+ \item Meta-analytic trends \cite{meta2021}
+ \end{itemize}
+
+ \vspace{0.5cm}
+
+ \textbf{Extensions Beyond:}
+ \begin{itemize}
+ \item Identifies mechanism W (new)
+ \item Tests in context Z (novel)
+ \item Larger sample than prior work
+ \end{itemize}
+ \end{column}
+
+ \begin{column}{0.5\textwidth}
+ \textbf{Resolves Contradictions:}
+ \begin{itemize}
+ \item Explains why Study A found X
+ \item Reconciles Studies B and C
+ \item Clarifies conditions for effect
+ \end{itemize}
+
+ \vspace{0.5cm}
+
+ \begin{alertblock}{Novel Contribution}
+ First study to demonstrate W as mediator and show generalization to Z
+ \end{alertblock}
+ \end{column}
+
+ \end{columns}
+\end{frame}
+
+\begin{frame}{Mechanisms and Explanations}
+ \textbf{Why does X affect Y through W?}
+
+ \vspace{0.3cm}
+
+ \begin{enumerate}
+ \item<1-> \textbf{Hypothesis 1:} X activates process W
+ \begin{itemize}
+ \item<1-> Evidence: Temporal precedence in data
+ \item<1-> Consistent with neurobiological models
+ \end{itemize}
+
+ \vspace{0.3cm}
+
+ \item<2-> \textbf{Hypothesis 2:} W is necessary for Y
+ \begin{itemize}
+ \item<2-> Evidence: Mediation analysis results
+ \item<2-> Supported by experimental manipulations
+ \end{itemize}
+
+ \vspace{0.3cm}
+
+ \item<3-> \textbf{Integrated Model:} X → W → Y pathway
+ \begin{itemize}
+ \item<3-> Explains 43\% of total effect
+ \item<3-> Other pathways remain to be identified
+ \end{itemize}
+ \end{enumerate}
+\end{frame}
+
+\subsection{Implications}
+
+\begin{frame}{Theoretical Implications}
+ \textbf{Advances to Theory:}
+ \begin{itemize}
+ \item Refines existing framework by identifying W
+ \item Suggests revision of Model XYZ
+ \item Provides testable predictions for future work
+ \item Integrates previously separate literatures
+ \end{itemize}
+
+ \vspace{0.5cm}
+
+ \textbf{Broader Scientific Impact:}
+ \begin{itemize}
+ \item Methodology can be applied to related domains
+ \item Framework generalizable to other contexts
+ \item Opens new research directions
+ \end{itemize}
+\end{frame}
+
+\begin{frame}{Practical Applications}
+ \begin{columns}[T]
+
+ \begin{column}{0.5\textwidth}
+ \textbf{Clinical/Applied:}
+ \begin{itemize}
+ \item Intervention target: W
+ \item Assessment tool: Measure X
+ \item Treatment planning: Consider Z
+ \item Expected benefit: Improvement in Y
+ \end{itemize}
+ \end{column}
+
+ \begin{column}{0.5\textwidth}
+ \textbf{Policy Implications:}
+ \begin{itemize}
+ \item Recommendation 1
+ \item Recommendation 2
+ \item Implementation considerations
+ \item Cost-benefit analysis
+ \end{itemize}
+ \end{column}
+
+ \end{columns}
+
+ \vspace{0.5cm}
+
+ \begin{exampleblock}{Translational Path}
+ Findings suggest feasibility of intervention targeting W to improve Y in population experiencing X
+ \end{exampleblock}
+\end{frame}
+
+\subsection{Limitations and Future Directions}
+
+\begin{frame}{Limitations}
+ \textbf{Study Limitations:}
+ \begin{enumerate}
+ \item \textbf{Cross-sectional design}: Cannot establish causality definitively
+ \begin{itemize}
+ \item Future: Longitudinal or experimental design
+ \end{itemize}
+
+ \item \textbf{Sample characteristics}: University students, may limit generalizability
+ \begin{itemize}
+ \item Future: Community sample, diverse populations
+ \end{itemize}
+
+ \item \textbf{Measurement}: Self-report bias possible for some variables
+ \begin{itemize}
+ \item Future: Incorporate objective measures
+ \end{itemize}
+
+ \item \textbf{Unmeasured confounds}: Other factors could explain relationships
+ \begin{itemize}
+ \item Future: Control for additional variables
+ \end{itemize}
+ \end{enumerate}
+\end{frame}
+
+\begin{frame}{Future Research Directions}
+ \begin{block}{Immediate Next Steps}
+ \begin{itemize}
+ \item Replicate in independent sample
+ \item Test causal model experimentally
+ \item Examine boundary conditions
+ \end{itemize}
+ \end{block}
+
+ \vspace{0.5cm}
+
+ \textbf{Longer-Term Goals:}
+ \begin{itemize}
+ \item Develop intervention based on findings
+ \item Investigate neural mechanisms
+ \item Explore individual differences
+ \item Translate to applied settings
+ \end{itemize}
+
+ \vspace{0.5cm}
+
+ \textbf{Collaborations Sought:}
+ \begin{itemize}
+ \item Experts in domain A for validation
+ \item Clinical partners for translation
+ \item Methodologists for advanced analyses
+ \end{itemize}
+\end{frame}
+
+%==============================================
+% CONCLUSION
+%==============================================
+
+\section{Conclusion}
+
+\begin{frame}{Conclusions}
+ \begin{exampleblock}{Key Contributions}
+ \begin{enumerate}
+ \item Demonstrated robust X→Y relationship
+ \item Identified W as mediating mechanism
+ \item Showed generalizability across contexts
+ \item Provided framework for future research
+ \end{enumerate}
+ \end{exampleblock}
+
+ \vspace{0.5cm}
+
+ \begin{block}{Take-Home Message}
+ Our findings reveal that X influences Y through mechanism W, providing new understanding of this important process and suggesting potential intervention targets.
+ \end{block}
+
+ \vspace{0.5cm}
+
+ \textbf{Impact:}
+ \begin{itemize}
+ \item Theoretical advancement in understanding X→Y
+ \item Practical implications for interventions
+ \item Foundation for future research program
+ \end{itemize}
+\end{frame}
+
+\begin{frame}[plain]
+ \begin{center}
+ {\LARGE \textbf{Thank You}}
+
+ \vspace{1cm}
+
+ {\Large Questions \& Discussion}
+
+ \vspace{1.5cm}
+
+ \begin{columns}
+ \begin{column}{0.6\textwidth}
+ \textbf{Contact Information:}\\
+ Your Name\\
+ Department of Your Field\\
+ University Name\\
+ \texttt{yourname@university.edu}\\
+ \url{https://yourlab.university.edu}
+ \end{column}
+
+ \begin{column}{0.4\textwidth}
+ % QR code to lab website or paper
+ % \includegraphics[width=4cm]{qrcode_website.png}\\
+ % {\small Scan for more info}
+ \end{column}
+ \end{columns}
+
+ \vspace{1cm}
+
+ {\footnotesize
+ \textbf{Acknowledgments:}\\
+ Funding: NSF Grant \#12345, NIH Grant R01-67890\\
+ Lab Members: Person A, Person B, Person C\\
+ Collaborators: Prof. X (University Y), Dr. Z (Institution W)
+ }
+ \end{center}
+\end{frame}
+
+%==============================================
+% BACKUP SLIDES
+%==============================================
+
+\appendix
+
+\begin{frame}{Backup: Full Regression Table}
+ \begin{table}
+ \centering
+ \caption{Complete regression results with all covariates}
+ \footnotesize
+ \begin{tabular}{lcccc}
+ \toprule
+ \textbf{Predictor} & $\boldsymbol{\beta}$ & \textbf{SE} & \textbf{$t$} & \textbf{$p$} \\
+ \midrule
+ Intercept & 12.45 & 3.21 & 3.88 & < .001 \\
+ X (primary predictor) & 0.54 & 0.08 & 6.75 & < .001 \\
+ Age & 0.12 & 0.05 & 2.40 & .018 \\
+ Gender (female) & 2.34 & 1.12 & 2.09 & .038 \\
+ Education & 0.45 & 0.31 & 1.45 & .149 \\
+ Covariate Z & -0.18 & 0.09 & -2.00 & .047 \\
+ \midrule
+ $R^2$ & \multicolumn{4}{c}{0.35} \\
+ Adjusted $R^2$ & \multicolumn{4}{c}{0.32} \\
+ $F$(5,144) & \multicolumn{4}{c}{15.48, $p < .001$} \\
+ \bottomrule
+ \end{tabular}
+ \end{table}
+\end{frame}
+
+\begin{frame}{Backup: Alternative Analysis}
+ \begin{figure}
+ \centering
+ % \includegraphics[width=0.75\textwidth]{sensitivity_analysis.pdf}
+ \framebox[0.7\textwidth][c]{[Sensitivity Analysis Results]}
+ \caption{Results robust across different model specifications}
+ \end{figure}
+\end{frame}
+
+\begin{frame}{Backup: Detailed Methods}
+ \textbf{Measurement Details:}
+ \begin{itemize}
+ \item \textbf{Variable X:} Scale name (Author, Year)
+ \begin{itemize}
+ \item 12 items, 5-point Likert scale
+ \item Cronbach's $\alpha = 0.89$
+ \item Example item: "Statement here"
+ \end{itemize}
+
+ \item \textbf{Variable Y:} Assessment tool
+ \begin{itemize}
+ \item Performance-based measure
+ \item Inter-rater reliability: ICC = 0.92
+ \item Range: 0-100
+ \end{itemize}
+
+ \item \textbf{Mediator W:} Experimental manipulation check
+ \begin{itemize}
+ \item Manipulation successful: $t(149) = 8.45$, $p < .001$
+ \item Effect size: $d = 1.38$
+ \end{itemize}
+ \end{itemize}
+\end{frame}
+
+%==============================================
+% REFERENCES
+%==============================================
+
+\begin{frame}[allowframebreaks]{References}
+ \printbibliography
+\end{frame}
+
+\end{document}
diff --git a/scientific-skills/scientific-slides/assets/powerpoint_design_guide.md b/scientific-skills/scientific-slides/assets/powerpoint_design_guide.md
new file mode 100644
index 0000000..ae1d43e
--- /dev/null
+++ b/scientific-skills/scientific-slides/assets/powerpoint_design_guide.md
@@ -0,0 +1,662 @@
+# PowerPoint Design Guide for Scientific Presentations
+
+## Overview
+
+This guide provides comprehensive instructions for creating professional scientific presentations using PowerPoint, with emphasis on integration with the pptx skill for programmatic creation and best practices for scientific content.
+
+**CRITICAL**: Avoid dry, text-heavy presentations. Scientific slides should be:
+- **Visually engaging**: High-quality images, figures, diagrams on EVERY slide
+- **Research-backed**: Citations from research-lookup for credibility (8-15 papers minimum)
+- **Modern design**: Contemporary color palettes, not default themes
+- **Minimal text**: 3-4 bullets with 4-6 words each, visuals do the talking
+- **Professional polish**: Consistent but varied layouts, generous white space
+
+**Anti-Pattern Warning**: All-bullet-point slides with black text on white background = instant boredom and forgotten science.
+
+## Using the PPTX Skill
+
+### Reference
+
+For complete technical documentation on PowerPoint creation, refer to:
+- **Main documentation**: `document-skills/pptx/SKILL.md`
+- **HTML to PowerPoint workflow**: Detailed in `pptx/html2pptx.md`
+- **OOXML editing**: For advanced editing in `pptx/ooxml.md`
+
+### Two Approaches to PowerPoint Creation
+
+#### 1. Programmatic Creation (html2pptx)
+
+**Best for**: Creating presentations from scratch with custom designs and data visualizations.
+
+**Workflow**:
+1. Read `document-skills/pptx/SKILL.md` completely
+2. Design slides in HTML with proper dimensions (720pt × 405pt for 16:9)
+3. Create JavaScript file using `html2pptx()` function
+4. Add charts and tables using PptxGenJS API
+5. Generate thumbnails and validate visually
+6. Iterate based on visual inspection
+
+**Example Structure**:
+```javascript
+const pptx = new PptxGenJS();
+
+// Add title slide
+const slide1 = pptx.addSlide();
+slide1.addText("Your Title", {
+ x: 1, y: 2, w: 8, h: 1,
+ fontSize: 44, bold: true, align: "center"
+});
+
+// Add content slide with figure
+const slide2 = pptx.addSlide();
+slide2.addText("Results", { x: 0.5, y: 0.5, fontSize: 32 });
+slide2.addImage({ path: "figure.png", x: 1, y: 1.5, w: 8, h: 4 });
+
+pptx.writeFile({ fileName: "presentation.pptx" });
+```
+
+#### 2. Template-Based Creation
+
+**Best for**: Using existing PowerPoint templates or editing existing presentations.
+
+**Workflow**:
+1. Start with template.pptx
+2. Use `scripts/rearrange.py` to duplicate/reorder slides
+3. Use `scripts/inventory.py` to extract text
+4. Generate replacement text JSON
+5. Use `scripts/replace.py` to update content
+6. Validate with thumbnail grids
+
+**Key Scripts**:
+- `rearrange.py`: Duplicate and reorder slides
+- `inventory.py`: Extract all text shapes
+- `replace.py`: Apply text replacements
+- `thumbnail.py`: Visual validation
+
+## Design Principles for Scientific Presentations
+
+### 1. Layout and Structure
+
+**Slide Master Setup**:
+- Create consistent master slides
+- Define 4-5 layout types (title, content, figure, two-column, closing)
+- Set default fonts, colors, and spacing
+- Include placeholders for logos and footers
+
+**Standard Layouts**:
+
+**Title Slide**:
+```
+┌─────────────────────────┐
+│ │
+│ Presentation Title │
+│ Your Name │
+│ Institution │
+│ Date / Conference │
+│ │
+└─────────────────────────┘
+```
+
+**Content Slide**:
+```
+┌─────────────────────────┐
+│ Slide Title │
+├─────────────────────────┤
+│ • Bullet point 1 │
+│ • Bullet point 2 │
+│ • Bullet point 3 │
+│ │
+│ [Optional figure] │
+└─────────────────────────┘
+```
+
+**Two-Column Slide**:
+```
+┌─────────────────────────┐
+│ Slide Title │
+├───────────┬─────────────┤
+│ │ │
+│ Text │ Figure │
+│ Content │ or │
+│ │ Data │
+└───────────┴─────────────┘
+```
+
+**Full-Figure Slide**:
+```
+┌─────────────────────────┐
+│ Figure Title (small) │
+├─────────────────────────┤
+│ │
+│ Large Figure or │
+│ Visualization │
+│ │
+└─────────────────────────┘
+```
+
+### 2. Typography
+
+**Font Selection**:
+- **Primary**: Sans-serif (Arial, Calibri, Helvetica)
+- **Alternative**: Verdana, Tahoma, Trebuchet MS
+- **Avoid**: Serif fonts (harder to read on screens), decorative fonts
+
+**Font Sizes**:
+- Title slide title: 44-54pt
+- Slide titles: 32-40pt
+- Body text: 24-28pt (minimum 18pt)
+- Captions: 16-20pt
+- Footer: 10-12pt
+
+**Text Formatting**:
+- **Bold**: For emphasis (use sparingly)
+- **Color**: For highlighting (consistent meaning)
+- **Size**: For hierarchy
+- **Alignment**: Left for body, center for titles
+
+**The 6×6 Rule**:
+- Maximum 6 bullet points per slide
+- Maximum 6 words per bullet
+- Better: 3-4 bullets with 4-8 words each
+
+### 3. Color Schemes
+
+**Selecting Colors**:
+
+Consider your subject matter and audience:
+- **Academic/Professional**: Navy blue, gray, white with minimal accent
+- **Biomedical**: Blue and green tones (avoid red-green combinations)
+- **Technology**: Modern colors (teal, orange, purple)
+- **Clinical**: Conservative (blue, gray, subdued greens)
+
+**Example Palettes**:
+
+**Classic Scientific**:
+- Background: White (#FFFFFF)
+- Title: Navy (#1C3D5A)
+- Text: Dark gray (#2D3748)
+- Accent: Orange (#E67E22)
+
+**Modern Research**:
+- Background: Light gray (#F7FAFC)
+- Title: Teal (#0A9396)
+- Text: Charcoal (#2C2C2C)
+- Accent: Coral (#EE6C4D)
+
+**High Contrast** (for large venues):
+- Background: White (#FFFFFF)
+- Title: Black (#000000)
+- Text: Dark gray (#1A1A1A)
+- Accent: Bright blue (#0066CC)
+
+**Accessibility Guidelines**:
+- Minimum contrast ratio: 4.5:1 (body text)
+- Preferred contrast ratio: 7:1 (AAA standard)
+- Avoid red-green combinations (8% of men are color-blind)
+- Use patterns or shapes in addition to color for data
+
+### 4. Visual Elements
+
+**Figures and Images**:
+- **Resolution**: Minimum 300 DPI for print, 150 DPI for projection
+- **Format**: PNG for screenshots, PDF/SVG for vector graphics
+- **Size**: Large enough to be readable from back of room
+- **Placement**: Center or use two-column layout
+
+**Data Visualizations**:
+- **Simplify** from journal figures (fewer panels, larger text)
+- **Font sizes**: 18-24pt for axis labels
+- **Line widths**: 2-4pt thickness
+- **Colors**: High contrast, color-blind safe
+- **Labels**: Direct labeling preferred over legends
+
+**Icons and Shapes**:
+- Use for visual interest and organization
+- Consistent style (all outline or all filled)
+- Size appropriately (not too large or small)
+- Limit colors (match theme)
+
+### 5. Animations and Transitions
+
+**When to Use**:
+- ✅ Progressive disclosure of bullet points
+- ✅ Building complex figures incrementally
+- ✅ Emphasizing key findings
+- ✅ Showing process steps
+
+**When to Avoid**:
+- ❌ Decoration or entertainment
+- ❌ Every single slide
+- ❌ Distracting effects (fly in, bounce, spin)
+
+**Recommended Animations**:
+- **Appear**: Clean, professional
+- **Fade**: Subtle transition
+- **Wipe**: Directional reveal
+- **Duration**: Fast (0.2-0.3 seconds)
+- **Trigger**: On click (not automatic)
+
+**Slide Transitions**:
+- Use consistent transition throughout (or none)
+- Recommended: None, Fade, or Push
+- Avoid: 3D rotations, complex effects
+- Duration: Very fast (0.3-0.5 seconds)
+
+## Creating Presentations with PPTX Skill
+
+### Design-First Workflow
+
+**Step 0: Choose Modern Color Palette Based on Topic**
+
+**CRITICAL**: Select colors that reflect your subject matter, not generic defaults.
+
+**Topic-Based Palette Examples:**
+- **Biotechnology/Life Sciences**: Teal (#0A9396), Coral (#EE6C4D), Cream (#F4F1DE)
+- **Neuroscience/Brain Research**: Deep Purple (#722880), Magenta (#D72D51), White
+- **Machine Learning/AI**: Bold Red (#E74C3C), Orange (#F39C12), Dark Gray (#2C2C2C)
+- **Physics/Engineering**: Navy (#1C3D5A), Orange (#E67E22), Light Gray (#F7FAFC)
+- **Medicine/Healthcare**: Teal (#5EA8A7), Coral (#FE4447), White (#FFFFFF)
+- **Environmental Science**: Sage (#87A96B), Terracotta (#E07A5F), Cream (#F4F1DE)
+
+See full palette options in pptx skill SKILL.md (lines 76-94).
+
+**Step 1: Plan Design System** (With Modern Palette)
+```javascript
+// Define design constants with MODERN colors (not defaults)
+const DESIGN = {
+ colors: {
+ primary: "0A9396", // Teal (modern, engaging)
+ accent: "EE6C4D", // Coral (attention-grabbing)
+ text: "2C2C2C", // Charcoal (readable)
+ background: "FFFFFF" // White (clean)
+ },
+ fonts: {
+ title: { size: 40, bold: true, face: "Arial" },
+ heading: { size: 28, bold: true, face: "Arial" },
+ body: { size: 24, face: "Arial" },
+ caption: { size: 16, face: "Arial" }
+ },
+ layout: {
+ margin: 0.5,
+ titleY: 0.5,
+ contentY: 1.5
+ }
+};
+```
+
+**Step 2: Create Reusable Functions**
+```javascript
+function addTitleSlide(pptx, title, subtitle, author) {
+ const slide = pptx.addSlide();
+ slide.background = { color: DESIGN.colors.primary };
+
+ slide.addText(title, {
+ x: 1, y: 2, w: 8, h: 1,
+ fontSize: 44, bold: true, color: "FFFFFF",
+ align: "center"
+ });
+
+ slide.addText(subtitle, {
+ x: 1, y: 3.2, w: 8, h: 0.5,
+ fontSize: 24, color: "FFFFFF",
+ align: "center"
+ });
+
+ slide.addText(author, {
+ x: 1, y: 4, w: 8, h: 0.4,
+ fontSize: 18, color: "FFFFFF",
+ align: "center"
+ });
+
+ return slide;
+}
+
+function addContentSlide(pptx, title, bullets) {
+ const slide = pptx.addSlide();
+
+ slide.addText(title, {
+ x: DESIGN.layout.margin,
+ y: DESIGN.layout.titleY,
+ w: 9,
+ h: 0.5,
+ ...DESIGN.fonts.heading,
+ color: DESIGN.colors.primary
+ });
+
+ slide.addText(bullets, {
+ x: DESIGN.layout.margin,
+ y: DESIGN.layout.contentY,
+ w: 9,
+ h: 3,
+ ...DESIGN.fonts.body,
+ bullet: true
+ });
+
+ return slide;
+}
+```
+
+**Step 3: Build Presentation** (Visual-First Approach)
+```javascript
+const pptx = new PptxGenJS();
+pptx.layout = "LAYOUT_16x9";
+
+// Title slide with background image or color block
+const titleSlide = pptx.addSlide();
+titleSlide.background = { color: DESIGN.colors.primary }; // Bold color background
+addTitleSlide(
+ pptx,
+ "Research Title",
+ "Subtitle or Conference Name",
+ "Your Name • Institution • Date"
+);
+
+// Introduction with image/icon
+const introSlide = pptx.addSlide();
+introSlide.addImage({
+ path: "concept_image.png", // Visual representation of concept
+ x: 5, y: 1.5, w: 4, h: 3
+});
+introSlide.addText("Background", { x: 0.5, y: 0.5, fontSize: 36, bold: true });
+introSlide.addText([
+ "Key context point 1 (AuthorA, 2023)",
+ "Key context point 2 (AuthorB, 2022)",
+ "Research gap identified (AuthorC, 2021)"
+], {
+ x: 0.5, y: 1.5, w: 4, h: 2,
+ fontSize: 24, bullet: true
+});
+
+// Results slide - FIGURE DOMINATES
+const resultsSlide = pptx.addSlide();
+resultsSlide.addText("Main Finding", { x: 0.5, y: 0.5, fontSize: 32, bold: true });
+resultsSlide.addImage({
+ path: "results_figure.png", // Large, clear figure
+ x: 0.5, y: 1.5, w: 9, h: 4 // Nearly full slide
+});
+// Minimal text annotation only
+resultsSlide.addText("34% improvement (p < 0.001)", {
+ x: 7, y: 1, fontSize: 20, color: DESIGN.colors.accent, bold: true
+});
+
+// Save
+pptx.writeFile({ fileName: "presentation.pptx" });
+```
+
+**Key Changes from Dry Presentations:**
+- Title slide uses bold background color (not plain white)
+- Introduction includes relevant image (not just bullets)
+- Results slide is figure-dominated (not text-dominated)
+- Citations included in bullets for research context
+- Text is minimal and supporting, visuals are primary
+
+### Adding Scientific Content
+
+**Equations** (as images):
+```javascript
+// Render equation as PNG first (using LaTeX or online tool)
+// Then add to slide
+slide.addImage({
+ path: "equation.png",
+ x: 2, y: 3, w: 6, h: 1
+});
+```
+
+**Tables**:
+```javascript
+slide.addTable([
+ [
+ { text: "Method", options: { bold: true } },
+ { text: "Accuracy", options: { bold: true } },
+ { text: "Time (s)", options: { bold: true } }
+ ],
+ ["Method A", "0.85", "10"],
+ ["Method B", "0.92", "25"],
+ ["Method C", "0.88", "15"]
+], {
+ x: 2, y: 2, w: 6,
+ fontSize: 20,
+ border: { pt: 1, color: "888888" },
+ fill: { color: "F5F5F5" }
+});
+```
+
+**Charts**:
+```javascript
+// Bar chart
+slide.addChart(pptx.ChartType.bar, [
+ {
+ name: "Control",
+ labels: ["Metric 1", "Metric 2", "Metric 3"],
+ values: [45, 67, 82]
+ },
+ {
+ name: "Treatment",
+ labels: ["Metric 1", "Metric 2", "Metric 3"],
+ values: [52, 78, 91]
+ }
+], {
+ x: 1, y: 1.5, w: 8, h: 4,
+ chartColors: [DESIGN.colors.primary, DESIGN.colors.accent],
+ showTitle: false,
+ showLegend: true,
+ fontSize: 18
+});
+```
+
+## Visual Validation Workflow
+
+### Generate Thumbnails
+
+After creating presentation:
+
+```bash
+# Create thumbnail grid for quick review
+python scripts/thumbnail.py presentation.pptx review/thumbnails --cols 4
+
+# Or for individual slides
+python scripts/thumbnail.py presentation.pptx review/slide
+```
+
+### Inspection Checklist
+
+For each slide, check:
+- [ ] Text readable (not cut off or too small)
+- [ ] No element overlap
+- [ ] Consistent colors and fonts
+- [ ] Adequate white space
+- [ ] Figures clear and properly sized
+- [ ] Alignment correct
+
+### Common Issues
+
+**Text Overflow**:
+- Reduce font size or text length
+- Increase text box size
+- Split into multiple slides
+
+**Element Overlap**:
+- Use two-column layout
+- Reduce element sizes
+- Adjust positioning
+
+**Poor Contrast**:
+- Choose higher contrast colors
+- Use dark text on light background
+- Test with contrast checker
+
+## Templates and Examples
+
+### Starting from Template
+
+If you have an existing template:
+
+1. **Extract template structure**:
+```bash
+python scripts/inventory.py template.pptx inventory.json
+```
+
+2. **Create thumbnail grid**:
+```bash
+python scripts/thumbnail.py template.pptx template_review
+```
+
+3. **Analyze layouts** and document which slides to use
+
+4. **Rearrange slides**:
+```bash
+python scripts/rearrange.py template.pptx working.pptx 0,5,5,12,18,22
+```
+
+5. **Replace content**:
+```bash
+python scripts/replace.py working.pptx replacements.json output.pptx
+```
+
+## Best Practices Summary
+
+### Do's (Make Presentations Engaging)
+
+- ✅ Use research-lookup to find 8-15 papers for citations
+- ✅ Add HIGH-QUALITY visuals to EVERY slide (figures, images, diagrams, icons)
+- ✅ Choose MODERN color palette reflecting your topic (not defaults)
+- ✅ Keep text MINIMAL (3-4 bullets, 4-6 words each)
+- ✅ Use LARGE fonts (24-28pt body, 36-44pt titles)
+- ✅ Vary slide layouts (full-figure, two-column, visual overlays)
+- ✅ Maintain high contrast (7:1 preferred)
+- ✅ Generous white space (40-50% of slide)
+- ✅ Cite papers in intro and discussion (establish credibility)
+- ✅ Test readability from distance
+- ✅ Validate visually before presenting
+
+### Don'ts (Avoid Dry Presentations)
+
+- ❌ Don't create text-only slides (add visuals to EVERY slide)
+- ❌ Don't use default themes unchanged (customize for your topic)
+- ❌ Don't have all bullet-point slides (vary layouts)
+- ❌ Don't skip research-lookup (presentations need citations too)
+- ❌ Don't cram too much text on one slide
+- ❌ Don't use tiny fonts (<24pt for body)
+- ❌ Don't rely solely on color
+- ❌ Don't use complex animations
+- ❌ Don't mix too many font styles
+- ❌ Don't ignore accessibility
+- ❌ Don't skip visual validation
+
+## Accessibility Considerations
+
+**Color Contrast**:
+- Use WebAIM contrast checker
+- Minimum 4.5:1 for normal text
+- Preferred 7:1 for optimal readability
+
+**Color Blindness**:
+- Test with Coblis simulator
+- Use patterns/shapes with colors
+- Avoid red-green combinations
+
+**Readability**:
+- Sans-serif fonts only
+- Minimum 18pt, prefer 24pt+
+- Clear visual hierarchy
+- Adequate spacing
+
+## Integration with Other Skills
+
+**With Scientific Writing**:
+- Convert paper content to slides
+- Simplify dense text
+- Extract key findings
+- Create visual abstracts
+
+**With Data Visualization**:
+- Simplify journal figures
+- Recreate with larger labels
+- Use progressive disclosure
+- Emphasize key results
+
+**With Research Lookup**:
+- Find relevant papers
+- Extract key citations
+- Build background context
+- Support claims with evidence
+
+## Resources
+
+**PowerPoint Tutorials**:
+- Microsoft PowerPoint documentation
+- PowerPoint design templates
+- Scientific presentation examples
+
+**Design Tools**:
+- Color palette generators (Coolors.co)
+- Contrast checkers (WebAIM)
+- Icon libraries (Noun Project)
+- Image editing (PowerPoint built-in, external tools)
+
+**PPTX Skill Documentation**:
+- `document-skills/pptx/SKILL.md`: Main documentation
+- `document-skills/pptx/html2pptx.md`: HTML to PPTX workflow
+- `document-skills/pptx/ooxml.md`: Advanced editing
+- `document-skills/pptx/scripts/`: Utility scripts
+
+## Quick Reference
+
+### Common Slide Dimensions
+
+- **16:9 aspect ratio**: 10" × 5.625" (720pt × 405pt)
+- **4:3 aspect ratio**: 10" × 7.5" (720pt × 540pt)
+
+### Measurement Units
+
+- PowerPoint uses inches
+- 72 points = 1 inch
+- Position (x, y) from top-left corner
+- Size (w, h) for width and height
+
+### Font Size Guidelines
+
+| Element | Minimum | Recommended |
+|---------|---------|-------------|
+| Title slide | 40pt | 44-54pt |
+| Slide title | 28pt | 32-40pt |
+| Body text | 18pt | 24-28pt |
+| Caption | 14pt | 16-20pt |
+| Footer | 10pt | 10-12pt |
+
+### Color Usage
+
+- **Backgrounds**: White or very light colors
+- **Text**: Dark (black/dark gray) on light, or white on dark
+- **Accents**: One or two accent colors max
+- **Data**: Color-blind safe palettes (blue/orange)
+
+## Troubleshooting
+
+**Problem**: Text appears cut off
+- **Solution**: Increase text box size or reduce font size
+
+**Problem**: Figures are blurry
+- **Solution**: Use higher resolution images (300 DPI)
+
+**Problem**: Colors look different when projected
+- **Solution**: Test with projector beforehand, use high contrast
+
+**Problem**: File size too large
+- **Solution**: Compress images, reduce image resolution
+
+**Problem**: Animations not working
+- **Solution**: Check PowerPoint version compatibility
+
+## Conclusion
+
+Effective PowerPoint presentations for science require:
+1. Clear, simple design
+2. Readable text (24pt+ body)
+3. High-quality figures
+4. Consistent formatting
+5. Visual validation
+6. Accessibility considerations
+
+Use the pptx skill for programmatic creation and the visual review workflow to ensure professional quality before presenting.
+
diff --git a/scientific-skills/scientific-slides/assets/timing_guidelines.md b/scientific-skills/scientific-slides/assets/timing_guidelines.md
new file mode 100644
index 0000000..cf9fdab
--- /dev/null
+++ b/scientific-skills/scientific-slides/assets/timing_guidelines.md
@@ -0,0 +1,597 @@
+# Presentation Timing Guidelines
+
+## Overview
+
+Proper timing is critical for professional scientific presentations. This guide provides detailed guidelines for slide counts, time allocation, pacing strategies, and practice techniques to ensure your presentation fits the allotted time while maintaining engagement and clarity.
+
+## The One-Slide-Per-Minute Rule
+
+### Basic Guideline
+
+**Rule of Thumb**: Plan for approximately 1 slide per minute of presentation time.
+
+**Why It Works**:
+- Allows adequate time to explain each concept
+- Accounts for transitions and questions
+- Provides buffer for variations in pace
+- Industry-standard baseline for planning
+
+**Adjustments**:
+- **Complex slides** (data-heavy, detailed figures): 2-3 minutes each
+- **Simple slides** (title, section dividers): 15-30 seconds each
+- **Key result slides**: 2-4 minutes each
+- **Build slides** (animations): Count as multiple slides
+
+### Slide Count by Talk Length
+
+| Duration | Total Slides | Title/Intro | Methods | Results | Discussion | Conclusion |
+|----------|--------------|-------------|---------|---------|------------|------------|
+| 5 min | 5-7 | 1-2 | 0-1 | 2-3 | 1 | 1 |
+| 10 min | 10-12 | 2 | 1-2 | 4-5 | 2-3 | 1 |
+| 15 min | 15-18 | 2-3 | 2-3 | 6-8 | 3-4 | 1-2 |
+| 20 min | 20-24 | 3 | 3-4 | 8-10 | 4-5 | 2 |
+| 30 min | 25-30 | 3-4 | 5-6 | 10-12 | 6-8 | 2 |
+| 45 min | 35-45 | 4-5 | 8-10 | 15-20 | 8-10 | 2-3 |
+| 60 min | 45-60 | 5-6 | 10-12 | 20-25 | 10-12 | 3-4 |
+
+### Exceptions to the Rule
+
+**When to Use More Slides**:
+- Many simple concepts to cover
+- Highly visual presentation (minimal text)
+- Progressive builds (each build = new "slide")
+- Fast-paced overview talks
+
+**When to Use Fewer Slides**:
+- Deep dive into few concepts
+- Complex data visualizations
+- Interactive discussions expected
+- Technical/mathematical content
+
+## Time Allocation by Section
+
+### 15-Minute Conference Talk (Standard)
+
+**Total: 15 minutes, 15-18 slides**
+
+```
+Introduction (2-3 minutes, 2-3 slides):
+├─ Title slide: 30 seconds
+├─ Hook/Background: 90 seconds
+└─ Research question: 60 seconds
+
+Methods (2-3 minutes, 2-3 slides):
+├─ Study design: 60-90 seconds
+├─ Key procedures: 60 seconds
+└─ Analysis: 30-60 seconds
+
+Results (6-7 minutes, 6-8 slides):
+├─ Result 1: 2-3 minutes (2-3 slides)
+├─ Result 2: 2 minutes (2 slides)
+└─ Result 3: 2 minutes (2-3 slides)
+
+Discussion (2-3 minutes, 3-4 slides):
+├─ Interpretation: 60 seconds
+├─ Prior work: 60 seconds
+└─ Implications: 60 seconds
+
+Conclusion (1 minute, 1-2 slides):
+├─ Key takeaways: 45 seconds
+└─ Acknowledgments: 15 seconds
+
+Buffer: 1-2 minutes for transitions and variation
+```
+
+**Key Principle**: Spend 40-50% of time on results.
+
+### 45-Minute Seminar
+
+**Total: 45 minutes, 35-45 slides**
+
+```
+Introduction (8-10 minutes, 8-10 slides):
+├─ Title and personal intro: 1 minute
+├─ Big picture: 3-4 minutes
+├─ Literature review: 3-4 minutes
+├─ Research questions: 1-2 minutes
+└─ Roadmap: 1 minute
+
+Methods (8-10 minutes, 8-10 slides):
+├─ Design with rationale: 2-3 minutes
+├─ Participants/materials: 2 minutes
+├─ Procedures: 3-4 minutes
+└─ Analysis approach: 2 minutes
+
+Results (18-22 minutes, 16-20 slides):
+├─ Overview: 2 minutes
+├─ Main finding 1: 6-8 minutes
+├─ Main finding 2: 6-8 minutes
+├─ Additional analyses: 4-6 minutes
+└─ Summary: 1 minute
+
+Discussion (10-12 minutes, 8-10 slides):
+├─ Summary: 2 minutes
+├─ Literature comparison: 3-4 minutes
+├─ Mechanisms: 2-3 minutes
+├─ Limitations: 2 minutes
+└─ Implications: 2 minutes
+
+Conclusion (2-3 minutes, 2-3 slides):
+├─ Key messages: 1 minute
+├─ Future directions: 1-2 minutes
+└─ Acknowledgments: 30 seconds
+
+Reserve: 5-10 minutes for Q&A or discussion
+```
+
+### Lightning Talk (5 Minutes)
+
+**Total: 5 minutes, 5-7 slides**
+
+```
+Slide 1: Title (15 seconds)
+Slide 2: The Problem (45 seconds)
+Slide 3: Your Solution (60 seconds)
+Slide 4-5: Key Result (2-3 minutes total)
+Slide 6: Impact/Implications (45 seconds)
+Slide 7: Conclusion + Contact (30 seconds)
+```
+
+**Critical**: Practice exact timing. No buffer room.
+
+## Timing Each Slide
+
+### Simple Slides
+
+**Title/Section Dividers** (15-30 seconds):
+- Say title
+- Brief transition comment
+- Move on quickly
+
+**Single Bullet Point Slides** (30-45 seconds):
+- Read or paraphrase point
+- Provide 1-2 sentences of explanation
+- Transition to next
+
+### Standard Content Slides
+
+**Bullet Point Slides** (1-2 minutes):
+- 3-4 bullets: ~1 minute
+- 5-6 bullets: ~2 minutes
+- **Strategy**:
+ - Don't read bullets verbatim
+ - Explain each point (15-20 seconds per bullet)
+ - Use builds to control pacing
+
+**Equation Slides** (1-2 minutes):
+- Introduce equation context (20 seconds)
+- Explain each term (40 seconds)
+- Discuss implications (20-40 seconds)
+
+### Complex Slides
+
+**Data Visualization Slides** (2-3 minutes):
+```
+30 seconds: Set up (what you're showing)
+60 seconds: Walk through key patterns
+30 seconds: Highlight main finding
+30 seconds: Statistical results
+30 seconds: Interpretation/transition
+```
+
+**Multi-Panel Figures** (2-4 minutes):
+```
+Option 1 - Progressive Build:
+- Show panel 1: 60 seconds
+- Add panel 2: 60 seconds
+- Add panel 3: 60 seconds
+- Integrate: 60 seconds
+
+Option 2 - All at Once:
+- Overview: 30 seconds
+- Panel 1: 60 seconds
+- Panel 2: 60 seconds
+- Panel 3: 60 seconds
+- Integration: 30 seconds
+```
+
+**Table Slides** (1-2 minutes):
+- Don't read every cell
+- Guide attention: "Notice the top row..."
+- Highlight key comparison
+- State statistical result
+
+## Pacing Strategies
+
+### Maintaining Steady Pace
+
+**Natural Checkpoints** (Use these to self-monitor):
+
+For 15-minute talk:
+- **3-4 minutes**: Should be finishing introduction
+- **7-8 minutes**: Should be halfway through results
+- **12-13 minutes**: Should be starting conclusions
+
+For 45-minute talk:
+- **10 minutes**: Finishing introduction
+- **20 minutes**: Halfway through methods
+- **35 minutes**: Finishing results
+- **40 minutes**: In discussion
+
+### Signs You're Running Behind
+
+- Rushing through slides
+- Skipping explanations
+- Feeling time pressure
+- Glancing at clock frequently
+- Audience looking confused
+
+**Recovery Strategies**:
+1. Skip backup/secondary slides (prepare these in advance)
+2. Summarize instead of detailing
+3. Cut discussion, not results
+4. NEVER skip conclusions
+
+### Signs You're Ahead of Schedule
+
+- Finishing slides too quickly
+- Running out of things to say
+- Awkward pauses
+- Reaching conclusion with time left
+
+**Adjustment Strategies**:
+1. Expand on key points naturally
+2. Provide additional examples
+3. Take questions mid-talk (if appropriate)
+4. Slow down slightly (don't add filler)
+
+## Practice Techniques
+
+### Practice Schedule
+
+**Minimum Practice Requirements**:
+
+| Talk Type | Practice Runs | Time Commitment |
+|-----------|--------------|-----------------|
+| Lightning (5 min) | 5-7 times | 3 hours |
+| Conference (15 min) | 3-5 times | 4-5 hours |
+| Seminar (45 min) | 3-4 times | 6-8 hours |
+| Defense (60 min) | 4-6 times | 10-15 hours |
+
+### Practice Progression
+
+**Run 1: Rough Draft**
+- Focus: Get through all slides
+- Time it (will likely run long)
+- Identify problem areas
+- Note where you stumble
+
+**Run 2: Smoothing**
+- Focus: Improve transitions
+- Practice specific wording
+- Time each section
+- Start cutting if over time
+
+**Run 3: Refinement**
+- Focus: Exact timing
+- Practice with timer visible
+- Implement timing strategies
+- Fine-tune explanations
+
+**Run 4: Final Polish**
+- Focus: Delivery quality
+- Record yourself (video)
+- Practice Q&A scenarios
+- Perfect timing
+
+**Run 5+: Maintenance**
+- Day before talk
+- Morning of talk (if time)
+- Just opening and closing
+
+### Practice Methods
+
+**Solo Practice**:
+```
+1. Full talk with timer
+2. Section-by-section focus
+3. Speak aloud (not mental review)
+4. Stand and use gestures
+5. Simulate presentation environment
+```
+
+**Recorded Practice**:
+```
+1. Video yourself
+2. Watch playback critically
+3. Note:
+ - Timing issues
+ - Filler words ("um", "uh", "like")
+ - Body language
+ - Pace variations
+4. Re-record after improvements
+```
+
+**Live Audience Practice**:
+```
+1. Lab meeting or colleagues
+2. Request honest feedback
+3. Take questions
+4. Time strictly
+5. Note:
+ - Confusing sections
+ - Questions asked
+ - Engagement level
+```
+
+### Timing Tools
+
+**During Practice**:
+- Phone timer (visible)
+- Stopwatch with lap times
+- Timer app with alerts
+- Record for later analysis
+
+**During Presentation**:
+- Phone/watch timer (subtle glances)
+- Session clock (if provided)
+- Time notes on slides (bottom corner)
+- Vibrating watch alerts at key checkpoints
+
+**Timing Notes on Slides**:
+```
+Add small text (8pt, corner):
+Slide 1: "0:00"
+Slide 5: "3:30"
+Slide 10: "7:00"
+Slide 15: "12:00"
+Slide 18: "14:00"
+```
+
+## Handling Time Constraints
+
+### If Time is Cut Short
+
+**Scenario**: "We're running behind, can you cut to 10 minutes?"
+
+**Strategy**:
+1. Keep introduction (brief)
+2. Mention methods (30 seconds)
+3. Show main result only (3 minutes)
+4. Brief conclusion (30 seconds)
+5. Skip: Secondary results, detailed discussion
+
+**Pre-Prepare**:
+- Know which slides are "must keep"
+- Mark "optional" slides
+- Have 5, 10, and 15-minute versions ready
+
+### If Given Extra Time
+
+**Scenario**: "Previous speaker cancelled, you have 30 minutes instead of 15"
+
+**Options**:
+1. Go deeper on key results
+2. Show backup slides
+3. Include additional analyses
+4. Extend discussion
+5. Allow more Q&A time
+
+**Don't**:
+- Repeat content
+- Add filler
+- Slow down artificially
+- Include low-quality material
+
+## Question and Answer Timing
+
+### Including Q&A in Your Time
+
+**If Q&A is within your slot**:
+- Plan for 20-30% of time for questions
+- 15-minute talk: Reserve 3-4 minutes
+- 45-minute talk: Reserve 10-15 minutes
+- Finish content 2-3 minutes early
+
+**Q&A Time Management**:
+- Brief answers (30-90 seconds each)
+- "Great question, let me keep this brief..."
+- Redirect detailed questions: "Let's discuss after"
+- Moderator or self-police time
+
+### Separate Q&A Time
+
+**If Q&A is after your slot**:
+- Use full allotted time
+- Finish exactly at time limit
+- Don't assume extra time
+- Have backup slides ready
+
+## Time Budgeting Template
+
+### Create Your Own Timing Plan
+
+```
+Talk Title: _______________________
+Total Duration: ____ minutes
+Target Slides: ____ slides
+
+Introduction:
+- Slide 1: Title (__:__ - __:__)
+- Slide 2: Hook (__:__ - __:__)
+- Slide 3: Background (__:__ - __:__)
+[Continue for all slides...]
+
+CHECKPOINT: By __:__, should be at Slide ___
+
+Methods:
+- Slide __: [description] (__:__ - __:__)
+[...]
+
+CHECKPOINT: By __:__, should be at Slide ___
+
+Results:
+[...]
+
+[Continue for all sections]
+
+Total Planned Time: ____
+Buffer: ____ minutes
+```
+
+### Example Timing Sheet
+
+```
+15-Minute Conference Talk
+Target: 15:00, Slides: 1-18
+
+00:00 - 00:30 | Slide 1 | Title
+00:30 - 02:00 | Slide 2 | Background
+02:00 - 03:00 | Slide 3 | Research question
+------CHECKPOINT: 3 min, Slide 3------
+03:00 - 04:00 | Slide 4 | Study design
+04:00 - 05:00 | Slide 5 | Methods
+05:00 - 05:30 | Slide 6 | Analysis
+------CHECKPOINT: 5:30, Slide 6------
+05:30 - 08:00 | Slide 7-8 | Main result
+08:00 - 10:00 | Slide 9-10 | Result 2
+10:00 - 11:30 | Slide 11-12 | Result 3
+------CHECKPOINT: 11:30, Slide 12------
+11:30 - 12:30 | Slide 13-14 | Discussion
+12:30 - 13:30 | Slide 15-16 | Implications
+13:30 - 14:30 | Slide 17 | Conclusions
+14:30 - 15:00 | Slide 18 | Acknowledgments
+------END: 15:00------
+```
+
+## Common Timing Mistakes
+
+### Mistake 1: Over-Preparing Introduction
+
+**Problem**: Spending 5 minutes of 15-minute talk on background
+
+**Solution**:
+- Limit intro to 15-20% of total time
+- Jump to your contribution quickly
+- Save detailed review for discussion
+
+### Mistake 2: Equal Time Per Slide
+
+**Problem**: Spending same time on title slide as key result
+
+**Solution**:
+- Vary pace based on importance
+- Rush through simple slides
+- Linger on key findings
+
+### Mistake 3: No Time Checkpoints
+
+**Problem**: Realizing you're behind only at minute 12 of 15
+
+**Solution**:
+- Set 3-4 checkpoints
+- Glance at timer regularly
+- Adjust in real-time
+
+### Mistake 4: Skipping Practice
+
+**Problem**: First time through is during actual presentation
+
+**Solution**:
+- Practice minimum 3 times
+- Time each practice
+- Get feedback
+
+### Mistake 5: Not Preparing Plan B
+
+**Problem**: Run over time with no strategy
+
+**Solution**:
+- Know which slides to skip
+- Have condensed versions ready
+- Practice shortened version
+
+## Special Timing Considerations
+
+### Virtual Presentations
+
+**Adjustments**:
+- Slightly slower pace (5-10%)
+- More explicit transitions
+- Built-in pauses for lag
+- Buffer for technical issues
+
+**Time Allocation**:
+- Start 1-2 minutes early (tech check)
+- More time for Q&A (typing delays)
+- Share slides in advance if possible
+
+### Poster Spotlight Talks (3 Minutes)
+
+**Ultra-Tight Timing**:
+```
+0:00-0:30 | Title + Context
+0:30-1:30 | Problem + Approach
+1:30-2:30 | Key Result (one figure)
+2:30-3:00 | "Visit poster #42"
+```
+
+**Practice**: 10+ times to get exactly right
+
+### Invited Talks (45-60 Minutes)
+
+**More Flexibility**:
+- Can adjust pace based on audience
+- Welcome interruptions
+- Conversational style acceptable
+- Less rigid timing
+
+**Still Important**:
+- Have overall time structure
+- Monitor major checkpoints
+- Respect Q&A time
+
+## Summary: Key Timing Principles
+
+1. **Plan for 1 slide per minute** (adjust for complexity)
+2. **Spend 40-50% on results**
+3. **Practice 3-5 times minimum**
+4. **Set 3-4 time checkpoints**
+5. **Have Plan B for running over**
+6. **Never skip conclusions**
+7. **Finish on time** (non-negotiable)
+
+## Quick Reference Card
+
+```
+PRESENTATION TIMING CHEAT SHEET
+
+General Rule: 1 slide = 1 minute
+
+Section Time Allocation (15-min talk):
+├─ Intro: 2-3 min (20%)
+├─ Methods: 2-3 min (15-20%)
+├─ Results: 6-7 min (45%)
+├─ Discussion: 2-3 min (15%)
+└─ Conclusion: 1 min (5%)
+
+Practice Schedule:
+├─ Run 1: Rough (expect to run long)
+├─ Run 2: Smooth (fix transitions)
+├─ Run 3: Timed (hit targets)
+└─ Run 4+: Polish (perfect delivery)
+
+Checkpoints (15-min talk):
+├─ 3-4 min: End of intro
+├─ 7-8 min: Halfway through results
+└─ 12-13 min: Starting conclusions
+
+Emergency Strategies:
+├─ Running over? Skip backup slides
+├─ Running under? Expand examples
+├─ Lost? Return to time checkpoints
+└─ Technical issue? Verbal summary
+
+Remember: Better to finish early than run over!
+```
+
diff --git a/scientific-skills/scientific-slides/references/beamer_guide.md b/scientific-skills/scientific-slides/references/beamer_guide.md
new file mode 100644
index 0000000..8ce9387
--- /dev/null
+++ b/scientific-skills/scientific-slides/references/beamer_guide.md
@@ -0,0 +1,1019 @@
+# LaTeX Beamer Guide for Scientific Presentations
+
+## Overview
+
+Beamer is a LaTeX document class for creating presentations with professional, consistent formatting. It's particularly well-suited for scientific presentations containing equations, code, algorithms, and citations. This guide covers Beamer basics, themes, customization, and advanced features for effective scientific talks.
+
+## Why Use Beamer?
+
+### Advantages
+
+**Professional Quality**:
+- Consistent, polished appearance
+- Beautiful typography (especially for math)
+- Publication-quality output
+- Professional themes and templates
+
+**Scientific Content**:
+- Native equation support (LaTeX math)
+- Code listings with syntax highlighting
+- Algorithm environments
+- Bibliography integration
+- Cross-referencing
+
+**Reproducibility**:
+- Plain text source (version control friendly)
+- Programmatic figure generation
+- Consistent styling across presentations
+- Easy to maintain and update
+
+**Efficiency**:
+- Reuse content across presentations
+- Template once, use forever
+- Automated elements (page numbers, navigation)
+- No manual formatting
+
+### Disadvantages
+
+**Learning Curve**:
+- Requires LaTeX knowledge
+- Compilation time
+- Debugging can be challenging
+- Less WYSIWYG than PowerPoint
+
+**Flexibility**:
+- Complex custom layouts require effort
+- Image editing requires external tools
+- Some design elements easier in PowerPoint
+- Animations more limited
+
+**Collaboration**:
+- Not ideal for non-LaTeX users
+- Version conflicts possible
+- Requires LaTeX installation
+
+## Basic Beamer Document Structure
+
+### Minimal Example
+
+```latex
+\documentclass{beamer}
+
+% Theme
+\usetheme{Madrid}
+\usecolortheme{beaver}
+
+% Title information
+\title{Your Presentation Title}
+\subtitle{Optional Subtitle}
+\author{Your Name}
+\institute{Your Institution}
+\date{\today}
+
+\begin{document}
+
+% Title slide
+\begin{frame}
+ \titlepage
+\end{frame}
+
+% Content slide
+\begin{frame}{Slide Title}
+ Content goes here
+\end{frame}
+
+\end{document}
+```
+
+### Essential Packages
+
+```latex
+\documentclass{beamer}
+
+% Encoding and fonts
+\usepackage[utf8]{inputenc}
+\usepackage[T1]{fontenc}
+
+% Graphics
+\usepackage{graphicx}
+\graphicspath{{./figures/}}
+
+% Math
+\usepackage{amsmath, amssymb, amsthm}
+
+% Tables
+\usepackage{booktabs}
+\usepackage{multirow}
+
+% Colors
+\usepackage{xcolor}
+
+% Algorithms
+\usepackage{algorithm}
+\usepackage{algorithmic}
+
+% Code listings
+\usepackage{listings}
+
+% Citations
+\usepackage[style=authoryear,backend=biber]{biblatex}
+\addbibresource{references.bib}
+```
+
+### Frame Basics
+
+```latex
+% Basic frame
+\begin{frame}{Title}
+ Content
+\end{frame}
+
+% Frame with subtitle
+\begin{frame}{Title}{Subtitle}
+ Content
+\end{frame}
+
+% Frame without title
+\begin{frame}
+ Content
+\end{frame}
+
+% Fragile frame (for verbatim/code)
+\begin{frame}[fragile]{Code Example}
+ \begin{verbatim}
+ def hello():
+ print("Hello")
+ \end{verbatim}
+\end{frame}
+
+% Plain frame (no header/footer)
+\begin{frame}[plain]
+ Full slide content
+\end{frame}
+```
+
+## Themes and Appearance
+
+### Presentation Themes
+
+Beamer includes many built-in themes controlling overall layout:
+
+**Classic Themes**:
+```latex
+\usetheme{Berlin} % Sections in header
+\usetheme{Copenhagen} % Minimal, clean
+\usetheme{Madrid} % Professional, rounded
+\usetheme{Boadilla} % Simple footer
+\usetheme{AnnArbor} % Vertical navigation
+```
+
+**Modern Themes**:
+```latex
+\usetheme{CambridgeUS} % Blue theme
+\usetheme{Singapore} % Minimalist
+\usetheme{Rochester} % Very minimal
+\usetheme{Antibes} % Tree navigation
+```
+
+**Popular for Science**:
+```latex
+% Clean and minimal
+\usetheme{default}
+\usetheme{Copenhagen}
+
+% Professional with navigation
+\usetheme{Madrid}
+\usetheme{Berlin}
+
+% Traditional academic
+\usetheme{Pittsburgh}
+\usetheme{Boadilla}
+```
+
+### Color Themes
+
+```latex
+% Blue themes
+\usecolortheme{default} % Blue
+\usecolortheme{dolphin} % Cyan-blue
+\usecolortheme{seagull} % Grayscale
+
+% Warm themes
+\usecolortheme{beaver} % Red/brown
+\usecolortheme{rose} % Pink/red
+
+% Nature themes
+\usecolortheme{orchid} % Purple
+\usecolortheme{crane} % Orange/yellow
+
+% Professional
+\usecolortheme{albatross} % Gray/blue
+```
+
+### Font Themes
+
+```latex
+\usefonttheme{default} % Standard
+\usefonttheme{serif} % Serif fonts
+\usefonttheme{structurebold} % Bold structure
+\usefonttheme{structureitalicserif} % Italic serif
+\usefonttheme{professionalfonts} % Professional fonts
+```
+
+### Custom Colors
+
+```latex
+% Define custom colors
+\definecolor{myblue}{RGB}{0,115,178}
+\definecolor{myred}{RGB}{214,40,40}
+
+% Apply to theme elements
+\setbeamercolor{structure}{fg=myblue}
+\setbeamercolor{title}{fg=myred}
+\setbeamercolor{frametitle}{fg=myblue,bg=white}
+\setbeamercolor{block title}{fg=white,bg=myblue}
+```
+
+### Minimal Custom Theme
+
+```latex
+% Remove navigation symbols
+\setbeamertemplate{navigation symbols}{}
+
+% Page numbers
+\setbeamertemplate{footline}[frame number]
+
+% Simple itemize
+\setbeamertemplate{itemize items}[circle]
+
+% Clean blocks
+\setbeamertemplate{blocks}[rounded][shadow=false]
+
+% Colors
+\setbeamercolor{structure}{fg=blue!70!black}
+\setbeamercolor{title}{fg=black}
+\setbeamercolor{frametitle}{fg=blue!70!black}
+```
+
+## Content Elements
+
+### Lists
+
+**Itemize**:
+```latex
+\begin{frame}{Bullet Points}
+ \begin{itemize}
+ \item First point
+ \item Second point
+ \begin{itemize}
+ \item Nested point
+ \end{itemize}
+ \item Third point
+ \end{itemize}
+\end{frame}
+```
+
+**Enumerate**:
+```latex
+\begin{frame}{Numbered List}
+ \begin{enumerate}
+ \item First item
+ \item Second item
+ \item Third item
+ \end{enumerate}
+\end{frame}
+```
+
+**Description**:
+```latex
+\begin{frame}{Definitions}
+ \begin{description}
+ \item[Term 1] Definition of term 1
+ \item[Term 2] Definition of term 2
+ \end{description}
+\end{frame}
+```
+
+### Columns
+
+```latex
+\begin{frame}{Two Column Layout}
+ \begin{columns}
+
+ % Left column
+ \begin{column}{0.5\textwidth}
+ \begin{itemize}
+ \item Point 1
+ \item Point 2
+ \end{itemize}
+ \end{column}
+
+ % Right column
+ \begin{column}{0.5\textwidth}
+ \includegraphics[width=\textwidth]{figure.png}
+ \end{column}
+
+ \end{columns}
+\end{frame}
+```
+
+**Three Column Layout**:
+```latex
+\begin{columns}[T] % Align at top
+ \begin{column}{0.32\textwidth}
+ Content A
+ \end{column}
+ \begin{column}{0.32\textwidth}
+ Content B
+ \end{column}
+ \begin{column}{0.32\textwidth}
+ Content C
+ \end{column}
+\end{columns}
+```
+
+### Figures
+
+```latex
+\begin{frame}{Figure Example}
+ \begin{figure}
+ \centering
+ \includegraphics[width=0.8\textwidth]{figure.pdf}
+ \caption{Figure caption text}
+ \end{figure}
+\end{frame}
+```
+
+**Side-by-Side Figures**:
+```latex
+\begin{frame}{Comparison}
+ \begin{columns}
+ \begin{column}{0.5\textwidth}
+ \includegraphics[width=\textwidth]{fig1.pdf}
+ \caption{Condition A}
+ \end{column}
+ \begin{column}{0.5\textwidth}
+ \includegraphics[width=\textwidth]{fig2.pdf}
+ \caption{Condition B}
+ \end{column}
+ \end{columns}
+\end{frame}
+```
+
+**Subfigures**:
+```latex
+\usepackage{subcaption}
+
+\begin{frame}{Multiple Panels}
+ \begin{figure}
+ \centering
+ \begin{subfigure}{0.45\textwidth}
+ \includegraphics[width=\textwidth]{fig1.pdf}
+ \caption{Panel A}
+ \end{subfigure}
+ \hfill
+ \begin{subfigure}{0.45\textwidth}
+ \includegraphics[width=\textwidth]{fig2.pdf}
+ \caption{Panel B}
+ \end{subfigure}
+ \caption{Overall figure caption}
+ \end{figure}
+\end{frame}
+```
+
+### Tables
+
+```latex
+\begin{frame}{Table Example}
+ \begin{table}
+ \centering
+ \begin{tabular}{lcc}
+ \toprule
+ Method & Accuracy & Time \\
+ \midrule
+ Method A & 0.85 & 10s \\
+ Method B & 0.92 & 25s \\
+ Method C & 0.88 & 15s \\
+ \bottomrule
+ \end{tabular}
+ \caption{Performance comparison}
+ \end{table}
+\end{frame}
+```
+
+### Blocks
+
+**Standard Blocks**:
+```latex
+\begin{frame}{Block Examples}
+
+ % Standard block
+ \begin{block}{Block Title}
+ Block content goes here
+ \end{block}
+
+ % Alert block (red)
+ \begin{alertblock}{Important}
+ Warning or important information
+ \end{alertblock}
+
+ % Example block (green)
+ \begin{exampleblock}{Example}
+ Example content
+ \end{exampleblock}
+
+\end{frame}
+```
+
+**Theorem Environments**:
+```latex
+\begin{frame}{Mathematical Results}
+
+ \begin{theorem}
+ Statement of theorem
+ \end{theorem}
+
+ \begin{proof}
+ Proof goes here
+ \end{proof}
+
+ \begin{definition}
+ Definition text
+ \end{definition}
+
+ \begin{lemma}
+ Lemma statement
+ \end{lemma}
+
+\end{frame}
+```
+
+## Overlays and Animations
+
+### Progressive Disclosure with \pause
+
+```latex
+\begin{frame}{Revealing Content}
+ First point appears immediately
+
+ \pause
+
+ Second point appears on click
+
+ \pause
+
+ Third point appears on another click
+\end{frame}
+```
+
+### Overlay Specifications
+
+**Itemize with Overlays**:
+```latex
+\begin{frame}{Sequential Bullets}
+ \begin{itemize}
+ \item<1-> Appears on slide 1 and stays
+ \item<2-> Appears on slide 2 and stays
+ \item<3-> Appears on slide 3 and stays
+ \end{itemize}
+\end{frame}
+```
+
+**Alternative Syntax**:
+```latex
+\begin{frame}{Sequential Bullets}
+ \begin{itemize}[<+->] % Automatically sequential
+ \item First point
+ \item Second point
+ \item Third point
+ \end{itemize}
+\end{frame}
+```
+
+### Highlighting with Overlays
+
+**Alert on Specific Slides**:
+```latex
+\begin{frame}{Highlighting}
+ \begin{itemize}
+ \item Normal text
+ \item<2-| alert@2> Text highlighted on slide 2
+ \item Normal text
+ \end{itemize}
+\end{frame}
+```
+
+**Temporary Appearance**:
+```latex
+\begin{frame}{Appearing and Disappearing}
+ Appears on all slides
+
+ \only<2>{Only visible on slide 2}
+
+ \uncover<3->{Appears on slide 3 and stays}
+
+ \visible<4->{Also appears on slide 4, but reserves space}
+\end{frame}
+```
+
+### Building Complex Figures
+
+```latex
+\begin{frame}{Building a Figure}
+ \begin{tikzpicture}
+ % Base elements (always visible)
+ \draw (0,0) rectangle (4,3);
+
+ % Add on slide 2+
+ \draw<2-> (1,1) circle (0.5);
+
+ % Add on slide 3+
+ \draw<3->[->, thick] (2,1.5) -- (3,2);
+
+ % Highlight on slide 4
+ \node<4>[red,thick] at (2,1.5) {Result};
+ \end{tikzpicture}
+\end{frame}
+```
+
+## Mathematical Content
+
+### Equations
+
+**Inline Math**:
+```latex
+\begin{frame}{Inline Math}
+ The equation $E = mc^2$ is famous.
+
+ We can also write $\alpha + \beta = \gamma$.
+\end{frame}
+```
+
+**Display Math**:
+```latex
+\begin{frame}{Display Equations}
+ Single equation:
+ \begin{equation}
+ f(x) = \int_{-\infty}^{\infty} e^{-x^2} dx = \sqrt{\pi}
+ \end{equation}
+
+ Multiple equations:
+ \begin{align}
+ E &= mc^2 \\
+ F &= ma \\
+ V &= IR
+ \end{align}
+\end{frame}
+```
+
+**Equation Arrays**:
+```latex
+\begin{frame}{Equation System}
+ \begin{equation}
+ \begin{cases}
+ \dot{x} = f(x,y) \\
+ \dot{y} = g(x,y)
+ \end{cases}
+ \end{equation}
+\end{frame}
+```
+
+### Matrices
+
+```latex
+\begin{frame}{Matrix Example}
+ \begin{equation}
+ A = \begin{bmatrix}
+ a_{11} & a_{12} & a_{13} \\
+ a_{21} & a_{22} & a_{23} \\
+ a_{31} & a_{32} & a_{33}
+ \end{bmatrix}
+ \end{equation}
+\end{frame}
+```
+
+## Code and Algorithms
+
+### Code Listings
+
+```latex
+\begin{frame}[fragile]{Python Code}
+ \begin{lstlisting}[language=Python]
+def fibonacci(n):
+ if n <= 1:
+ return n
+ return fibonacci(n-1) + fibonacci(n-2)
+ \end{lstlisting}
+\end{frame}
+```
+
+**Custom Code Styling**:
+```latex
+\lstset{
+ language=Python,
+ basicstyle=\ttfamily\small,
+ keywordstyle=\color{blue},
+ commentstyle=\color{green!60!black},
+ stringstyle=\color{orange},
+ numbers=left,
+ numberstyle=\tiny,
+ frame=single,
+ breaklines=true
+}
+
+\begin{frame}[fragile]{Styled Code}
+ \begin{lstlisting}
+ # This is a comment
+ def hello(name):
+ """Greet someone"""
+ print(f"Hello, {name}")
+ \end{lstlisting}
+\end{frame}
+```
+
+### Algorithms
+
+```latex
+\begin{frame}{Algorithm Example}
+ \begin{algorithm}[H]
+ \caption{Quicksort}
+ \begin{algorithmic}[1]
+ \REQUIRE Array $A$, indices $low$, $high$
+ \ENSURE Sorted array
+ \IF{$low < high$}
+ \STATE $pivot \gets partition(A, low, high)$
+ \STATE $quicksort(A, low, pivot-1)$
+ \STATE $quicksort(A, pivot+1, high)$
+ \ENDIF
+ \end{algorithmic}
+ \end{algorithm}
+\end{frame}
+```
+
+## Citations and Bibliography
+
+### Inline Citations
+
+```latex
+\begin{frame}{Background}
+ Previous work \cite{smith2020} showed that...
+
+ Multiple studies \cite{jones2019,brown2021} have found...
+
+ According to \textcite{davis2022}, the method works by...
+\end{frame}
+```
+
+### Bibliography Slide
+
+```latex
+% At end of presentation
+\begin{frame}[allowframebreaks]{References}
+ \printbibliography
+\end{frame}
+```
+
+### Custom Bibliography Style
+
+```latex
+% In preamble
+\usepackage[style=authoryear,maxbibnames=2,maxcitenames=2]{biblatex}
+\addbibresource{references.bib}
+
+% Smaller font for references
+\renewcommand*{\bibfont}{\scriptsize}
+```
+
+## Advanced Features
+
+### Section Organization
+
+```latex
+\section{Introduction}
+\begin{frame}{Introduction}
+ Content
+\end{frame}
+
+\section{Methods}
+\begin{frame}{Methods}
+ Content
+\end{frame}
+
+% Automatic outline
+\begin{frame}{Outline}
+ \tableofcontents
+\end{frame}
+
+% Outline at each section
+\AtBeginSection{
+ \begin{frame}{Outline}
+ \tableofcontents[currentsection]
+ \end{frame}
+}
+```
+
+### Backup Slides
+
+```latex
+% Main presentation ends
+\begin{frame}{Thank You}
+ Questions?
+\end{frame}
+
+% Backup slides (not counted in numbering)
+\appendix
+
+\begin{frame}{Extra Data}
+ Additional analysis for questions
+\end{frame}
+
+\begin{frame}{Detailed Methods}
+ More methodological details
+\end{frame}
+```
+
+### Hyperlinks
+
+```latex
+% Define labels
+\begin{frame}{Main Result}
+ \label{mainresult}
+ This is the main finding.
+\end{frame}
+
+% Link to labeled frame
+\begin{frame}{Reference}
+ As shown in the \hyperlink{mainresult}{main result}...
+\end{frame}
+
+% External links
+\begin{frame}{Resources}
+ Visit \url{https://example.com} for more information.
+
+ \href{https://github.com/user/repo}{GitHub Repository}
+\end{frame}
+```
+
+### QR Codes
+
+```latex
+\usepackage{qrcode}
+
+\begin{frame}{Scan for Paper}
+ \begin{center}
+ \qrcode[height=3cm]{https://doi.org/10.1234/paper}
+
+ \vspace{0.5cm}
+ Scan for full paper
+ \end{center}
+\end{frame}
+```
+
+### Multimedia
+
+```latex
+\usepackage{multimedia}
+
+\begin{frame}{Video}
+ \movie[width=8cm,height=6cm]{Click to play}{video.mp4}
+\end{frame}
+```
+
+**Note**: Multimedia support varies by PDF viewer.
+
+## TikZ Graphics
+
+### Basic Shapes
+
+```latex
+\usepackage{tikz}
+
+\begin{frame}{TikZ Example}
+ \begin{tikzpicture}
+ % Rectangle
+ \draw (0,0) rectangle (2,1);
+
+ % Circle
+ \draw (3,0.5) circle (0.5);
+
+ % Line with arrow
+ \draw[->, thick] (0,0) -- (3,2);
+
+ % Node with text
+ \node at (1.5,2) {Label};
+ \end{tikzpicture}
+\end{frame}
+```
+
+### Flowcharts
+
+```latex
+\usetikzlibrary{shapes,arrows,positioning}
+
+\begin{frame}{Workflow}
+ \begin{tikzpicture}[node distance=2cm]
+ \node[rectangle,draw] (start) {Start};
+ \node[rectangle,draw,right=of start] (process) {Process};
+ \node[rectangle,draw,right=of process] (end) {End};
+
+ \draw[->,thick] (start) -- (process);
+ \draw[->,thick] (process) -- (end);
+ \end{tikzpicture}
+\end{frame}
+```
+
+### Plots
+
+```latex
+\usepackage{pgfplots}
+\pgfplotsset{compat=1.18}
+
+\begin{frame}{Data Plot}
+ \begin{tikzpicture}
+ \begin{axis}[
+ xlabel={$x$},
+ ylabel={$y$},
+ width=8cm,
+ height=6cm
+ ]
+ \addplot[blue,thick] coordinates {
+ (0,0) (1,1) (2,4) (3,9)
+ };
+ \addplot[red,dashed] {x};
+ \end{axis}
+ \end{tikzpicture}
+\end{frame}
+```
+
+## Compilation
+
+### Basic Compilation
+
+```bash
+# Standard compilation
+pdflatex presentation.tex
+
+# With bibliography
+pdflatex presentation.tex
+biber presentation
+pdflatex presentation.tex
+pdflatex presentation.tex
+```
+
+### Modern Compilation (Recommended)
+
+```bash
+# Using latexmk (automated)
+latexmk -pdf presentation.tex
+
+# With continuous preview
+latexmk -pdf -pvc presentation.tex
+```
+
+### Compilation Options
+
+```bash
+# Faster compilation (draft mode)
+pdflatex -draftmode presentation.tex
+
+# Specific engine
+lualatex presentation.tex # Better Unicode support
+xelatex presentation.tex # System fonts
+
+# Output directory
+pdflatex -output-directory=build presentation.tex
+```
+
+## Handouts and Notes
+
+### Creating Handouts
+
+```latex
+% In preamble
+\documentclass[handout]{beamer}
+
+% This removes overlays and creates one frame per slide
+```
+
+### Speaker Notes
+
+```latex
+\usepackage{pgfpages}
+\setbeameroption{show notes on second screen=right}
+
+\begin{frame}{Slide Title}
+ Slide content visible to audience
+
+ \note{
+ These notes are visible only to speaker:
+ - Remember to emphasize X
+ - Mention collaboration with Y
+ - Expect question about Z
+ }
+\end{frame}
+```
+
+### Handout with Notes
+
+```latex
+\documentclass[handout]{beamer}
+\usepackage{pgfpages}
+\pgfpagesuselayout{2 on 1}[a4paper,border shrink=5mm]
+```
+
+## Best Practices
+
+### Do's
+
+- ✅ Use consistent theme throughout
+- ✅ Keep equations simple and large
+- ✅ Use progressive disclosure (\pause, overlays)
+- ✅ Include frame numbers
+- ✅ Use vector graphics (PDF) for figures
+- ✅ Test compilation early and often
+- ✅ Use meaningful section names
+- ✅ Keep backup slides in appendix
+
+### Don'ts
+
+- ❌ Don't use too many different fonts or colors
+- ❌ Don't fill slides with dense text
+- ❌ Don't use tiny font sizes
+- ❌ Don't include complex animations (limited support)
+- ❌ Don't forget fragile frames for code
+- ❌ Don't mix themes inconsistently
+- ❌ Don't ignore compilation warnings
+
+## Troubleshooting
+
+### Common Issues
+
+**Missing Fragile**:
+```
+Error: Verbatim environment in frame
+Solution: Add [fragile] option to frame
+```
+
+**Package Conflicts**:
+```
+Error: Option clash for package X
+Solution: Load package in preamble only once
+```
+
+**Image Not Found**:
+```
+Error: File `figure.pdf' not found
+Solution: Check path, use \graphicspath, ensure file exists
+```
+
+**Overlay Issues**:
+```
+Problem: Overlays not working as expected
+Solution: Check syntax vs , test incremental builds
+```
+
+### Debugging Tips
+
+```latex
+% Show frame labels
+\usepackage[notref,notcite]{showkeys}
+
+% Draft mode (faster, shows boxes)
+\documentclass[draft]{beamer}
+
+% Verbose error messages
+\errorcontextlines=999
+```
+
+## Templates and Examples
+
+### Minimal Working Example
+
+See `assets/beamer_template_conference.tex` for a complete, customizable template for conference talks.
+
+### Resources
+
+- Beamer User Guide: `texdoc beamer`
+- Theme Gallery: https://deic.uab.cat/~iblanes/beamer_gallery/
+- TikZ Examples: https://texample.net/tikz/
+
+## Summary
+
+Beamer excels at:
+- Mathematical content
+- Consistent professional formatting
+- Reproducible presentations
+- Version control
+- Citations and cross-references
+
+Choose Beamer when:
+- Presentation contains significant math/equations
+- You value version control and plain text
+- Consistent styling is priority
+- You're comfortable with LaTeX
+
+Consider PowerPoint when:
+- Extensive custom graphics needed
+- Collaborating with non-LaTeX users
+- Complex animations required
+- Rapid prototyping needed
diff --git a/scientific-skills/scientific-slides/references/data_visualization_slides.md b/scientific-skills/scientific-slides/references/data_visualization_slides.md
new file mode 100644
index 0000000..9090989
--- /dev/null
+++ b/scientific-skills/scientific-slides/references/data_visualization_slides.md
@@ -0,0 +1,708 @@
+# Data Visualization for Slides
+
+## Overview
+
+Effective data visualization in presentations differs fundamentally from journal figures. While publications prioritize comprehensive detail, presentation slides must emphasize clarity, impact, and immediate comprehension. This guide covers adapting figures for slides, choosing appropriate chart types, and avoiding common visualization mistakes.
+
+## Key Principles for Presentation Figures
+
+### 1. Simplify, Don't Replicate
+
+**The Core Difference**:
+- **Journal figures**: Dense, detailed, for careful study
+- **Presentation figures**: Clear, simplified, for quick understanding
+
+**Simplification Strategies**:
+
+**Remove Non-Essential Elements**:
+- ❌ Minor gridlines
+- ❌ Detailed legends (label directly instead)
+- ❌ Multiple panels (split into separate slides)
+- ❌ Secondary axes (rarely work in presentations)
+- ❌ Dense tick marks and minor labels
+
+**Focus on Key Message**:
+- Show only the data supporting your current point
+- Subset data if full dataset is overwhelming
+- Highlight the specific comparison you're discussing
+- Remove context that isn't immediately relevant
+
+**Example Transformation**:
+```
+Journal Figure:
+- 6 panels (A-F)
+- 4 experimental conditions per panel
+- 50+ data points visible
+- Complex statistical annotations
+- Small font labels
+
+Presentation Version:
+- 3 separate slides (1-2 panels each)
+- Focus on key comparison per slide
+- Large, clear data representation
+- One statistical result highlighted
+- Large, readable labels
+```
+
+### 2. Emphasize Visual Hierarchy
+
+**Guide Attention**:
+- Make key result visually dominant
+- De-emphasize background or comparison data
+- Use size, color, and position strategically
+
+**Techniques**:
+
+**Color Emphasis**:
+```
+Main Result: Bold, saturated color (e.g., blue)
+Comparison: Muted gray or desaturated color
+Background: Very light gray or white
+```
+
+**Size Emphasis**:
+```
+Key line/bar: Thicker (3-4pt)
+Reference lines: Thinner (1-2pt)
+Grid lines: Very thin (0.5pt) or remove
+```
+
+**Annotation**:
+```
+Add text callouts: "34% increase" with arrow
+Add shapes: Circle key region
+Add color highlights: Background shading for important area
+```
+
+### 3. Maximize Readability
+
+**Font Sizes for Presentations**:
+- **Axis labels**: 18-24pt minimum
+- **Tick labels**: 16-20pt minimum
+- **Title**: 24-32pt
+- **Legend**: 16-20pt (or label directly on plot)
+- **Annotations**: 18-24pt
+
+**The Distance Test**:
+- If your figure isn't readable at 2-3 feet from your laptop screen, it won't work in a presentation
+- Test by stepping back from screen
+- Better to split into multiple simpler figures
+
+**Line and Marker Sizes**:
+- **Lines**: 2-4pt thickness (thicker than journal figures)
+- **Markers**: 8-12pt size
+- **Error bars**: 1.5-2pt thickness
+- **Bars**: Adequate width with clear spacing
+
+### 4. Use Progressive Disclosure
+
+**Build Complex Figures Incrementally**:
+
+Instead of showing complete figure at once:
+1. **Baseline**: Show axes and basic setup
+2. **Data Group 1**: Add first dataset
+3. **Data Group 2**: Add comparison dataset
+4. **Highlight**: Emphasize key difference
+5. **Interpretation**: Add annotation with finding
+
+**Benefits**:
+- Controls audience attention
+- Prevents information overload
+- Guides interpretation
+- Emphasizes narrative structure
+
+**Implementation**:
+- PowerPoint: Use animation to reveal layers
+- Beamer: Use `\pause` or overlays
+- Static: Create sequence of slides building the figure
+
+## Chart Types and When to Use Them
+
+### Bar Charts
+
+**Best For**:
+- Comparing discrete categories
+- Showing counts or frequencies
+- Highlighting differences between groups
+
+**Presentation Optimization**:
+```
+✅ DO:
+- Large, clear bars with adequate spacing
+- Horizontal bars for long category names
+- Direct labeling on bars (not legend)
+- Order by value (highest to lowest) unless natural order exists
+- Start y-axis at zero for accurate visual comparison
+
+❌ DON'T:
+- Too many categories (max 8-10)
+- 3D bars (distorts perception)
+- Multiple grouped comparisons (split to separate slides)
+- Decorative patterns or gradients
+```
+
+**Example Enhancement**:
+```
+Before: 12 categories, small fonts, legend
+After: Top 6 categories only, large fonts, direct labels, key bar highlighted
+```
+
+### Line Graphs
+
+**Best For**:
+- Trends over time
+- Continuous data relationships
+- Comparing trajectories
+
+**Presentation Optimization**:
+```
+✅ DO:
+- Thick lines (2-4pt)
+- Distinct colors AND line styles (solid, dashed, dotted)
+- Direct line labeling (at end of lines, not legend)
+- Highlight key line with color/thickness
+- Minimal gridlines or none
+- Clear markers at data points
+
+❌ DON'T:
+- More than 4-5 lines per plot
+- Similar colors (ensure high contrast)
+- Small markers or thin lines
+- Cluttered with excess gridlines
+```
+
+**Time Series Tips**:
+- Mark key events or interventions with vertical lines
+- Annotate important time points
+- Use shaded regions for different phases
+
+### Scatter Plots
+
+**Best For**:
+- Relationships between two variables
+- Correlations
+- Distributions
+- Outliers
+
+**Presentation Optimization**:
+```
+✅ DO:
+- Large, distinct markers (8-12pt)
+- Color code groups clearly
+- Show trendline if discussing correlation
+- Annotate key points (outliers, examples)
+- Report R² or p-value directly on plot
+
+❌ DON'T:
+- Overplot (too many overlapping points)
+- Small markers
+- Multiple marker types that look similar
+- Missing scale information
+```
+
+**Overplotting Solutions**:
+- Transparency (alpha) for overlapping points
+- Hexbin or density plots for very large datasets
+- Random jitter for discrete data
+- Marginal distributions on axes
+
+### Box Plots / Violin Plots
+
+**Best For**:
+- Distribution comparisons
+- Showing variability and outliers
+- Multiple group comparisons
+
+**Presentation Optimization**:
+```
+✅ DO:
+- Large, clear boxes
+- Color code groups
+- Add individual data points if n is small (< 30)
+- Annotate median or mean values
+- Explain components (quartiles, whiskers) first time shown
+
+❌ DON'T:
+- Assume audience knows box plot conventions
+- Use without brief explanation
+- Too many groups (max 6-8)
+- Omit axis labels and units
+```
+
+**First Use**:
+If your audience may be unfamiliar, briefly explain: "Box shows middle 50% of data, line is median, whiskers show range"
+
+### Heatmaps
+
+**Best For**:
+- Matrix data
+- Gene expression or correlation patterns
+- Large datasets with patterns
+
+**Presentation Optimization**:
+```
+✅ DO:
+- Large cells (readable grid)
+- Clear, intuitive color scale (diverging or sequential)
+- Label rows and columns with large fonts
+- Show color scale legend prominently
+- Cluster or order meaningfully
+- Highlight key region with border
+
+❌ DON'T:
+- Too many rows/columns (200×200 matrix unreadable)
+- Poor color scales (rainbow, red-green)
+- Missing dendrograms if claiming clusters
+- Tiny labels
+```
+
+**Simplification**:
+- Show subset of most interesting rows/columns
+- Zoom to relevant region
+- Split large heatmap across multiple slides
+
+### Network Diagrams
+
+**Best For**:
+- Relationships and connections
+- Pathways and networks
+- Hierarchical structures
+
+**Presentation Optimization**:
+```
+✅ DO:
+- Large nodes and labels
+- Clear edge directionality (arrows)
+- Color or size code importance
+- Highlight path of interest
+- Simplify to essential connections
+- Use layout that minimizes crossing edges
+
+❌ DON'T:
+- Show entire complex network at once
+- Hairball diagrams (too many connections)
+- Small labels on nodes
+- Unclear what nodes and edges represent
+```
+
+**Build Strategy**:
+1. Show simplified structure
+2. Add key nodes progressively
+3. Highlight path or subnetwork of interest
+4. Annotate with functional interpretation
+
+### Statistical Plots
+
+**Kaplan-Meier Survival Curves**:
+```
+✅ Optimize:
+- Thick lines (3-4pt)
+- Show confidence intervals as shaded regions
+- Mark censored observations clearly
+- Report hazard ratio and p-value on plot
+- Extend axes to show full follow-up
+```
+
+**Forest Plots**:
+```
+✅ Optimize:
+- Large markers (diamonds or squares)
+- Clear confidence interval bars
+- Large font for study names
+- Highlight overall estimate
+- Show line of no effect prominently
+```
+
+**ROC Curves**:
+```
+✅ Optimize:
+- Thick curve line
+- Show diagonal reference line (AUC = 0.5)
+- Report AUC with confidence interval on plot
+- Mark optimal threshold if discussing cutpoint
+- Compare ≤ 3 curves per plot
+```
+
+## Color in Data Visualizations
+
+### Sequential Color Scales
+
+**When to Use**: Ordered data (low to high)
+
+**Good Palettes**:
+- Blues: Light blue → Dark blue
+- Greens: Light green → Dark green
+- Grays: Light gray → Black
+- Viridis: Yellow → Purple (perceptually uniform)
+
+**Avoid**:
+- Rainbow scales (non-uniform perception)
+- Red-green scales (color blindness)
+
+### Diverging Color Scales
+
+**When to Use**: Data with meaningful midpoint (e.g., +/− change, correlation from -1 to +1)
+
+**Good Palettes**:
+- Blue → White → Red
+- Purple → White → Orange
+- Blue → Gray → Orange
+
+**Key Principle**: Midpoint should be visually neutral (white or light gray)
+
+### Categorical Colors
+
+**When to Use**: Distinct groups with no order
+
+**Good Practices**:
+- Maximum 5-7 colors for clarity
+- High contrast between adjacent categories
+- Color-blind safe combinations
+- Consistent color mapping across slides
+
+**Example Set**:
+```
+Blue (#0173B2)
+Orange (#DE8F05)
+Green (#029E73)
+Purple (#CC78BC)
+Red (#CA3542)
+```
+
+### Highlight Colors
+
+**Strategy**: Use color to direct attention
+
+```
+Main Result: Bright, saturated color (e.g., blue)
+Comparison: Neutral (gray) or muted color
+Background: Very light gray or white
+```
+
+**Example Application**:
+- Bar chart: Key bar in blue, others in light gray
+- Line plot: Main line in bold blue, reference lines in thin gray
+- Scatter: Group of interest in color, others faded
+
+## Common Visualization Mistakes
+
+### Mistake 1: Overwhelming Complexity
+
+**Problem**: Showing too much data at once
+
+**Example**:
+- Figure with 12 panels
+- Each panel has 6 experimental conditions
+- Tiny fonts and dense layout
+- Audience has 10 seconds to process
+
+**Solution**:
+- Split into 3-4 slides
+- One comparison per slide
+- Focus on key result
+- Build understanding progressively
+
+### Mistake 2: Illegible Labels
+
+**Problem**: Text too small to read
+
+**Common Issues**:
+- 8-10pt axis labels (need ≥18pt)
+- Tiny legend text
+- Subscripts and superscripts disappear
+- Fine-print p-values
+
+**Solution**:
+- Recreate figures for presentation (don't use journal versions directly)
+- Test readability from distance
+- Remove or enlarge small text
+- Put detailed statistics in notes
+
+### Mistake 3: Chart Junk
+
+**Problem**: Unnecessary decorative elements
+
+**Examples**:
+- 3D effects on 2D data
+- Excessive gridlines
+- Distracting backgrounds
+- Decorative borders or shadows
+- Animation for decoration only
+
+**Solution**:
+- Remove all non-data ink
+- Maximize data-ink ratio
+- Clean, minimal design
+- Let data be the focus
+
+### Mistake 4: Misleading Scales
+
+**Problem**: Visual representation distorts data
+
+**Examples**:
+- Bar charts not starting at zero
+- Truncated y-axes exaggerating differences
+- Inconsistent scales between panels
+- Log scales without clear labeling
+
+**Solution**:
+- Bar charts: Always start at zero
+- Line charts: Can truncate, but make clear
+- Label log scales explicitly
+- Maintain consistent scales for comparisons
+
+### Mistake 5: Poor Color Choices
+
+**Problem**: Colors reduce clarity or accessibility
+
+**Examples**:
+- Red-green for color-blind audience
+- Low contrast (yellow on white)
+- Too many colors
+- Inconsistent color meaning
+
+**Solution**:
+- Use color-blind safe palettes
+- Test contrast (minimum 4.5:1)
+- Limit to 5-7 colors maximum
+- Consistent meaning across slides
+
+### Mistake 6: Missing Context
+
+**Problem**: Audience can't interpret visualization
+
+**Missing Elements**:
+- Axis labels or units
+- Sample sizes (n)
+- Error bar meaning (SEM vs SD vs CI)
+- Statistical significance indicators
+- Scale or reference points
+
+**Solution**:
+- Label everything clearly
+- Define abbreviations
+- Report key statistics on plot
+- Provide reference for comparison
+
+### Mistake 7: Inefficient Chart Type
+
+**Problem**: Wrong visualization for data type
+
+**Examples**:
+- Pie chart for >5 categories (use bar chart)
+- 3D pie chart (especially bad)
+- Dual y-axes (confusing)
+- Line plot for discrete categories (use bar chart)
+
+**Solution**:
+- Match chart type to data type
+- Consider what comparison you're showing
+- Choose format that makes pattern obvious
+- Test if message is immediately clear
+
+## Progressive Disclosure Techniques
+
+### Building a Complex Figure
+
+**Scenario**: Showing multi-panel experimental result
+
+**Approach 1: Sequential Panels**
+```
+Slide 1: Panel A only (baseline condition)
+Slide 2: Panels A+B (add treatment effect)
+Slide 3: Panels A+B+C (add time course)
+Slide 4: All panels with interpretation overlay
+```
+
+**Approach 2: Layered Data**
+```
+Slide 1: Axes and experimental design schematic
+Slide 2: Add control group data
+Slide 3: Add treatment group data
+Slide 4: Highlight difference, show statistics
+```
+
+**Approach 3: Zoom and Context**
+```
+Slide 1: Full dataset overview
+Slide 2: Zoom to interesting region
+Slide 3: Highlight specific points in zoomed view
+```
+
+### Animation vs. Multiple Slides
+
+**Use Animation** (PowerPoint/Beamer overlays):
+- Building bullet points
+- Adding layers to same plot
+- Highlighting different regions sequentially
+- Smooth transitions within a concept
+
+**Use Separate Slides**:
+- Different data or experiments
+- Major conceptual shifts
+- Want to return to previous view
+- Need to control timing flexibly
+
+## Figure Preparation Workflow
+
+### Step 1: Start with High-Quality Source
+
+**For Generated Figures**:
+- Export at high resolution (300 DPI minimum)
+- Vector formats preferred (PDF, SVG)
+- Large size (can scale down, not up)
+- Clean, professional appearance
+
+**For Published Figures**:
+- Request high-resolution versions from authors/publishers
+- Recreate if source not available
+- Check reuse permissions
+
+### Step 2: Simplify for Presentation
+
+**Edit in Graphics Software**:
+- Remove non-essential panels
+- Enlarge fonts and labels
+- Increase line widths and marker sizes
+- Remove or simplify legends
+- Add direct labels
+- Remove excess gridlines
+
+**Tools**:
+- Adobe Illustrator (vector editing)
+- Inkscape (free vector editing)
+- PowerPoint/Keynote (basic editing)
+- Python/R (programmatic recreation)
+
+### Step 3: Optimize for Projection
+
+**Check**:
+- ✅ Readable from 10 feet away
+- ✅ High contrast between elements
+- ✅ Large enough to fill significant slide area
+- ✅ Maintains quality when projected
+- ✅ Works in various lighting conditions
+
+**Test**:
+- View on different screens
+- Project if possible before talk
+- Print at small scale (simulates distance)
+- Check in grayscale (color-blind simulation)
+
+### Step 4: Add Context and Annotations
+
+**Enhancements**:
+- Arrows pointing to key features
+- Text boxes with key findings ("p < 0.001")
+- Circles or rectangles highlighting regions
+- Color coding matched to verbal description
+- Reference lines or benchmarks
+
+**Verbal Integration**:
+- Plan what you'll say about each element
+- Use "Notice that..." or "Here you can see..."
+- Point to specific features during talk
+- Explain axes and scales first time shown
+
+## Recreating Journal Figures for Presentations
+
+### When to Recreate
+
+**Recreate When**:
+- Original has small fonts
+- Too many panels for one slide
+- Multiple comparisons to parse
+- Colors not accessible
+- Data available to you
+
+**Reuse When**:
+- Already simple and clear
+- Appropriate font sizes
+- Single focused message
+- High resolution available
+- Remaking not feasible
+
+### Recreation Tools
+
+**Python (matplotlib, seaborn)**:
+```python
+import matplotlib.pyplot as plt
+import seaborn as sns
+
+# Set presentation-friendly defaults
+plt.rcParams['font.size'] = 18
+plt.rcParams['axes.linewidth'] = 2
+plt.rcParams['lines.linewidth'] = 3
+plt.rcParams['figure.figsize'] = (10, 6)
+
+# Create plot with large, clear elements
+# Export as high-res PNG or PDF
+```
+
+**R (ggplot2)**:
+```r
+library(ggplot2)
+
+# Presentation theme
+theme_presentation <- theme_minimal() +
+ theme(
+ text = element_text(size = 18),
+ axis.text = element_text(size = 16),
+ axis.title = element_text(size = 20),
+ legend.text = element_text(size = 16)
+ )
+
+# Apply to plots
+ggplot(data, aes(x, y)) + geom_point(size=4) + theme_presentation
+```
+
+**GraphPad Prism**:
+- Increase font sizes in Format Axes
+- Thicken lines in Format Graph
+- Enlarge symbols
+- Export as high-resolution image
+
+**Excel/PowerPoint**:
+- Select chart, Format → Text Options → Size (increase to 18-24pt)
+- Format → Line → Width (increase to 2-3pt)
+- Format → Marker → Size (increase to 10-12pt)
+
+## Summary Checklist
+
+Before including a figure in your presentation:
+
+**Clarity**:
+- [ ] One clear message per figure
+- [ ] Immediately understandable (< 5 seconds)
+- [ ] Appropriate chart type for data
+- [ ] Simplified from journal version (if applicable)
+
+**Readability**:
+- [ ] Font sizes ≥18pt for labels
+- [ ] Thick lines (2-4pt) and large markers (8-12pt)
+- [ ] High contrast colors
+- [ ] Readable from back of room
+
+**Design**:
+- [ ] Minimal chart junk (removed gridlines, simplify)
+- [ ] Axes clearly labeled with units
+- [ ] Color-blind friendly palette
+- [ ] Consistent style with other figures
+
+**Context**:
+- [ ] Sample sizes indicated (n)
+- [ ] Statistical results shown (p-values, CI)
+- [ ] Error bars defined (SE, SD, or CI?)
+- [ ] Key finding annotated or highlighted
+
+**Technical Quality**:
+- [ ] High resolution (300 DPI minimum)
+- [ ] Vector format preferred
+- [ ] Properly sized for slide
+- [ ] Quality maintained when projected
+
+**Progressive Disclosure** (if complex):
+- [ ] Plan for building figure incrementally
+- [ ] Each step adds one new element
+- [ ] Final version shows complete picture
+- [ ] Animation or separate slides prepared
diff --git a/scientific-skills/scientific-slides/references/presentation_structure.md b/scientific-skills/scientific-slides/references/presentation_structure.md
new file mode 100644
index 0000000..56c89d7
--- /dev/null
+++ b/scientific-skills/scientific-slides/references/presentation_structure.md
@@ -0,0 +1,642 @@
+# Presentation Structure Guide
+
+## Overview
+
+Effective scientific presentations follow a clear narrative structure that guides the audience through your research story. This guide provides structure templates for different talk lengths and contexts, helping you organize content for maximum impact and clarity.
+
+## Core Narrative Structure
+
+All scientific presentations should follow a story arc that engages, informs, and persuades:
+
+1. **Hook**: Grab attention immediately (30 seconds - 1 minute)
+2. **Context**: Establish the research area and importance (5-10% of talk)
+3. **Problem/Gap**: Identify what's unknown or problematic (5-10% of talk)
+4. **Approach**: Explain your solution or method (15-25% of talk)
+5. **Results**: Present key findings (40-50% of talk)
+6. **Implications**: Discuss meaning and impact (15-20% of talk)
+7. **Closure**: Memorable conclusion and call to action (1-2 minutes)
+
+This arc mirrors the scientific method while maintaining narrative flow that keeps audiences engaged.
+
+## Slide Count Guidelines
+
+**General Rule**: Approximately 1 slide per minute, with adjustments based on content complexity.
+
+| Talk Duration | Total Slides | Title/Intro | Methods | Results | Discussion | Conclusion |
+|---------------|--------------|-------------|---------|---------|------------|------------|
+| 5 minutes (lightning) | 5-7 | 1-2 | 0-1 | 2-3 | 1 | 1 |
+| 10 minutes (short) | 10-12 | 2 | 1-2 | 4-5 | 2-3 | 1 |
+| 15 minutes (conference) | 15-18 | 2-3 | 2-3 | 6-8 | 3-4 | 1-2 |
+| 20 minutes (extended) | 20-24 | 3 | 3-4 | 8-10 | 4-5 | 2 |
+| 30 minutes (seminar) | 25-30 | 3-4 | 5-6 | 10-12 | 6-8 | 2 |
+| 45 minutes (keynote) | 35-45 | 4-5 | 8-10 | 15-20 | 8-10 | 2-3 |
+| 60 minutes (lecture) | 45-60 | 5-6 | 10-12 | 20-25 | 10-12 | 3-4 |
+
+**Adjustments**:
+- **Complex data**: Reduce slide count (spend more time per slide)
+- **Simple concepts**: Can increase slide count slightly
+- **Heavy animations**: Count as multiple slides if building incrementally
+- **Q&A included**: Reduce content slides by 20-30%
+
+## Structure by Talk Length
+
+### 5-Minute Lightning Talk
+
+**Purpose**: Communicate one key idea quickly and memorably.
+
+**Structure** (5-7 slides):
+1. **Title slide** (15 seconds): Title, name, affiliation
+2. **The Problem** (45 seconds): One compelling problem statement with visual
+3. **Your Solution** (60 seconds): Core approach or finding (1 slide or 2 if showing before/after)
+4. **Key Result** (90 seconds): Single most important finding with clear visualization
+5. **Impact** (45 seconds): Why it matters, one key implication
+6. **Closing** (30 seconds): Memorable takeaway, contact info
+
+**Tips**:
+- Focus on ONE message only
+- Maximize visuals, minimize text
+- Practice exact timing
+- No methods details (mention in one sentence)
+- Prepare for "tell me more" conversations after
+
+### 10-Minute Conference Talk
+
+**Purpose**: Present a complete research story with key findings.
+
+**Structure** (10-12 slides):
+1. **Title slide** (30 seconds)
+2. **Hook + Context** (60 seconds): Compelling opening that establishes importance
+3. **Problem Statement** (60 seconds): Knowledge gap or challenge
+4. **Approach Overview** (60-90 seconds): High-level methods (1-2 slides)
+5. **Key Results** (4-5 minutes): Main findings (4-5 slides)
+ - Result 1: Primary finding
+ - Result 2: Supporting evidence
+ - Result 3: Additional validation or application
+ - (Optional) Result 4: Extension or implication
+6. **Interpretation** (90 seconds): What it means (1-2 slides)
+7. **Conclusions** (45 seconds): Main takeaways
+8. **Acknowledgments** (15 seconds): Funding, collaborators
+
+**Tips**:
+- Spend 40-50% of time on results
+- Use build animations to control information flow
+- Practice transitions between sections
+- Leave 2-3 minutes for questions if Q&A is included
+- Have 1-2 backup slides with extra data
+
+### 15-Minute Conference Talk (Standard)
+
+**Purpose**: Comprehensive presentation of a research project with detailed results.
+
+**Structure** (15-18 slides):
+1. **Title slide** (30 seconds)
+2. **Opening Hook** (45 seconds): Attention-grabbing problem or statistic
+3. **Background/Context** (90 seconds): Why this research area matters (1-2 slides)
+4. **Knowledge Gap** (60 seconds): What's unknown or problematic
+5. **Research Question/Hypothesis** (45 seconds): Clear statement of objectives
+6. **Methods Overview** (2-3 minutes): Experimental design (2-3 slides)
+ - Study design/participants
+ - Key procedures or techniques
+ - Analysis approach
+7. **Results** (6-7 minutes): Detailed findings (6-8 slides)
+ - Opening: Sample characteristics or validation
+ - Main finding 1: Primary outcome with statistics
+ - Main finding 2: Secondary outcome or subgroup
+ - Main finding 3: Mechanism or extension
+ - (Optional) Additional analyses or sensitivity tests
+8. **Discussion** (2-3 minutes): Interpretation and context (3-4 slides)
+ - Relationship to prior work
+ - Mechanisms or explanations
+ - Limitations
+ - Implications
+9. **Conclusions** (60 seconds): Key takeaways (1-2 slides)
+10. **Acknowledgments + Questions** (30 seconds)
+
+**Tips**:
+- Budget time for each section and practice with timer
+- Use section dividers or progress indicators
+- Spend most time on results (40-45%)
+- Anticipate likely questions and prepare backup slides
+- Have a "Plan B" for running over (know which slides to skip)
+
+### 20-Minute Extended Talk
+
+**Purpose**: In-depth presentation with room for multiple studies or detailed methodology.
+
+**Structure** (20-24 slides):
+
+Similar to 15-minute talk but with:
+- More detailed methods (3-4 slides with diagrams)
+- Additional result categories or subanalyses
+- More extensive discussion of prior work
+- Deeper dive into one or two key findings
+- More context on limitations and future directions
+
+**Distribution**:
+- Introduction: 3 minutes (3 slides)
+- Methods: 4 minutes (3-4 slides)
+- Results: 9 minutes (8-10 slides)
+- Discussion: 3 minutes (4-5 slides)
+- Conclusion: 1 minute (2 slides)
+
+### 30-Minute Seminar
+
+**Purpose**: Comprehensive research presentation with methodological depth.
+
+**Structure** (25-30 slides):
+1. **Opening** (2-3 minutes): Title, hook, outline (3-4 slides)
+2. **Background** (4-5 minutes): Detailed context and prior work (4-5 slides)
+3. **Research Questions** (1 minute): Clear objectives (1 slide)
+4. **Methods** (5-6 minutes): Detailed methodology (5-6 slides)
+ - Study design with rationale
+ - Participants/materials
+ - Procedures (possibly multiple slides)
+ - Analysis plan
+ - Validation or pilot data
+5. **Results** (10-12 minutes): Comprehensive findings (10-12 slides)
+ - Demographics/baseline
+ - Primary analyses (multiple slides)
+ - Secondary analyses
+ - Subgroup analyses
+ - Sensitivity analyses
+ - Summary visualization
+6. **Discussion** (5-6 minutes): Interpretation and implications (6-8 slides)
+ - Summary of findings
+ - Comparison to literature (multiple references)
+ - Mechanisms
+ - Strengths and limitations (detailed)
+ - Clinical/practical implications
+ - Future directions
+7. **Conclusions** (1-2 minutes): Key messages (2 slides)
+8. **Acknowledgments/Questions** (1 minute)
+
+**Tips**:
+- Include an outline slide showing talk structure
+- Use section headers to maintain orientation
+- Can include animations and builds for complex concepts
+- More detailed methods are expected
+- Address potential objections proactively
+- Leave 5-10 minutes for Q&A
+
+### 45-Minute Keynote or Invited Talk
+
+**Purpose**: Comprehensive overview of a research program or major project with broader context.
+
+**Structure** (35-45 slides):
+1. **Opening** (3-5 minutes): Hook, personal connection, outline (4-5 slides)
+2. **Big Picture** (5-7 minutes): Field overview and importance (5-7 slides)
+3. **Prior Work** (3-5 minutes): Literature review and gaps (4-5 slides)
+4. **Your Research Program** (25-30 minutes):
+ - Study 1: Question, methods, results (8-10 slides)
+ - Transition: What we learned and what remained unknown
+ - Study 2: Question, methods, results (8-10 slides)
+ - (Optional) Study 3: Extensions or applications (5-7 slides)
+5. **Synthesis** (5-7 minutes): What it all means (5-7 slides)
+ - Integrated findings
+ - Theoretical implications
+ - Practical applications
+ - Limitations
+6. **Future Directions** (2-3 minutes): Where the field is going (2-3 slides)
+7. **Conclusions** (2 minutes): Key messages (2 slides)
+8. **Acknowledgments** (1 minute)
+
+**Tips**:
+- Tell a story arc across multiple studies
+- Show evolution of thinking
+- Include more personal elements and humor
+- Can discuss failed experiments or pivots
+- More philosophical and forward-looking
+- Engage audience with rhetorical questions
+- Leave 10-15 minutes for discussion
+
+### 60-Minute Lecture or Tutorial
+
+**Purpose**: Educational presentation teaching a concept, method, or field overview.
+
+**Structure** (45-60 slides):
+1. **Introduction** (5 minutes): Topic importance, learning objectives (5-6 slides)
+2. **Foundations** (10-12 minutes): Essential background (10-12 slides)
+3. **Core Content - Part 1** (15-18 minutes): First major topic (15-20 slides)
+4. **Core Content - Part 2** (15-18 minutes): Second major topic (15-20 slides)
+5. **Applications** (5-7 minutes): Real-world examples (5-7 slides)
+6. **Summary** (3-5 minutes): Key takeaways, resources (3-4 slides)
+7. **Questions/Discussion** (Remaining time)
+
+**Tips**:
+- Include checkpoints: "Are there questions so far?"
+- Use examples and analogies liberally
+- Build complexity gradually
+- Include interactive elements if possible
+- Provide resources for further learning
+- Repeat key concepts at transitions
+- Use consistent visual templates for concept types
+
+## Opening Strategies
+
+### The Hook (First 30-60 seconds)
+
+Your opening sets the tone and captures attention. Effective hooks:
+
+**1. Surprising Statistic**
+- "Every year, X million people experience Y, yet only Z% receive effective treatment."
+- Works well for applied research with societal impact
+
+**2. Provocative Question**
+- "What if I told you that everything we thought about X is wrong?"
+- Engages audience immediately, creates curiosity
+
+**3. Personal Story**
+- "Five years ago, I encountered a patient/problem that changed how I think about..."
+- Humanizes research, creates emotional connection
+
+**4. Visual Puzzle**
+- Start with an intriguing image or data visualization
+- "Look at this pattern. What could explain it?"
+
+**5. Contrasting Paradigms**
+- "The traditional view says X, but new evidence suggests Y."
+- Sets up tension and your contribution
+
+**6. Scope and Scale**
+- "This problem affects X people, costs Y dollars, and has been unsolved for Z years."
+- Establishes immediate importance
+
+### Title Slide Essentials
+
+Your title slide should include:
+- **Clear, specific title** (not generic)
+- **Your name and credentials**
+- **Affiliation(s) with logos**
+- **Date and venue** (conference name)
+- **Optional**: QR code to paper, slides, or resources
+- **Optional**: Compelling background image related to research
+
+**Title Crafting**:
+- Be specific: "Machine Learning Predicts Alzheimer's Risk from Retinal Images"
+- Not vague: "Applications of AI in Healthcare"
+- Include key method and outcome
+- Maximum 15 words
+- Avoid jargon if presenting to broader audience
+
+### Outline Slides
+
+For talks >20 minutes, include a brief outline slide:
+- Shows 3-5 main sections
+- Provides roadmap for audience
+- Can return to outline as section dividers
+- Keep simple and visual (not just bullet list)
+
+Example outline approach:
+```
+[Icon] Background → [Icon] Methods → [Icon] Results → [Icon] Implications
+```
+
+## Closing Strategies
+
+### Effective Conclusions
+
+The last 1-2 minutes are most remembered. Strong conclusions:
+
+**1. Key Takeaways Format**
+- 3-5 bullet points summarizing main messages
+- Each should be a complete, memorable sentence
+- Not just "Results": make claims
+
+**2. Call-Back Hook**
+- Reference your opening hook or question
+- "Remember that surprising statistic? Our findings suggest..."
+- Creates narrative closure
+
+**3. Practical Implications**
+- "What does this mean for clinicians/researchers/policy?"
+- Action-oriented takeaways
+- Bridges science to application
+
+**4. Visual Summary**
+- Single powerful figure integrating all findings
+- Conceptual model showing relationships
+- Before/after comparison
+
+**5. Future Outlook**
+- "These findings open doors to..."
+- 1-2 specific next steps
+- Inspiration for audience's own work
+
+### Acknowledgments Slide
+
+Essential elements:
+- **Funding sources** (with grant numbers)
+- **Key collaborators** (with photos if space)
+- **Institution/lab** (with logo)
+- **Study participants** (appropriate mention)
+- Keep brief (15-30 seconds max)
+- Optional: Include contact info and QR codes here
+
+### Final Slide
+
+Your final slide stays visible during Q&A. Include:
+- **"Thank you" or "Questions?"**
+- **Your contact information** (email, Twitter/X)
+- **QR code to paper, preprint, or slides**
+- **Lab website or GitHub**
+- **Key visual from your research** (not just text)
+
+Avoid ending with "References" or dense acknowledgments—these don't facilitate discussion.
+
+## Transition Techniques
+
+Smooth transitions maintain narrative flow and audience orientation.
+
+### Between Major Sections
+
+**Explicit Transition Slides**:
+- Use consistent visual style (color, icon, position)
+- Single word or short phrase: "Methods" "Results" "Implications"
+- Optional: Return to outline with current section highlighted
+
+**Verbal Transitions**:
+- "Now that we've established X, let's examine how we studied Y..."
+- "With that background, I'll turn to our key findings..."
+- "This raises the question: How did we measure this?"
+
+### Between Related Slides
+
+**Visual Continuity**:
+- Repeat key element (figure, title format) across slides
+- Use consistent color coding
+- Progressive builds of same figure
+
+**Verbal Bridges**:
+- "Building on this finding..."
+- "To test this further..."
+- "This pattern was consistent across..."
+
+### Signposting Language
+
+Help audience track progress through talk:
+- "First, I'll show... Second... Finally..."
+- "There are three key findings to discuss..."
+- "Now, let's turn to the most surprising result..."
+- "Coming back to our original question..."
+
+## Pacing and Timing
+
+### Time Budgeting
+
+**Plan timing for each slide**:
+- Simple title/transition slides: 15-30 seconds
+- Text content slides: 45-90 seconds
+- Complex figures: 2-3 minutes
+- Key results: 2-4 minutes each
+
+**Common Timing Mistakes**:
+- ❌ Spending too long on introduction (>15% of talk)
+- ❌ Rushing through results (should be 40-50%)
+- ❌ Not leaving time for questions
+- ❌ Going over time (extremely unprofessional)
+
+### Practice Strategies
+
+**Full Run-Throughs** (Do 3-5 times):
+1. **First run**: Rough timing, identify problem areas
+2. **Second run**: Practice transitions, smooth language
+3. **Third run**: Final timing with backup plans
+4. **Recording**: Video yourself, watch for tics/filler words
+5. **Audience practice**: Present to colleagues for feedback
+
+**Section Practice**:
+- Practice complex result slides multiple times
+- Rehearse opening and closing until flawless
+- Prepare ad-libs for common questions
+
+**Timing Techniques**:
+- Note target time at bottom of key slides
+- Set phone/watch to vibrate at checkpoints
+- Have Plan B: know which slides to skip if running over
+- Practice with live timer visible
+
+### Managing Time During Talk
+
+**If Running Ahead** (rarely a problem):
+- Expand on key points naturally
+- Take questions mid-talk if appropriate
+- Provide more context or examples
+- Slow down slightly (but don't add filler)
+
+**If Running Behind**:
+- Skip backup slides or extra examples (prepare these in advance)
+- Summarize rather than detail on secondary points
+- Never rush through conclusions—skip earlier content instead
+- NEVER say "I'll go quickly through these" (just skip them)
+
+**Time Checkpoints**:
+- 25% through talk = 25% through time
+- 50% through talk = 50% through time
+- After results = should have 5-10 minutes left
+- Start conclusions with 2-3 minutes remaining
+
+## Audience Engagement
+
+### Reading the Room
+
+**Visual Cues**:
+- **Engaged**: Leaning forward, nodding, taking notes
+- **Lost**: Confused expressions, checking phones
+- **Bored**: Leaning back, glazed eyes, fidgeting
+
+**Adjustments**:
+- If losing audience: Speed up, add humor, show compelling visual
+- If audience confused: Slow down, ask "Does this make sense?", re-explain
+- If highly engaged: Can add more detail, encourage questions
+
+### Interactive Elements
+
+For seminars and longer talks:
+
+**Rhetorical Questions**:
+- "Why do you think this pattern occurred?"
+- "What would you predict happens next?"
+- Pauses for thought (don't immediately answer)
+
+**Quick Polls** (if appropriate):
+- "Raise your hand if you've encountered X..."
+- "How many think the result will be A vs. B?"
+- Brief, not disruptive
+
+**Checkpoint Questions**:
+- "Before I continue, are there questions about the methods?"
+- "Is everyone comfortable with this concept?"
+- For longer talks or tutorials
+
+### Body Language and Delivery
+
+**Effective Practices**:
+- ✅ Stand to side of screen, facing audience
+- ✅ Use pointer deliberately for specific elements
+- ✅ Make eye contact with different sections of room
+- ✅ Gesture naturally to emphasize points
+- ✅ Vary voice pitch and pace
+- ✅ Pause after important points
+
+**Avoid**:
+- ❌ Reading slides verbatim
+- ❌ Turning back to audience
+- ❌ Standing in front of projection
+- ❌ Fidgeting with pointer/objects
+- ❌ Pacing repetitively
+- ❌ Monotone delivery
+
+## Special Considerations
+
+### Virtual Presentations
+
+**Technical Setup**:
+- Test screen sharing, audio, and video beforehand
+- Use presenter mode if available (see notes)
+- Ensure good lighting and camera angle
+- Minimize background distractions
+
+**Engagement Challenges**:
+- Can't read audience body language as well
+- More explicit engagement needed
+- Use polls, chat, reactions if platform allows
+- Encourage unmuting for questions
+
+**Pacing**:
+- Slightly slower pace (harder to interrupt virtually)
+- More explicit transitions and signposting
+- Build in planned pauses for questions
+- Monitor chat for questions during talk
+
+### Handling Questions
+
+**During Talk**:
+- For short talks: "Please hold questions until the end"
+- For seminars: "Feel free to interrupt with questions"
+- If interrupted: "Great question, let me finish this point and come back to it"
+
+**Q&A Session**:
+- **Listen fully** before answering
+- **Repeat or rephrase** question for whole audience
+- **Answer concisely** (30-90 seconds max)
+- **Be honest** if you don't know: "That's a great question I don't have data on yet"
+- **Redirect if off-topic**: "That's interesting but beyond scope. Happy to discuss after."
+- **Have backup slides** with extra data/analyses ready
+
+**Difficult Questions**:
+- **Hostile**: Stay calm, acknowledge concern, stick to data
+- **Confusing**: Ask for clarification: "Could you rephrase that?"
+- **Out of scope**: "I focused on X, but your question about Y is important for future work"
+
+### Technical Difficulties
+
+**Preparation**:
+- Have backup: PDF on laptop, cloud, and USB drive
+- Test connections and adapters beforehand
+- Know how to reset display if needed
+- Have printout of slides as absolute backup
+
+**During Talk**:
+- Stay calm and professional
+- Fill time with verbal explanation while fixing
+- Skip problem slide if necessary
+- Apologize briefly but don't dwell on it
+
+## Adapting to Different Venues
+
+### Conference Presentation
+
+**Context**:
+- Concurrent sessions, some audience may arrive late
+- Audience has seen many talks that day
+- Strict time limits
+- May be recorded
+
+**Adaptations**:
+- Strong hook to capture attention
+- Clear, focused message (not trying to show everything)
+- Adhere exactly to time limits
+- Compelling visuals (tired audiences need visual interest)
+- Provide URL or QR code for more information
+
+### Department Seminar
+
+**Context**:
+- Familiar audience with domain knowledge
+- More relaxed atmosphere
+- Can go deeper into methods
+- Questions encouraged throughout
+
+**Adaptations**:
+- Can use more technical language
+- Show more methodological details
+- Discuss failed experiments or challenges
+- Engage in back-and-forth discussion
+- Less formal style acceptable
+
+### Thesis Defense
+
+**Context**:
+- Committee has read dissertation
+- Evaluating your mastery of field
+- Formal assessment situation
+- Extended Q&A expected
+
+**Adaptations**:
+- Comprehensive coverage required
+- Show depth of knowledge
+- Address limitations proactively
+- Demonstrate independent thinking
+- More formal, professional tone
+- Prepare extensively for questions
+
+### Grant Pitch or Industry Talk
+
+**Context**:
+- Audience evaluating feasibility and impact
+- Emphasis on applications and outcomes
+- May include non-scientists
+- Shorter attention for technical details
+
+**Adaptations**:
+- Lead with impact and significance
+- Minimal methods details (what, not how)
+- Show preliminary data and proof of concept
+- Emphasize feasibility and timeline
+- Clear, simple language
+- Strong business case or societal benefit
+
+## Summary Checklist
+
+Before finalizing your presentation structure:
+
+**Overall Structure**:
+- [ ] Clear narrative arc (hook → context → problem → solution → results → impact)
+- [ ] Appropriate slide count for time available (~1 slide/minute)
+- [ ] 40-50% of time allocated to results
+- [ ] Strong opening and closing
+- [ ] Smooth transitions between sections
+
+**Timing**:
+- [ ] Practiced full talk at least 3 times
+- [ ] Timing noted for key sections
+- [ ] Plan B for running over (slides to skip)
+- [ ] Buffer time for questions (if applicable)
+
+**Engagement**:
+- [ ] Opening hook captures attention
+- [ ] Clear signposting throughout
+- [ ] Conclusion provides memorable takeaways
+- [ ] Final slide facilitates discussion
+
+**Technical**:
+- [ ] Slides numbered (for question reference)
+- [ ] Backup slides prepared for anticipated questions
+- [ ] Contact info and QR codes on final slide
+- [ ] Multiple copies of presentation saved
+
+**Practice**:
+- [ ] Comfortable with content (minimal note reliance)
+- [ ] Transitions smooth and natural
+- [ ] Prepared for likely questions
+- [ ] Tested with live audience if possible
diff --git a/scientific-skills/scientific-slides/references/slide_design_principles.md b/scientific-skills/scientific-slides/references/slide_design_principles.md
new file mode 100644
index 0000000..3e36ea2
--- /dev/null
+++ b/scientific-skills/scientific-slides/references/slide_design_principles.md
@@ -0,0 +1,849 @@
+# Slide Design Principles for Scientific Presentations
+
+## Overview
+
+Effective slide design enhances comprehension, maintains audience attention, and ensures your scientific message is communicated clearly. This guide covers visual hierarchy, typography, color theory, layout principles, and accessibility considerations for creating professional scientific presentations.
+
+## Core Design Principles
+
+### 1. Simplicity and Clarity
+
+**The Fundamental Rule**: Each slide should communicate ONE main idea.
+
+**Why It Matters**:
+- Audiences can only process limited information at once
+- Complexity causes cognitive overload
+- Simple slides are remembered; busy slides are forgotten
+
+**Application**:
+- ✅ One message per slide
+- ✅ Minimal text (audiences read OR listen, not both simultaneously)
+- ✅ Clear visual focus
+- ✅ Generous white space
+- ❌ Avoid cramming multiple concepts onto one slide
+
+**Example Comparison**:
+```
+BAD: Single slide with:
+- 3 different graphs
+- 8 bullet points
+- 2 tables
+- Dense caption text
+
+GOOD: Three separate slides:
+- Slide 1: First graph with 2-3 key points
+- Slide 2: Second graph with interpretation
+- Slide 3: Summary table with highlighted finding
+```
+
+### 2. Visual Hierarchy
+
+Guide attention to the most important elements through size, color, and position.
+
+**Hierarchy Levels**:
+1. **Primary**: Main message or key data (largest, highest contrast)
+2. **Secondary**: Supporting information (medium size)
+3. **Tertiary**: Details and labels (smaller, lower contrast)
+
+**Techniques**:
+
+**Size**:
+- Title: Largest (36-54pt)
+- Key findings: Large (24-32pt)
+- Supporting text: Medium (18-24pt)
+- Labels and notes: Smallest but legible (14-18pt)
+
+**Color**:
+- High contrast for key elements
+- Accent colors for emphasis
+- Muted colors for background or secondary info
+
+**Position**:
+- Top-left or top-center: Primary content (Western reading pattern)
+- Center: Focal point for key visuals
+- Bottom or sides: Supporting details
+
+**Weight**:
+- Bold for emphasis on key terms
+- Regular weight for body text
+- Light weight for de-emphasized content
+
+### 3. Consistency
+
+Maintain visual consistency throughout the presentation.
+
+**Elements to Keep Consistent**:
+- **Fonts**: Same font family for all slides
+- **Colors**: Defined color palette (3-5 colors)
+- **Layouts**: Similar slides use same structure
+- **Spacing**: Margins and padding uniform
+- **Style**: Figure formats, bullet styles, numbering
+
+**Benefits**:
+- Professional appearance
+- Reduced cognitive load (audiences learn your visual language)
+- Focus on content, not adjusting to new formats
+- Easy to identify information types
+
+**Template Approach**:
+- Create master slide with standard elements
+- Design 3-5 layout variants (title, content, figure, section divider)
+- Apply consistently throughout
+
+## Typography
+
+### Font Selection
+
+**Recommended Font Types**:
+
+**Sans-Serif Fonts** (Highly Recommended):
+- **Arial**: Universal, highly legible
+- **Helvetica**: Clean, professional
+- **Calibri**: Modern default, works well
+- **Gill Sans**: Elegant sans-serif
+- **Futura**: Geometric, modern
+- **Avenir**: Friendly, professional
+
+**Serif Fonts** (Use Sparingly):
+- Generally harder to read on screens
+- Acceptable for titles in some contexts
+- Avoid for body text in presentations
+
+**Avoid**:
+- ❌ Script or handwriting fonts (illegible from distance)
+- ❌ Decorative fonts (distracting)
+- ❌ Condensed fonts (hard to read)
+- ❌ Multiple font families (>2 looks unprofessional)
+
+### Font Sizes
+
+**Minimum Readable Sizes**:
+- **Title slide title**: 44-54pt
+- **Section headers**: 36-44pt
+- **Slide titles**: 32-40pt
+- **Body text**: 24-28pt (absolute minimum 18pt)
+- **Figure labels**: 18-24pt
+- **Captions and citations**: 14-16pt (use sparingly)
+
+**The Room Test**:
+- Can text be read from the back of the room?
+- Rule: Body text should be readable at 6× screen height distance
+- When in doubt: go larger
+
+**Size Relationships**:
+```
+Title: 40pt
+━━━━━━━━━━━━━━━━━
+Subheading: 28pt
+─────────────
+Body text: 24pt
+Regular content for audience
+
+Caption: 16pt
+```
+
+### Text Formatting
+
+**Best Practices**:
+
+**Line Length**:
+- Maximum 50-60 characters per line
+- Break long sentences into multiple lines
+- Use phrases, not full sentences when possible
+
+**Line Spacing**:
+- 1.2-1.5× line height for readability
+- More spacing for dense content
+- Consistent spacing throughout
+
+**Alignment**:
+- **Left-aligned**: Best for body text (natural reading)
+- **Center-aligned**: Titles, short phrases, key messages
+- **Right-aligned**: Rarely used (occasionally for design balance)
+- **Justified**: Avoid (creates awkward spacing)
+
+**Emphasis**:
+- ✅ **Bold** for key terms (use sparingly)
+- ✅ Color for emphasis (consistent meaning)
+- ✅ Size increase for importance
+- ❌ Avoid italics (hard to read from distance)
+- ❌ Avoid underline (confused with hyperlinks)
+- ❌ AVOID ALL CAPS FOR BODY TEXT (READS AS SHOUTING)
+
+### The 6×6 Rule
+
+**Guideline**: Maximum 6 bullets per slide, maximum 6 words per bullet.
+
+**Rationale**:
+- More text = audience reads instead of listens
+- Bullet points are prompts, not sentences
+- You provide the explanation verbally
+
+**Better Approach**:
+- 3-4 bullets optimal
+- 4-8 words per bullet
+- Use fragments, not complete sentences
+- Consider replacing text with visuals
+
+**Example Transformation**:
+```
+TOO MUCH TEXT:
+• Our study examined the relationship between dietary interventions
+ and cardiovascular outcomes in 1,500 participants over 5 years
+• We found that participants in the intervention group showed
+ significantly reduced risk compared to controls
+• The effect size was larger than previous studies and persisted
+ at long-term follow-up
+
+BETTER:
+• 5-year dietary intervention study
+• 27% reduced cardiovascular risk
+• Largest effect to date
+```
+
+## Color Theory
+
+### Color Palettes for Scientific Presentations
+
+**Purpose-Driven Color Selection**:
+
+**Professional/Academic** (Conservative):
+- Navy blue (#1C3D5A), gray (#4A5568), white (#FFFFFF)
+- Accent: Orange (#E67E22) or green (#27AE60)
+- Use: Faculty seminars, grant presentations, institutional talks
+
+**Modern/Engaging** (Energetic):
+- Teal (#0A9396), coral (#EE6C4D), cream (#F4F1DE)
+- Accent: Burgundy (#780000)
+- Use: Conference talks, public engagement, TED-style talks
+
+**High Contrast** (Maximum Legibility):
+- Black text (#000000) on white (#FFFFFF)
+- Dark blue (#003366) on white
+- White on dark gray (#2D3748)
+- Use: Large venues, virtual presentations, accessibility priority
+
+**Data Visualization** (Color-blind Safe):
+- Blue (#0173B2), orange (#DE8F05), green (#029E73), red (#CC78BC)
+- Based on Wong/IBM palettes
+- Use: Figures with categorical data, bar charts, line plots
+
+### Color Psychology in Science
+
+**Blue**:
+- Associations: Trust, stability, professionalism, intelligence
+- Use: Backgrounds, institutional presentations, technology topics
+- Caution: Can feel cold; balance with warmer accents
+
+**Green**:
+- Associations: Growth, health, nature, sustainability
+- Use: Biology, environmental science, health outcomes
+- Caution: Avoid red-green combinations (color blindness)
+
+**Red/Orange**:
+- Associations: Energy, urgency, warning, importance
+- Use: Highlighting critical findings, emphasis, calls to action
+- Caution: Don't overuse; loses impact
+
+**Purple**:
+- Associations: Innovation, creativity, wisdom
+- Use: Neuroscience, novel methods, creative research
+- Caution: Can appear less serious in some contexts
+
+**Gray**:
+- Associations: Neutrality, professionalism, sophistication
+- Use: Backgrounds, de-emphasized content, grounding
+- Caution: Can feel dull if overused
+
+### Color Contrast and Accessibility
+
+**WCAG Standards** (Web Content Accessibility Guidelines):
+- **Level AA**: 4.5:1 contrast ratio for normal text
+- **Level AAA**: 7:1 contrast ratio (preferred for presentations)
+
+**High Contrast Combinations**:
+- ✅ Black on white (21:1)
+- ✅ Dark blue (#003366) on white (12.6:1)
+- ✅ White on dark gray (#2D3748) (11.8:1)
+- ✅ Dark text (#333333) on cream (#F4F1DE) (9.7:1)
+
+**Low Contrast Combinations** (Avoid):
+- ❌ Light gray on white
+- ❌ Yellow on white
+- ❌ Pastel colors on white backgrounds
+- ❌ Red on black (difficult to read)
+
+**Testing Contrast**:
+- Use online tools (e.g., WebAIM Contrast Checker)
+- Print slide in grayscale (should remain legible)
+- View from distance (simulate audience perspective)
+
+### Color Blindness Considerations
+
+**Prevalence**: ~8% of men, ~0.5% of women have color vision deficiency
+
+**Most Common**: Red-green color blindness (protanopia/deuteranopia)
+
+**Safe Practices**:
+- ✅ Use blue/orange instead of red/green
+- ✅ Add patterns or shapes in addition to color
+- ✅ Use color AND other differentiators (shape, size, position)
+- ✅ Test with color blindness simulator
+
+**Color-Blind Safe Palettes**:
+```
+Primary: Blue (#0173B2)
+Contrast: Orange (#DE8F05) [NOT green]
+Additional: Magenta (#CC78BC), Teal (#029E73)
+```
+
+**Figure Design**:
+- Don't rely solely on red vs. green lines
+- Use different line styles (solid, dashed, dotted)
+- Use symbols (circle, square, triangle) for scatter plots
+- Label directly on plot rather than color legend only
+
+## Layout and Composition
+
+### The Rule of Thirds
+
+Divide slide into 3×3 grid; place key elements at intersections or along lines.
+
+**Application**:
+```
++-------+-------+-------+
+| ┃ | ┃ | ┃ |
+|---●---|---●---|---●---| ← Key focal points (●)
+| ┃ | ┃ | ┃ |
+|---●---|---●---|---●---|
+| ┃ | ┃ | ┃ |
+|---●---|---●---|---●---|
+| ┃ | ┃ | ┃ |
++-------+-------+-------+
+```
+
+**Benefits**:
+- More visually interesting than centered layouts
+- Natural eye flow
+- Professional appearance
+- Guides attention strategically
+
+**Example Usage**:
+- Place key figure at right third
+- Text summary on left two-thirds
+- Title at top third line
+- Logo at bottom-right intersection
+
+### White Space
+
+**Definition**: Empty space around and between elements.
+
+**Purpose**:
+- Gives content room to "breathe"
+- Increases focus on important elements
+- Prevents overwhelming the audience
+- Projects professionalism and confidence
+
+**Guidelines**:
+- Margins: Minimum 5-10% of slide on all sides
+- Element spacing: Clear separation between unrelated items
+- Text padding: Space around text blocks
+- Don't fill every pixel: Empty space is valuable
+
+**Common Mistakes**:
+- Cramming too much on one slide
+- Extending content to edges
+- No space between elements
+- Fear of "wasting" space
+
+### Layout Patterns
+
+**Title + Content**:
+```
+┌─────────────────────────┐
+│ Slide Title │
+├─────────────────────────┤
+│ │
+│ Content Area │
+│ (text, figure, │
+│ or combination) │
+│ │
+└─────────────────────────┘
+```
+Use: Standard slide type, most common
+
+**Two Column**:
+```
+┌─────────────────────────┐
+│ Slide Title │
+├───────────┬─────────────┤
+│ │ │
+│ Text │ Figure │
+│ Column │ Column │
+│ │ │
+└───────────┴─────────────┘
+```
+Use: Comparing items, text + figure
+
+**Full-Slide Figure**:
+```
+┌─────────────────────────┐
+│ │
+│ │
+│ Large Figure or │
+│ Image │
+│ │
+│ │
+└─────────────────────────┘
+```
+Use: Key results, impactful visuals
+
+**Text Overlay**:
+```
+┌─────────────────────────┐
+│ ┌─────────────┐ │
+│ │ Text Box │ │
+│ └─────────────┘ │
+│ Background Image │
+│ │
+└─────────────────────────┘
+```
+Use: Title slide, section dividers
+
+**Grid Layout**:
+```
+┌─────────────────────────┐
+│ Title │
+├─────────┬───────┬───────┤
+│ Item 1 │ Item 2│ Item 3│
+├─────────┼───────┼───────┤
+│ Item 4 │ Item 5│ Item 6│
+└─────────┴───────┴───────┘
+```
+Use: Multiple related items, comparisons
+
+### Alignment
+
+**Principle**: Align elements to create visual order and relationships.
+
+**Types**:
+
+**Edge Alignment**:
+- Align left edges of text blocks
+- Align right edges of figures
+- Align top edges of items in row
+
+**Center Alignment**:
+- Center title on slide
+- Center key messages
+- Center lone figures
+
+**Grid Alignment**:
+- Use invisible grid
+- Snap elements to grid lines
+- Maintains consistency across slides
+
+**Visual Impact**:
+- Aligned elements look intentional and professional
+- Misaligned elements appear careless
+- Small misalignments are very noticeable
+
+## Background Design
+
+### Background Colors
+
+**Best Practices**:
+
+**Light Backgrounds** (Most Common):
+- White or off-white (#FFFFFF, #F8F9FA)
+- Very light gray (#F5F5F5)
+- Cream/beige (#FAF8F3)
+
+**Advantages**:
+- Maximum contrast for dark text
+- Works in any lighting
+- Professional and clean
+- Easier on projectors
+
+**Dark Backgrounds**:
+- Dark gray (#2D3748)
+- Navy blue (#1A202C)
+- Black (#000000)
+
+**Advantages**:
+- Modern, sophisticated
+- Good for dark venues
+- Reduces eye strain in dark rooms
+- Makes colors pop
+
+**Disadvantages**:
+- Requires light-colored text
+- Can be difficult in bright rooms
+- Some projectors handle poorly
+
+**Gradient Backgrounds**:
+- ✅ Subtle gradients acceptable (light to lighter)
+- ❌ Avoid busy or high-contrast gradients
+- ❌ Don't distract from content
+
+**Image Backgrounds**:
+- Use only for title/section slides
+- Ensure sufficient contrast with text
+- Add semi-transparent overlay if needed
+- Avoid busy or cluttered images
+
+### Borders and Frames
+
+**Minimal Approach** (Recommended):
+- No borders on most slides
+- Let white space define boundaries
+- Clean, modern appearance
+
+**Selective Borders**:
+- Around key figures for emphasis
+- Separating distinct sections
+- Highlighting callout boxes
+- Simple, thin lines only
+
+**Avoid**:
+- Decorative borders
+- Thick, colorful frames
+- Clipart-style elements
+- 3D effects and shadows
+
+## Visual Elements
+
+### Icons and Graphics
+
+**Purpose**:
+- Visual anchors for concepts
+- Break up text-heavy slides
+- Quick recognition of section types
+- Add visual interest
+
+**Best Practices**:
+- ✅ Consistent style (all outline or all filled)
+- ✅ Simple, recognizable designs
+- ✅ Appropriate size (not too large or small)
+- ✅ Limited color palette matching theme
+- ❌ Avoid clipart or cartoonish graphics (unless appropriate)
+- ❌ Don't use for decoration only (should convey meaning)
+
+**Sources**:
+- Font Awesome
+- Noun Project
+- Material Design Icons
+- Custom scientific illustrations
+
+### Bullets and Lists
+
+**Bullet Styles**:
+- **Simple shapes**: Circle (•), square (■), dash (−)
+- **Avoid**: Complex symbols, changing bullet styles within list
+- **Hierarchy**: Different bullets for different levels
+
+**List Best Practices**:
+- Maximum 4-6 items per list
+- Parallel structure (all start with verb, or all nouns, etc.)
+- Use fragments, not complete sentences
+- Adequate spacing between items (1.5-2× line height)
+
+**Alternative to Bullets**:
+- **Numbered lists**: When order matters
+- **Icons**: Visual representation of each point
+- **Progressive builds**: Reveal one point at a time
+- **Separate slides**: One concept per slide
+
+### Shapes and Dividers
+
+**Uses**:
+- Background rectangles to highlight content
+- Arrows showing relationships or flow
+- Circles for emphasis or grouping
+- Lines separating sections
+
+**Guidelines**:
+- Keep shapes simple (rectangles, circles, lines)
+- Use brand colors
+- Maintain consistency
+- Avoid 3D effects
+- Don't overuse
+
+## Animation and Builds
+
+### When to Use Animation
+
+**Appropriate Uses**:
+- **Progressive disclosure**: Reveal bullet points one at a time
+- **Build complex figures**: Add layers incrementally
+- **Show process**: Illustrate sequential steps
+- **Emphasize transitions**: Highlight connections
+- **Control pacing**: Prevent audience from reading ahead
+
+**Inappropriate Uses**:
+- ❌ Decoration or entertainment
+- ❌ Every slide transition
+- ❌ Multiple animations per slide
+- ❌ Distracting effects (spin, bounce, etc.)
+
+### Types of Animations
+
+**Entrance**:
+- **Appear**: Instant (good for fast-paced talks)
+- **Fade**: Subtle, professional
+- **Wipe**: Directional reveal
+- Avoid: Fly in, bounce, spiral, etc.
+
+**Exit**:
+- Rarely needed
+- Use to remove intermediary steps
+- Keep simple (fade or disappear)
+
+**Emphasis**:
+- Color change for highlighting
+- Bold/underline to draw attention
+- Grow slightly for importance
+- Use very sparingly
+
+**Builds**:
+- Reveal bullet points progressively
+- Add elements to complex figure
+- Show before/after states
+- Demonstrate process steps
+
+**Best Practices**:
+- Fast transitions (0.2-0.3 seconds)
+- Consistent animation type throughout
+- Click to advance (not automatic timing)
+- Builds should add clarity, not complexity
+
+## Common Design Mistakes
+
+### Content Mistakes
+
+**Too Much Text**:
+- Problem: Audience reads instead of listening
+- Fix: Use key phrases, not paragraphs; move details to notes
+
+**Too Many Concepts per Slide**:
+- Problem: Cognitive overload, unclear focus
+- Fix: One idea per slide; split complex slides into multiple
+
+**Inconsistent Formatting**:
+- Problem: Looks unprofessional, distracting
+- Fix: Use templates, maintain style guide
+
+**Poor Contrast**:
+- Problem: Illegible from distance
+- Fix: Test at actual presentation size, use high-contrast combinations
+
+**Tiny Fonts**:
+- Problem: Unreadable for audience
+- Fix: Minimum 18pt, preferably 24pt+ for body text
+
+### Visual Mistakes
+
+**Cluttered Slides**:
+- Problem: No clear focal point, overwhelming
+- Fix: Embrace white space, remove non-essential elements
+
+**Low-Quality Images**:
+- Problem: Pixelated or blurry figures
+- Fix: Use high-resolution images (300 DPI minimum)
+
+**Distracting Backgrounds**:
+- Problem: Competes with content
+- Fix: Simple, solid colors or subtle gradients
+
+**Overuse of Effects**:
+- Problem: Looks amateurish, distracting
+- Fix: Minimal or no shadows, gradients, 3D effects
+
+**Misaligned Elements**:
+- Problem: Appears careless
+- Fix: Use alignment tools, grids, and guides
+
+### Color Mistakes
+
+**Insufficient Contrast**:
+- Problem: Hard to read
+- Fix: Test with contrast checker, use dark on light or light on dark
+
+**Too Many Colors**:
+- Problem: Chaotic, unprofessional
+- Fix: Limit to 3-5 colors total
+
+**Red-Green Combinations**:
+- Problem: Invisible to color-blind audience members
+- Fix: Use blue-orange or add patterns/shapes
+
+**Clashing Colors**:
+- Problem: Visually jarring
+- Fix: Use color palette tools, test combinations
+
+## Accessibility
+
+### Designing for All Audiences
+
+**Visual Impairments**:
+- High contrast text (minimum 4.5:1, preferably 7:1)
+- Large fonts (minimum 18pt, prefer 24pt+)
+- Simple, clear fonts
+- No reliance on color alone to convey meaning
+
+**Color Blindness**:
+- Avoid red-green combinations
+- Use patterns, shapes, or labels in addition to color
+- Test with color blindness simulator
+- Provide alternative visual cues
+
+**Cognitive Considerations**:
+- Simple, uncluttered layouts
+- One concept per slide
+- Clear visual hierarchy
+- Consistent navigation and structure
+
+**Presentation Environment**:
+- Works in various lighting conditions
+- Visible from distance (back of large room)
+- Readable on different screens (laptop, projector, phone)
+- Printable in grayscale if needed
+
+### Alternative Text and Descriptions
+
+**For Figures**:
+- Provide verbal description during talk
+- Include detailed caption in notes
+- Describe key patterns: "Notice the increasing trend..."
+
+**For Complex Visuals**:
+- Break into components
+- Use progressive builds
+- Provide interpretive context
+
+## Design Workflow
+
+### Step 1: Define Visual Identity
+
+Before creating slides:
+1. **Color palette**: Choose 3-5 colors
+2. **Fonts**: Select 1-2 font families
+3. **Style**: Decide on overall aesthetic (minimal, bold, traditional)
+4. **Templates**: Create master slides for different types
+
+### Step 2: Create Master Templates
+
+Design 4-6 slide layouts:
+1. **Title slide**: Name, title, affiliation
+2. **Section divider**: Major transitions
+3. **Content slide**: Standard text/bullets
+4. **Figure slide**: Large visual focus
+5. **Two-column**: Text + figure side-by-side
+6. **Closing**: Questions, contact, acknowledgments
+
+### Step 3: Apply Consistently
+
+For each slide:
+- Choose appropriate template
+- Add content (text or visuals)
+- Ensure alignment and spacing
+- Check font sizes and contrast
+- Verify consistency with other slides
+
+### Step 4: Review and Refine
+
+Review checklist:
+- [ ] Every slide has clear focus
+- [ ] Text is minimal and readable
+- [ ] Visual hierarchy is clear
+- [ ] Colors are consistent and accessible
+- [ ] Alignment is precise
+- [ ] White space is adequate
+- [ ] Animations are purposeful
+- [ ] Overall flow is smooth
+
+## Tools and Resources
+
+### Design Software
+
+**PowerPoint**:
+- Master slides for templates
+- Alignment guides and gridlines
+- Design Ideas feature for inspiration
+- Morph transition for smooth animations
+
+**Keynote** (Mac):
+- Beautiful default templates
+- Smooth animations
+- Magic Move for object transitions
+
+**Google Slides**:
+- Collaborative editing
+- Cloud-based access
+- Simple, clean interface
+
+**LaTeX Beamer**:
+- Consistent, professional appearance
+- Excellent for equations and code
+- Version control friendly
+- Reproducible designs
+
+### Design Resources
+
+**Color Tools**:
+- Coolors.co: Palette generator
+- Adobe Color: Color scheme creator
+- WebAIM Contrast Checker: Accessibility testing
+- Coblis: Color blindness simulator
+
+**Icon Sources**:
+- Font Awesome: General icons
+- Noun Project: Specific concepts
+- BioIcons: Science-specific graphics
+- Flaticon: Large collection
+
+**Inspiration**:
+- Scientific presentation examples in your field
+- TED talks for delivery style
+- Conference websites for design trends
+- Design portfolios (Behance, Dribbble)
+
+## Summary Checklist
+
+Before finalizing your slide design:
+
+**Typography**:
+- [ ] Font size ≥18pt minimum, preferably 24pt+ for body
+- [ ] Maximum 6 bullets per slide, 6 words per bullet
+- [ ] Sans-serif fonts used throughout
+- [ ] Consistent font family (1-2 max)
+
+**Color**:
+- [ ] High contrast text-background (4.5:1 minimum)
+- [ ] Limited color palette (3-5 colors)
+- [ ] Color-blind safe combinations
+- [ ] Consistent color use throughout
+
+**Layout**:
+- [ ] One main idea per slide
+- [ ] Generous white space (don't fill every pixel)
+- [ ] Elements aligned precisely
+- [ ] Consistent layouts for similar content
+
+**Visual Elements**:
+- [ ] High-resolution images (300 DPI)
+- [ ] Consistent icon/graphic style
+- [ ] Minimal decorative elements
+- [ ] Clear visual hierarchy
+
+**Accessibility**:
+- [ ] Readable from back of room
+- [ ] Works in various lighting conditions
+- [ ] No reliance on color alone
+- [ ] Clear without audio (for recorded talks)
+
+**Professional Polish**:
+- [ ] Consistent template throughout
+- [ ] No typos or formatting errors
+- [ ] Smooth animations (if any)
+- [ ] Clean, uncluttered appearance
diff --git a/scientific-skills/scientific-slides/references/talk_types_guide.md b/scientific-skills/scientific-slides/references/talk_types_guide.md
new file mode 100644
index 0000000..a5b5880
--- /dev/null
+++ b/scientific-skills/scientific-slides/references/talk_types_guide.md
@@ -0,0 +1,687 @@
+# Scientific Talk Types Guide
+
+## Overview
+
+Different presentation contexts require different approaches, structures, and emphasis. This guide provides detailed guidance for common scientific talk types: conference presentations, academic seminars, thesis defenses, grant pitches, and journal club presentations.
+
+## Conference Talks
+
+### Context and Expectations
+
+**Typical Characteristics**:
+- **Duration**: 10-20 minutes (15 minutes most common)
+- **Audience**: Mix of specialists and non-specialists in your field
+- **Setting**: Concurrent sessions, audience may arrive late
+- **Goal**: Communicate key findings, generate interest, network
+- **Format**: Often followed by 2-5 minutes of questions
+
+**Challenges**:
+- Limited time for comprehensive coverage
+- Competing with other interesting talks
+- Audience fatigue (many talks in one day)
+- May be recorded or photographed
+- Need to make strong impression quickly
+
+### Structure for 15-Minute Conference Talk
+
+**Recommended Slide Count**: 15-18 slides
+
+**Time Allocation**:
+```
+Introduction (2-3 minutes, 2-3 slides):
+- Title + hook (30 seconds)
+- Background and significance (90 seconds)
+- Research question (60 seconds)
+
+Methods (2-3 minutes, 2-3 slides):
+- Study design overview
+- Key methodological approach
+- Analysis strategy
+
+Results (6-7 minutes, 6-8 slides):
+- Primary finding (2-3 minutes, 2-3 slides)
+- Secondary finding (2 minutes, 2 slides)
+- Additional validation (2 minutes, 2-3 slides)
+
+Discussion (2-3 minutes, 3-4 slides):
+- Interpretation
+- Comparison to prior work
+- Implications
+- Limitations
+
+Conclusion (1 minute, 1-2 slides):
+- Key takeaways
+- Acknowledgments
+```
+
+### Conference Talk Best Practices
+
+**Opening**:
+- ✅ Start with attention-grabbing hook (surprising fact, compelling image)
+- ✅ Clearly state why this work matters
+- ✅ Preview main finding early ("spoiler alert" acceptable)
+- ❌ Don't spend >2 minutes on background
+- ❌ Don't start with "I'm honored to be here..."
+
+**Content**:
+- ✅ Focus on 1-2 key findings (not everything from paper)
+- ✅ Use compelling visuals
+- ✅ Show data, not just conclusions
+- ✅ Explain implications clearly
+- ❌ Don't go into excessive methodological detail
+- ❌ Don't include every analysis from paper
+- ❌ Don't use small fonts or busy slides
+
+**Delivery**:
+- ✅ Practice to ensure exact timing
+- ✅ Make eye contact with audience
+- ✅ Show enthusiasm for your work
+- ✅ End with clear, memorable conclusion
+- ❌ Don't run over time (extremely unprofessional)
+- ❌ Don't rush through slides at end
+- ❌ Don't read slides verbatim
+
+**Q&A Strategy**:
+- Prepare backup slides with extra data
+- Anticipate likely questions
+- Keep answers concise (30-60 seconds)
+- Direct skeptics to poster or paper for details
+- Have business cards or contact info ready
+
+### Lightning Talks (5-7 Minutes)
+
+**Ultra-Focused Structure**:
+```
+Slide 1: Title (15 seconds)
+Slide 2: The Problem (45 seconds)
+Slide 3: Your Approach (60 seconds)
+Slide 4-5: Key Result (2-3 minutes)
+Slide 6: Impact/Implications (45 seconds)
+Slide 7: Conclusion + Contact (30 seconds)
+```
+
+**Key Principles**:
+- ONE main message only
+- Maximize visuals, minimize text
+- No methods details (just mention approach)
+- Practice exact timing rigorously
+- Make memorable impression
+- Goal: Generate "tell me more" conversations
+
+### Poster Spotlight Talks (3 Minutes)
+
+**Purpose**: Drive traffic to poster session
+
+**Structure**:
+```
+1 slide: Title + Context (30 seconds)
+2 slides: Problem + Approach (60 seconds)
+2 slides: Most Interesting Result (60 seconds)
+1 slide: "Visit my poster at #42" (30 seconds)
+```
+
+**Tips**:
+- Show teaser, not full story
+- Include poster number prominently
+- Use QR code for details
+- Explicitly invite audience: "Come ask me about..."
+
+## Academic Seminars
+
+### Context and Expectations
+
+**Typical Characteristics**:
+- **Duration**: 45-60 minutes
+- **Audience**: Department faculty, students, postdocs
+- **Setting**: Single presentation, full attention
+- **Goal**: Deep dive into research, get feedback, show expertise
+- **Format**: Extended Q&A (10-15 minutes), interruptions welcome
+
+**Challenges**:
+- Maintaining engagement for longer duration
+- Balancing depth and accessibility
+- Handling interruptions smoothly
+- Demonstrating mastery of broader field
+- Satisfying both experts and non-experts
+
+### Structure for 50-Minute Seminar
+
+**Recommended Slide Count**: 40-50 slides
+
+**Time Allocation**:
+```
+Introduction (8-10 minutes, 8-10 slides):
+- Personal introduction (1 minute)
+- Big picture context (3-4 minutes)
+- Literature review (3-4 minutes)
+- Research questions (1-2 minutes)
+- Roadmap/outline (1 minute)
+
+Methods (8-10 minutes, 8-10 slides):
+- Study design with rationale (2-3 minutes)
+- Participants/materials (2 minutes)
+- Procedures (3-4 minutes)
+- Analysis approach (2 minutes)
+
+Results (18-22 minutes, 16-20 slides):
+- Overview/demographics (2 minutes)
+- Main finding 1 (6-8 minutes)
+- Main finding 2 (6-8 minutes)
+- Additional analyses (4-6 minutes)
+- Summary slide (1 minute)
+
+Discussion (10-12 minutes, 8-10 slides):
+- Summary of findings (2 minutes)
+- Relation to literature (3-4 minutes)
+- Mechanisms/explanations (2-3 minutes)
+- Limitations (2 minutes)
+- Implications (2 minutes)
+
+Conclusion (2-3 minutes, 2-3 slides):
+- Key messages (1 minute)
+- Future directions (1-2 minutes)
+- Acknowledgments (30 seconds)
+```
+
+### Seminar Best Practices
+
+**Opening**:
+- ✅ Establish credibility and context
+- ✅ Make personal connection to research
+- ✅ Show enthusiasm and passion
+- ✅ Provide roadmap of talk structure
+- ❌ Don't assume all background knowledge
+- ❌ Don't be overly formal or stiff
+
+**Content**:
+- ✅ Go deeper into methods than conference talk
+- ✅ Show multiple related findings or studies
+- ✅ Discuss failed experiments and pivots (shows thinking)
+- ✅ Present ongoing/unpublished work
+- ✅ Connect to broader theoretical questions
+- ❌ Don't present every detail of every analysis
+- ❌ Don't ignore alternative explanations
+- ❌ Don't oversell findings
+
+**Engagement**:
+- ✅ Welcome interruptions: "Please feel free to ask questions"
+- ✅ Use checkpoint questions: "Does this make sense?"
+- ✅ Engage with questioners genuinely
+- ✅ Admit what you don't know
+- ✅ Ask audience for input on challenges
+- ❌ Don't be defensive about criticism
+- ❌ Don't dismiss questions as "off topic"
+- ❌ Don't monopolize Q&A time
+
+**Pacing**:
+- Build in natural pause points
+- Don't rush (you have time)
+- Vary delivery speed and tone
+- Use humor appropriately
+- Monitor audience engagement
+
+### Job Talk Considerations
+
+**Additional Expectations**:
+- Show research program trajectory (past → present → future)
+- Demonstrate independent thinking
+- Show you can mentor students
+- Explain funding strategy
+- Fit with department emphasized
+- Teaching philosophy may be discussed
+
+**Structure Adaptation**:
+- Add "Future Directions" section (5 minutes, 3-4 slides)
+- Show multiple projects if relevant
+- Discuss collaborative opportunities
+- Mention grant applications/funding
+
+## Thesis and Dissertation Defenses
+
+### Context and Expectations
+
+**Typical Characteristics**:
+- **Duration**: 30-60 minutes (varies by institution)
+- **Audience**: Committee, colleagues, family
+- **Setting**: Formal examination
+- **Goal**: Demonstrate mastery, defend research decisions
+- **Format**: Extended Q&A (30-90 minutes), private or public
+
+**Unique Aspects**:
+- Committee has read dissertation
+- Questioning can be extensive and critical
+- Evaluation of student's independence and expertise
+- May include private committee discussion
+- Career milestone, significant pressure
+
+### Structure for 45-Minute Defense
+
+**Recommended Slide Count**: 40-50 slides
+
+**Time Allocation**:
+```
+Introduction (5 minutes, 5-6 slides):
+- Research context and motivation
+- Central thesis question
+- Overview of studies/chapters
+- Roadmap
+
+Literature Review (5 minutes, 4-5 slides):
+- Theoretical framework
+- Key prior findings
+- Knowledge gaps
+- Your contribution
+
+Study 1 (8-10 minutes, 10-12 slides):
+- Research question
+- Methods
+- Results
+- Interim conclusions
+
+Study 2 (8-10 minutes, 10-12 slides):
+- Research question
+- Methods
+- Results
+- Interim conclusions
+
+Study 3 (optional) (8-10 minutes, 10-12 slides):
+- Research question
+- Methods
+- Results
+- Interim conclusions
+
+General Discussion (8-10 minutes, 8-10 slides):
+- Synthesis across studies
+- Theoretical implications
+- Practical applications
+- Limitations (comprehensive)
+- Future research directions
+
+Conclusions (2-3 minutes, 2-3 slides):
+- Main contributions
+- Final thoughts
+- Acknowledgments
+```
+
+### Defense Best Practices
+
+**Preparation**:
+- ✅ Practice extensively (5+ times)
+- ✅ Anticipate every possible question
+- ✅ Prepare backup slides with extra analyses
+- ✅ Review key literature thoroughly
+- ✅ Understand limitations deeply
+- ✅ Practice Q&A with colleagues
+- ❌ Don't assume committee remembers all details
+- ❌ Don't leave preparation to last minute
+
+**Content**:
+- ✅ Comprehensive coverage of all studies
+- ✅ Clear connection between studies
+- ✅ Address limitations proactively
+- ✅ Show theoretical contribution
+- ✅ Demonstrate independent thinking
+- ✅ Acknowledge contributions of others
+- ❌ Don't minimize limitations
+- ❌ Don't oversell findings
+- ❌ Don't ignore null results
+
+**Q&A Approach**:
+- ✅ Listen carefully to full question
+- ✅ Pause before answering (shows thoughtfulness)
+- ✅ Admit when you don't know
+- ✅ Engage with criticism constructively
+- ✅ Refer to specific slides or dissertation sections
+- ✅ Thank questioner for insights
+- ❌ Don't be defensive or argumentative
+- ❌ Don't dismiss concerns
+- ❌ Don't ramble in answers
+
+**Handling Difficult Questions**:
+- **Critique of methods**: Acknowledge limitation, explain rationale, note in future work
+- **Alternative interpretations**: "That's an interesting perspective. I focused on X because... but Y is worth exploring"
+- **Why didn't you do X?**: "That would be valuable. Due to [constraint], I prioritized... Future work should examine that"
+- **Contradiction in results**: "You're right that seems inconsistent. One possible explanation is..."
+
+## Grant Pitches and Funding Presentations
+
+### Context and Expectations
+
+**Typical Characteristics**:
+- **Duration**: 10-20 minutes (varies widely)
+- **Audience**: Funding panel, non-specialists, decision-makers
+- **Setting**: Evaluative, competitive
+- **Goal**: Secure funding, demonstrate feasibility and impact
+- **Format**: Presentation + Q&A focused on logistics and impact
+
+**Evaluation Criteria**:
+- Significance and innovation
+- Approach and feasibility
+- Investigator qualifications
+- Environment and resources
+- Budget justification
+
+### Structure for 15-Minute Grant Pitch
+
+**Recommended Slide Count**: 12-15 slides
+
+**Time Allocation**:
+```
+Significance (3-4 minutes, 3-4 slides):
+- Problem statement with impact (90 seconds)
+- Current state and limitations (90 seconds)
+- Opportunity and innovation (60-90 seconds)
+
+Approach (5-6 minutes, 5-6 slides):
+- Overall strategy (60 seconds)
+- Aim 1: Approach and expected outcomes (90 seconds)
+- Aim 2: Approach and expected outcomes (90 seconds)
+- Aim 3: Approach and expected outcomes (optional, 90 seconds)
+- Timeline and milestones (60 seconds)
+
+Impact and Feasibility (4-5 minutes, 3-4 slides):
+- Preliminary data (2 minutes)
+- Expected impact (1 minute)
+- Team and resources (1 minute)
+- Alternative strategies for risks (60 seconds)
+
+Conclusion (1 minute, 1 slide):
+- Summary of innovation and impact
+- Budget highlight (if appropriate)
+```
+
+### Grant Pitch Best Practices
+
+**Significance**:
+- ✅ Lead with impact (lives saved, costs reduced, knowledge gained)
+- ✅ Use compelling statistics and real-world examples
+- ✅ Clearly state innovation (what's new?)
+- ✅ Connect to funder's mission and priorities
+- ❌ Don't assume audience knows why it matters
+- ❌ Don't be vague about expected outcomes
+
+**Approach**:
+- ✅ Show feasibility (you can actually do this)
+- ✅ Present clear, logical aims
+- ✅ Show preliminary data demonstrating proof-of-concept
+- ✅ Explain why your approach will work
+- ✅ Address potential challenges proactively
+- ❌ Don't be overly technical
+- ❌ Don't ignore obvious challenges
+- ❌ Don't propose unrealistic timelines
+
+**Team and Resources**:
+- ✅ Highlight key personnel expertise
+- ✅ Show institutional support
+- ✅ Mention prior funding success
+- ✅ Demonstrate appropriate resources available
+- ❌ Don't undersell your qualifications
+- ❌ Don't propose work beyond your expertise without collaborators
+
+**Q&A Focus**:
+- Expect questions about:
+ - Budget justification
+ - Timeline and milestones
+ - What if Aim 1 fails?
+ - How is this different from X's work?
+ - How will you sustain this beyond grant period?
+ - Dissemination and translation plans
+
+## Journal Club Presentations
+
+### Context and Expectations
+
+**Typical Characteristics**:
+- **Duration**: 20-45 minutes
+- **Audience**: Lab members, colleagues, students
+- **Setting**: Educational, critical discussion
+- **Goal**: Understand paper, critique methods, discuss implications
+- **Format**: Heavy Q&A, interactive discussion
+
+**Unique Aspects**:
+- Presenting others' work, not your own
+- Critical analysis expected
+- Audience may have read paper
+- Educational component important
+- Discussion more important than presentation
+
+### Structure for 30-Minute Journal Club
+
+**Recommended Slide Count**: 15-20 slides
+
+**Time Allocation**:
+```
+Context (2-3 minutes, 2-3 slides):
+- Paper citation and authors
+- Why you chose this paper
+- Background and significance
+
+Introduction (3-4 minutes, 2-3 slides):
+- Research question
+- Prior work and gaps
+- Hypotheses
+
+Methods (5-7 minutes, 4-6 slides):
+- Study design
+- Participants/materials
+- Procedures
+- Analysis approach
+- Your assessment of methods
+
+Results (8-10 minutes, 5-7 slides):
+- Main findings
+- Key figures explained
+- Statistical results
+- Your interpretation
+
+Discussion (5-7 minutes, 3-4 slides):
+- Authors' interpretation
+- Strengths of study
+- Limitations and concerns
+- Implications for field
+- Future directions
+
+Critical Analysis (3-5 minutes, 1-2 slides):
+- What did we learn?
+- What questions remain?
+- How does this change our thinking?
+- Relevance to our work
+```
+
+### Journal Club Best Practices
+
+**Preparation**:
+- ✅ Read paper multiple times
+- ✅ Read key cited references
+- ✅ Look up unfamiliar methods or concepts
+- ✅ Check other papers from same group
+- ✅ Prepare critical questions for discussion
+- ❌ Don't just summarize without analysis
+
+**Presentation**:
+- ✅ Explain paper clearly (not everyone may have read it)
+- ✅ Highlight key figures and data
+- ✅ Point out strengths and innovations
+- ✅ Identify limitations or concerns
+- ✅ Be fair but critical
+- ✅ Connect to group's research interests
+- ❌ Don't just read the paper aloud
+- ❌ Don't be overly harsh or dismissive
+- ❌ Don't skip methods (often most important)
+
+**Critical Analysis**:
+- ✅ Question methodological choices
+- ✅ Consider alternative interpretations
+- ✅ Identify what's missing
+- ✅ Discuss implications thoughtfully
+- ✅ Suggest follow-up experiments
+- ❌ Don't accept everything at face value
+- ❌ Don't nitpick minor issues while missing major flaws
+- ❌ Don't let personal biases dominate
+
+**Discussion Facilitation**:
+- Pose open-ended questions
+- "What do you think about their interpretation of Figure 3?"
+- "Is this the right control experiment?"
+- "How would you design the follow-up study?"
+- Encourage quiet members to contribute
+- Keep discussion focused and productive
+
+## Industry and Investor Presentations
+
+### Context and Expectations
+
+**Typical Characteristics**:
+- **Duration**: 10-30 minutes (often shorter)
+- **Audience**: Non-scientists, business decision-makers
+- **Setting**: High stakes, evaluative
+- **Goal**: Secure investment, partnership, or approval
+- **Format**: Emphasis on business case and timeline
+
+**Key Differences from Academic Talks**:
+- Emphasis on applications, not mechanisms
+- Market size and competition important
+- Intellectual property considerations
+- Return on investment focus
+- Less technical detail expected
+
+### Structure for 20-Minute Industry Pitch
+
+**Time Allocation**:
+```
+Problem and Market (3-4 minutes):
+- Unmet need or problem
+- Market size and opportunity
+- Current solutions and limitations
+
+Solution (4-5 minutes):
+- Your technology or approach
+- Key innovations
+- Proof of concept data
+- Advantages over alternatives
+
+Development Plan (5-6 minutes):
+- Current status (TRL/stage)
+- Development roadmap
+- Key milestones and timeline
+- Regulatory pathway (if applicable)
+
+Business Case (4-5 minutes):
+- Target customers/users
+- Revenue model
+- Competitive landscape
+- Intellectual property status
+- Team and partnerships
+
+Funding Ask (2-3 minutes):
+- Investment needed
+- Use of funds
+- Expected outcomes
+- Exit strategy or ROI
+```
+
+### Industry Pitch Best Practices
+
+**Language**:
+- ✅ Simple, clear language (no jargon)
+- ✅ Focus on benefits and outcomes
+- ✅ Use business metrics (TAM, SAM, SOM)
+- ✅ Emphasize competitive advantages
+- ❌ Don't use academic terminology
+- ❌ Don't focus on mechanistic details
+- ❌ Don't ignore commercial viability
+
+**Emphasis**:
+- Lead with problem and market opportunity
+- Show proof of concept clearly
+- Demonstrate clear path to commercialization
+- Highlight team's ability to execute
+- Be realistic about risks and challenges
+
+## Teaching and Tutorial Presentations
+
+### Context and Expectations
+
+**Typical Characteristics**:
+- **Duration**: 45-90 minutes
+- **Audience**: Students, learners, varied expertise
+- **Setting**: Educational, classroom or workshop
+- **Goal**: Teach concepts, methods, or skills
+- **Format**: Interactive, may include exercises
+
+**Structure for 60-Minute Tutorial**:
+```
+Introduction (5 minutes):
+- Learning objectives
+- Why this topic matters
+- Prerequisites and assumptions
+
+Foundations (10-15 minutes):
+- Essential background
+- Key concepts defined
+- Simple examples
+
+Core Content - Part 1 (15-20 minutes):
+- Main topic area 1
+- Detailed explanation
+- Examples and demonstrations
+
+Core Content - Part 2 (15-20 minutes):
+- Main topic area 2
+- Detailed explanation
+- Examples and demonstrations
+
+Practice/Application (10-15 minutes):
+- Hands-on exercise or case study
+- Q&A and discussion
+- Common pitfalls
+
+Summary (5 minutes):
+- Key takeaways
+- Resources for further learning
+- Next steps
+```
+
+### Tutorial Best Practices
+
+**Content**:
+- ✅ Build complexity gradually
+- ✅ Use many examples
+- ✅ Repeat key concepts
+- ✅ Check understanding frequently
+- ✅ Provide resources and references
+- ❌ Don't assume prior knowledge
+- ❌ Don't move too quickly
+
+**Engagement**:
+- ✅ Ask questions to audience
+- ✅ Include interactive elements
+- ✅ Use demonstrations
+- ✅ Encourage questions throughout
+- ✅ Provide practice opportunities
+- ❌ Don't lecture non-stop for 60 minutes
+
+## Summary: Choosing the Right Approach
+
+| Talk Type | Duration | Audience | Depth | Key Focus |
+|-----------|----------|----------|-------|-----------|
+| Lightning | 5-7 min | General | Minimal | One key finding |
+| Conference | 15 min | Specialists | Moderate | Main results |
+| Seminar | 45-60 min | Experts | Deep | Comprehensive |
+| Defense | 45-60 min | Committee | Complete | All studies |
+| Grant | 15-20 min | Mixed | Moderate | Impact & feasibility |
+| Journal Club | 30-45 min | Lab group | Critical | Methods & interpretation |
+| Industry | 15-30 min | Non-scientists | Applied | Business case |
+
+### Adaptation Checklist
+
+When preparing any talk, consider:
+
+- [ ] Who is my audience? (Expertise level, background, expectations)
+- [ ] How much time do I have? (Strictly enforced or flexible?)
+- [ ] What is the goal? (Inform, persuade, teach, impress?)
+- [ ] What format is expected? (Formal vs. interactive, Q&A style)
+- [ ] What will happen afterward? (Q&A, discussion, evaluation, networking)
+- [ ] What are the logistics? (Room size, A/V setup, recording, remote?)
+
+Adapt your structure, content depth, language, and delivery style accordingly.
diff --git a/scientific-skills/scientific-slides/references/visual_review_workflow.md b/scientific-skills/scientific-slides/references/visual_review_workflow.md
new file mode 100644
index 0000000..76de884
--- /dev/null
+++ b/scientific-skills/scientific-slides/references/visual_review_workflow.md
@@ -0,0 +1,775 @@
+# Visual Review Workflow for Presentations
+
+## Overview
+
+Visual review is a critical quality assurance step for presentations, allowing you to identify and fix layout issues, text overflow, element overlap, and design problems before presenting. This guide covers converting presentations to images, systematic visual inspection, common issues, and iterative improvement strategies.
+
+## ⚠️ CRITICAL RULE: NEVER READ PDF PRESENTATIONS DIRECTLY
+
+**MANDATORY: Always convert presentation PDFs to images FIRST, then review the images.**
+
+### Why This Rule Exists
+
+- **Buffer Overflow Prevention**: Presentation PDFs (especially multi-slide decks) cause "JSON message exceeded maximum buffer size" errors when read directly
+- **Visual Accuracy**: Images show exactly what the audience will see, including rendering issues
+- **Performance**: Image-based review is faster and more reliable than PDF text extraction
+- **Consistency**: Ensures uniform review process for all presentations
+
+### The ONLY Correct Workflow for Presentations
+
+1. ✅ Generate PDF from PowerPoint/Beamer source
+2. ✅ **Convert PDF to images** using the pdf_to_images.py script
+3. ✅ **Review the image files** systematically
+4. ✅ Document issues by slide number
+5. ✅ Fix issues in source files
+6. ✅ Regenerate PDF and repeat
+
+### What NOT To Do
+
+- ❌ NEVER use read_file tool on presentation PDFs
+- ❌ NEVER attempt to read PDF slides as text
+- ❌ NEVER skip the image conversion step
+- ❌ NEVER assume PDF is "small enough" to read directly
+
+**If you're reviewing a presentation and haven't converted to images yet, STOP and convert first.**
+
+## Why Visual Review Matters
+
+### Common Problems Invisible in Source
+
+**LaTeX Beamer Issues**:
+- Text overflow from text boxes
+- Overlapping elements (equations over images)
+- Poor line breaking
+- Figures extending beyond slide boundaries
+- Font size issues at actual resolution
+
+**PowerPoint Issues**:
+- Text cut off by shapes or slide edges
+- Images overlapping with text
+- Inconsistent spacing between slides
+- Color rendering differences
+- Font substitution problems
+
+**Projection Issues**:
+- Content visible on laptop but cut off when projected
+- Colors looking different on projector
+- Low contrast elements becoming invisible
+- Small details disappearing
+
+### Benefits of Visual Review
+
+- **Catch layout errors early**: Fix before printing or presenting
+- **Verify readability**: Ensure text is large enough and high contrast
+- **Check consistency**: Spot inconsistencies across slides
+- **Test accessibility**: Verify color contrast and clarity
+- **Validate design**: Ensure professional appearance
+
+## Conversion: PDF to Images
+
+### Method 1: Using pdf_to_images.py Script (Recommended)
+
+**No External Dependencies Required**:
+The script uses PyMuPDF, a self-contained Python library - no poppler or other system software needed.
+
+**Installation**:
+```bash
+# PyMuPDF is included as a project dependency
+pip install pymupdf
+```
+
+**Basic Conversion**:
+```bash
+# Convert all slides to JPEG images
+python skills/scientific-slides/scripts/pdf_to_images.py presentation.pdf slide --dpi 150
+
+# Creates: slide-001.jpg, slide-002.jpg, slide-003.jpg, ...
+```
+
+**High-Resolution Conversion**:
+```bash
+# Higher quality for detailed inspection (300 DPI)
+python skills/scientific-slides/scripts/pdf_to_images.py presentation.pdf slide --dpi 300
+
+# PNG format (lossless, larger files)
+python skills/scientific-slides/scripts/pdf_to_images.py presentation.pdf slide --dpi 150 --format png
+```
+
+**Convert Specific Slides**:
+```bash
+# Slides 5-10 only
+python skills/scientific-slides/scripts/pdf_to_images.py presentation.pdf slide --dpi 150 --first 5 --last 10
+
+# Single slide
+python skills/scientific-slides/scripts/pdf_to_images.py presentation.pdf slide --dpi 150 --first 3 --last 3
+```
+
+**Output Options**:
+```bash
+# Different output directory
+python skills/scientific-slides/scripts/pdf_to_images.py presentation.pdf review/slide --dpi 150
+
+# Custom naming
+python skills/scientific-slides/scripts/pdf_to_images.py presentation.pdf output/presentation --dpi 150
+```
+
+### Method 2: Using PowerPoint Thumbnail Script
+
+For PowerPoint presentations, use the pptx skill's thumbnail tool:
+
+```bash
+# Create thumbnail grid
+python scripts/thumbnail.py presentation.pptx output --cols 4
+
+# Individual slides
+python scripts/thumbnail.py presentation.pptx slides/slide --individual
+```
+
+**Advantages**:
+- Optimized for PowerPoint files
+- Can create overview grids
+- Handles .pptx format directly
+- Customizable layout
+
+### Method 3: Using ImageMagick
+
+**Installation**:
+```bash
+# Ubuntu/Debian
+sudo apt-get install imagemagick
+
+# macOS
+brew install imagemagick
+```
+
+**Conversion**:
+```bash
+# Convert PDF to images
+convert -density 150 presentation.pdf slide.jpg
+
+# Higher quality
+convert -density 300 presentation.pdf slide.jpg
+
+# Specific format
+convert -density 150 presentation.pdf slide.png
+```
+
+### Method 4: Using Python (Programmatic)
+
+```python
+import fitz # PyMuPDF
+
+# Open PDF
+doc = fitz.open('presentation.pdf')
+
+# Convert each page to image
+zoom = 200 / 72 # 200 DPI (72 is base DPI)
+matrix = fitz.Matrix(zoom, zoom)
+
+for i, page in enumerate(doc, start=1):
+ pixmap = page.get_pixmap(matrix=matrix)
+ pixmap.save(f'slide-{i:03d}.jpg', output='jpeg')
+
+doc.close()
+```
+
+**Install PyMuPDF**:
+```bash
+pip install pymupdf
+# No external dependencies needed!
+```
+
+## Systematic Visual Inspection
+
+### Inspection Workflow
+
+**Step 1: Overview Pass**
+- View all slides quickly
+- Note overall consistency
+- Identify obviously problematic slides
+- Create list of slides needing detailed review
+
+**Step 2: Detailed Inspection**
+- Review each flagged slide carefully
+- Check against issue checklist (below)
+- Document specific problems with slide numbers
+- Take notes on required fixes
+
+**Step 3: Cross-Slide Comparison**
+- Check consistency across similar slides
+- Verify uniform spacing and alignment
+- Ensure consistent font sizes
+- Check color scheme consistency
+
+**Step 4: Distance Test**
+- View images at reduced size (simulates projection)
+- Check readability from ~6 feet
+- Verify key elements are visible
+- Test if main message is clear
+
+### Issue Checklist
+
+Review each slide for these common problems:
+
+#### Text Issues
+
+**Overflow and Truncation**:
+- [ ] Text cut off at slide edges
+- [ ] Text extending beyond text boxes
+- [ ] Equations running into margins
+- [ ] Captions cut off at bottom
+- [ ] Bullet points extending beyond boundary
+
+**Readability**:
+- [ ] Font size too small (minimum 18pt visible)
+- [ ] Poor contrast (text vs background)
+- [ ] Inadequate line spacing
+- [ ] Text too close to slide edge
+- [ ] Overlapping lines of text
+
+#### Element Overlap
+
+**Text Overlaps**:
+- [ ] Text overlapping with images
+- [ ] Text overlapping with shapes
+- [ ] Multiple text boxes overlapping
+- [ ] Labels overlapping with data points
+- [ ] Title overlapping with content
+
+**Visual Element Overlaps**:
+- [ ] Images overlapping
+- [ ] Shapes overlapping inappropriately
+- [ ] Figures extending into margins
+- [ ] Legend overlapping with plot
+- [ ] Watermark obscuring content
+
+#### Layout and Spacing
+
+**Alignment Issues**:
+- [ ] Misaligned text boxes
+- [ ] Uneven margins
+- [ ] Inconsistent element positioning
+- [ ] Off-center titles
+- [ ] Unaligned bullet points
+
+**Spacing Problems**:
+- [ ] Cramped content (insufficient white space)
+- [ ] Too much empty space (poor use of slide area)
+- [ ] Inconsistent spacing between elements
+- [ ] Uneven gaps in multi-column layouts
+- [ ] Poor distribution of content
+
+#### Color and Contrast
+
+**Visibility**:
+- [ ] Insufficient contrast (text vs background)
+- [ ] Colors too similar (hard to distinguish)
+- [ ] Text on busy backgrounds
+- [ ] Light text on light background
+- [ ] Dark text on dark background
+
+**Consistency**:
+- [ ] Inconsistent color schemes between slides
+- [ ] Unexpected color changes
+- [ ] Clashing color combinations
+- [ ] Poor color choices for data visualization
+
+#### Figures and Graphics
+
+**Quality**:
+- [ ] Pixelated or blurry images
+- [ ] Low-resolution figures
+- [ ] Distorted aspect ratios
+- [ ] Poor quality screenshots
+- [ ] Jagged edges on graphics
+
+**Layout**:
+- [ ] Figures too small to read
+- [ ] Axis labels too small
+- [ ] Legend text illegible
+- [ ] Complex figures without explanation
+- [ ] Figures not centered or aligned
+
+#### Technical Issues
+
+**Rendering**:
+- [ ] Missing fonts (substituted)
+- [ ] Special characters not displaying
+- [ ] Equations rendering incorrectly
+- [ ] Broken images or missing files
+- [ ] Incorrect colors (RGB vs CMYK)
+
+**Consistency**:
+- [ ] Slide numbers incorrect or missing
+- [ ] Inconsistent footer/header
+- [ ] Navigation elements broken
+- [ ] Hyperlinks not working (if testing interactively)
+
+## Documentation Template
+
+### Issue Log Format
+
+Create a spreadsheet or document tracking all issues:
+
+```
+Slide # | Issue Category | Description | Severity | Status
+--------|---------------|-------------|----------|--------
+3 | Text Overflow | Bullet point 4 extends beyond box | High | Fixed
+7 | Element Overlap | Figure overlaps with caption | High | Fixed
+12 | Font Size | Axis labels too small | Medium | Fixed
+15 | Alignment | Title not centered | Low | Fixed
+22 | Contrast | Yellow text on white background | High | Fixed
+```
+
+**Severity Levels**:
+- **Critical**: Makes slide unusable or unprofessional
+- **High**: Significantly impacts readability or appearance
+- **Medium**: Noticeable but doesn't prevent comprehension
+- **Low**: Minor cosmetic issues
+
+### Example Issue Documentation
+
+**Good Documentation**:
+```
+Slide 8: Text Overflow Issue
+- Description: Last bullet point "...implementation details"
+ extends ~0.5 inches beyond right margin of text box
+- Cause: Bullet text too long for available width
+- Fix: Reduce text to "...implementation" or increase box width
+- Verification: Check neighboring slides for similar issue
+```
+
+**Poor Documentation**:
+```
+Slide 8: text problem
+- Fix: make smaller
+```
+
+## Common Issues and Solutions
+
+### Issue 1: Text Overflow
+
+**Problem**: Text extends beyond boundaries
+
+**Identification**:
+- Visible text cut off at edge
+- Text running into margins
+- Partial characters visible
+
+**Solutions**:
+
+**LaTeX Beamer**:
+```latex
+% Reduce text
+\begin{frame}{Title}
+ \begin{itemize}
+ \item Shorten this long bullet point
+ % or
+ \item Use abbreviations or acronyms
+ % or
+ \item Split into multiple bullets
+ \end{itemize}
+\end{frame}
+
+% Adjust margins
+\newgeometry{margin=1.5cm}
+\begin{frame}
+ Content with wider margins
+\end{frame}
+\restoregeometry
+
+% Smaller font for specific element
+{\small
+ Long text that needs to fit
+}
+```
+
+**PowerPoint**:
+- Reduce font size for that element
+- Shorten text content
+- Increase text box size
+- Use text box auto-fit options (cautiously)
+- Split into multiple slides
+
+### Issue 2: Element Overlap
+
+**Problem**: Elements overlapping inappropriately
+
+**Identification**:
+- Text obscured by images
+- Shapes covering text
+- Figures overlapping
+
+**Solutions**:
+
+**LaTeX Beamer**:
+```latex
+% Use columns for better separation
+\begin{columns}
+ \begin{column}{0.5\textwidth}
+ Text content
+ \end{column}
+ \begin{column}{0.5\textwidth}
+ \includegraphics[width=\textwidth]{figure.pdf}
+ \end{column}
+\end{columns}
+
+% Add spacing
+\vspace{0.5cm}
+
+% Adjust figure size
+\includegraphics[width=0.7\textwidth]{figure.pdf}
+```
+
+**PowerPoint**:
+- Use alignment guides to reposition
+- Reduce element sizes
+- Use two-column layout
+- Send elements backward/forward (layering)
+- Increase spacing between elements
+
+### Issue 3: Poor Contrast
+
+**Problem**: Text difficult to read due to color choices
+
+**Identification**:
+- Squinting required to read text
+- Text fades into background
+- Colors too similar
+
+**Solutions**:
+
+**LaTeX Beamer**:
+```latex
+% Increase contrast
+\setbeamercolor{frametitle}{fg=black,bg=white}
+\setbeamercolor{normal text}{fg=black,bg=white}
+
+% Use darker colors
+\definecolor{darkblue}{RGB}{0,50,100}
+\setbeamercolor{structure}{fg=darkblue}
+
+% Test in grayscale
+\usepackage{xcolor}
+\selectcolormodel{gray} % Temporarily for testing
+```
+
+**PowerPoint**:
+- Choose high-contrast color combinations
+- Use dark text on light background or vice versa
+- Avoid pastels for text
+- Test with WebAIM contrast checker
+- Add text background box if needed
+
+### Issue 4: Tiny Fonts
+
+**Problem**: Text too small to read from distance
+
+**Identification**:
+- Can't read text from 3 feet away
+- Axis labels disappear when viewing normally
+- Captions illegible
+
+**Solutions**:
+
+**LaTeX Beamer**:
+```latex
+% Increase base font size
+\documentclass[14pt]{beamer} % Instead of 11pt default
+
+% Recreate figures with larger fonts
+% In matplotlib:
+plt.rcParams['font.size'] = 18
+plt.rcParams['axes.labelsize'] = 20
+
+% In R/ggplot2:
+theme_set(theme_minimal(base_size = 16))
+```
+
+**PowerPoint**:
+- Minimum 18pt for body text, 24pt preferred
+- Recreate figures with larger labels
+- Use direct labeling instead of legends
+- Simplify complex figures
+- Split dense content across multiple slides
+
+### Issue 5: Misalignment
+
+**Problem**: Elements not properly aligned
+
+**Identification**:
+- Uneven margins
+- Titles at different positions
+- Irregular spacing
+
+**Solutions**:
+
+**LaTeX Beamer**:
+```latex
+% Use consistent templates
+\setbeamertemplate{frametitle}[default][center]
+
+% Align columns at top
+\begin{columns}[T] % T = top alignment
+ \begin{column}{0.5\textwidth}
+ Content
+ \end{column}
+ \begin{column}{0.5\textwidth}
+ Content
+ \end{column}
+\end{columns}
+
+% Center figures
+\begin{center}
+ \includegraphics[width=0.8\textwidth]{figure.pdf}
+\end{center}
+```
+
+**PowerPoint**:
+- Use alignment tools (Align Left/Center/Right)
+- Enable gridlines and guides
+- Use snap to grid
+- Distribute objects evenly
+- Create master slides with consistent layouts
+
+## Iterative Improvement Process
+
+### Workflow Cycle
+
+```
+1. Generate PDF
+ ↓
+2. Convert to images
+ ↓
+3. Systematic visual inspection
+ ↓
+4. Document issues
+ ↓
+5. Prioritize fixes
+ ↓
+6. Apply corrections to source
+ ↓
+7. Regenerate PDF
+ ↓
+8. Re-inspect (go to step 2)
+ ↓
+9. Complete when no critical issues remain
+```
+
+### Prioritization Strategy
+
+**Fix Immediately** (Block presentation):
+- Text overflow making content unreadable
+- Critical element overlaps obscuring data
+- Broken figures or missing content
+- Severely poor contrast
+
+**Fix Before Presenting**:
+- Font sizes too small
+- Moderate alignment issues
+- Inconsistent spacing
+- Moderate contrast problems
+
+**Fix If Time Permits**:
+- Minor misalignments
+- Small spacing inconsistencies
+- Cosmetic improvements
+- Non-critical color adjustments
+
+### Stopping Criteria
+
+**Minimum Standards**:
+- [ ] No text overflow or truncation
+- [ ] No element overlaps obscuring content
+- [ ] All text readable at minimum 18pt equivalent
+- [ ] Adequate contrast (4.5:1 ratio minimum)
+- [ ] Figures and images display correctly
+- [ ] Consistent slide structure
+
+**Ideal Standards**:
+- [ ] Professional appearance throughout
+- [ ] Consistent alignment and spacing
+- [ ] High contrast (7:1 ratio)
+- [ ] Optimal font sizes (24pt+)
+- [ ] Polished visual design
+- [ ] Zero layout issues
+
+## Automated Detection Strategies
+
+### Python Script for Text Overflow Detection
+
+```python
+from PIL import Image
+import numpy as np
+
+def detect_edge_content(image_path, threshold=10):
+ """
+ Detect if content extends too close to slide edges.
+ Returns True if potential overflow detected.
+ """
+ img = Image.open(image_path).convert('L') # Grayscale
+ arr = np.array(img)
+
+ # Check edges (10 pixel border)
+ left_edge = arr[:, :threshold]
+ right_edge = arr[:, -threshold:]
+ top_edge = arr[:threshold, :]
+ bottom_edge = arr[-threshold:, :]
+
+ # Look for non-white pixels (content)
+ white_threshold = 240
+
+ issues = []
+ if np.any(left_edge < white_threshold):
+ issues.append("Left edge")
+ if np.any(right_edge < white_threshold):
+ issues.append("Right edge")
+ if np.any(top_edge < white_threshold):
+ issues.append("Top edge")
+ if np.any(bottom_edge < white_threshold):
+ issues.append("Bottom edge")
+
+ return issues
+
+# Usage
+for slide_num in range(1, 26):
+ issues = detect_edge_content(f'slide-{slide_num}.jpg')
+ if issues:
+ print(f"Slide {slide_num}: Content near {', '.join(issues)}")
+```
+
+### Contrast Checking
+
+```python
+from PIL import Image
+import numpy as np
+
+def check_contrast(image_path):
+ """
+ Estimate contrast ratio in image.
+ Simple version: compare lightest and darkest regions.
+ """
+ img = Image.open(image_path).convert('L')
+ arr = np.array(img)
+
+ # Get brightness values
+ bright = np.percentile(arr, 95)
+ dark = np.percentile(arr, 5)
+
+ # Rough contrast ratio
+ contrast = (bright + 0.05) / (dark + 0.05)
+
+ if contrast < 4.5:
+ return f"Low contrast: {contrast:.1f}:1 (minimum 4.5:1)"
+ return f"OK: {contrast:.1f}:1"
+
+# Usage
+for slide_num in range(1, 26):
+ result = check_contrast(f'slide-{slide_num}.jpg')
+ print(f"Slide {slide_num}: {result}")
+```
+
+## Manual Review Best Practices
+
+### Review Environment
+
+**Setup**:
+- Large monitor or dual monitors
+- Good lighting (not too bright, not dark)
+- Distraction-free environment
+- Image viewer with zoom capability
+- Notepad or spreadsheet for tracking issues
+
+**Viewing Options**:
+- View at 100% for detail inspection
+- View at 50% to simulate distance
+- View in sequence to check consistency
+- Compare similar slides side-by-side
+
+### Review Tips
+
+**Fresh Eyes**:
+- Take breaks every 15-20 slides
+- Review at different times of day
+- Get colleague to review
+- Come back next day for final check
+
+**Systematic Approach**:
+- Review in order (slide 1 → end)
+- Focus on one issue type at a time
+- Use checklist to ensure thoroughness
+- Document as you go, not from memory
+
+**Common Oversights**:
+- Backup slides (review these too!)
+- Title slide (first impression matters)
+- Acknowledgments slide (often forgotten)
+- Last slide (visible during Q&A)
+
+## Tools and Resources
+
+### Recommended Software
+
+**PDF to Image Conversion**:
+- **PyMuPDF** (Python): Fast, no external dependencies (recommended)
+- **pdf_to_images.py script**: Wrapper for easy CLI usage
+- **ImageMagick**: Flexible, many options (optional)
+
+**Image Viewing**:
+- **IrfanView** (Windows): Fast, many formats
+- **Preview** (macOS): Built-in, simple
+- **Eye of GNOME** (Linux): Lightweight
+- **XnView**: Cross-platform, batch operations
+
+**Issue Tracking**:
+- **Spreadsheet** (Excel, Google Sheets): Simple, flexible
+- **Markdown file**: Version control friendly
+- **Issue tracker** (GitHub, Jira): If team collaboration
+- **Checklist app**: For mobile review
+
+### Contrast Checkers
+
+- **WebAIM Contrast Checker**: https://webaim.org/resources/contrastchecker/
+- **Colour Contrast Analyser**: Desktop application
+- **Chrome DevTools**: Built-in contrast checking
+
+### Color Blindness Simulators
+
+- **Coblis**: https://www.color-blindness.com/coblis-color-blindness-simulator/
+- **Color Oracle**: Free desktop application
+- **Photoshop/GIMP**: Built-in color blindness filters
+
+## Summary Checklist
+
+Before finalizing your presentation:
+
+**Conversion**:
+- [ ] PDF converted to images at adequate resolution (150-300 DPI)
+- [ ] All slides converted (including backup slides)
+- [ ] Images saved in organized directory
+
+**Visual Inspection**:
+- [ ] All slides reviewed systematically
+- [ ] Issue checklist completed for each slide
+- [ ] Problems documented with slide numbers
+- [ ] Severity assigned to each issue
+
+**Issue Resolution**:
+- [ ] Critical issues fixed
+- [ ] High-priority issues addressed
+- [ ] Source files updated (not just PDF)
+- [ ] Regenerated and re-inspected
+
+**Final Verification**:
+- [ ] No text overflow or truncation
+- [ ] No inappropriate element overlaps
+- [ ] Adequate contrast throughout
+- [ ] Consistent layout and spacing
+- [ ] Professional appearance
+- [ ] Ready for projection or distribution
+
+**Testing**:
+- [ ] Tested on projector if possible
+- [ ] Viewed from back of room distance
+- [ ] Checked in various lighting conditions
+- [ ] Backup copy saved
diff --git a/scientific-skills/scientific-slides/scripts/generate_slide_image.py b/scientific-skills/scientific-slides/scripts/generate_slide_image.py
new file mode 100644
index 0000000..d946a79
--- /dev/null
+++ b/scientific-skills/scientific-slides/scripts/generate_slide_image.py
@@ -0,0 +1,140 @@
+#!/usr/bin/env python3
+"""
+Slide image generation using Nano Banana Pro.
+
+Generate presentation slides or visuals by describing them in natural language.
+Nano Banana Pro handles everything automatically with smart iterative refinement.
+
+Two modes:
+- Default (full slide): Generate complete slides with title, content, visuals (for PDF workflow)
+- Visual only: Generate just images/figures to place on slides (for PPT workflow)
+
+Supports attaching reference images for context (Nano Banana Pro will see these).
+
+Usage:
+ # Generate full slide for PDF workflow
+ python generate_slide_image.py "Title: Introduction\\nKey points: AI, ML, Deep Learning" -o slide_01.png
+
+ # Generate visual only for PPT workflow
+ python generate_slide_image.py "Neural network diagram" -o figure.png --visual-only
+
+ # With reference images attached
+ python generate_slide_image.py "Create a slide about this data" -o slide.png --attach chart.png
+"""
+
+import argparse
+import os
+import subprocess
+import sys
+from pathlib import Path
+
+
+def main():
+ """Command-line interface."""
+ parser = argparse.ArgumentParser(
+ description="Generate presentation slides or visuals using Nano Banana Pro AI",
+ formatter_class=argparse.RawDescriptionHelpFormatter,
+ epilog="""
+How it works:
+ Describe your slide or visual in natural language.
+ Nano Banana Pro generates it automatically with:
+ - Smart iteration (only regenerates if quality is below threshold)
+ - Quality review by Gemini 3 Pro
+ - Publication-ready output
+
+Modes:
+ Default (full slide): Generate complete slide with title, content, visuals
+ Use for PDF workflow where each slide is an image
+
+ Visual only: Generate just the image/figure
+ Use for PPT workflow where you add text separately
+
+Attachments:
+ Use --attach to provide reference images that Nano Banana Pro will see.
+ This allows you to say "create a slide about this chart" and attach the chart.
+
+Examples:
+ # Full slide (default) - for PDF workflow
+ python generate_slide_image.py "Title: Machine Learning\\nPoints: supervised, unsupervised, reinforcement" -o slide_01.png
+
+ # Visual only - for PPT workflow
+ python generate_slide_image.py "Flowchart showing data pipeline" -o figure.png --visual-only
+
+ # With reference images attached
+ python generate_slide_image.py "Create a slide explaining this chart" -o slide.png --attach chart.png
+ python generate_slide_image.py "Combine these into a comparison" -o compare.png --attach before.png --attach after.png
+
+ # Multiple slides for PDF
+ python generate_slide_image.py "Title slide: AI Conference 2025" -o slides/01_title.png
+ python generate_slide_image.py "Title: Introduction\\nOverview of deep learning" -o slides/02_intro.png
+
+Environment Variables:
+ OPENROUTER_API_KEY Required for AI generation
+ """
+ )
+
+ parser.add_argument("prompt", help="Description of the slide or visual to generate")
+ parser.add_argument("-o", "--output", required=True, help="Output file path")
+ parser.add_argument("--attach", action="append", dest="attachments", metavar="IMAGE",
+ help="Attach image file(s) as context (can use multiple times)")
+ parser.add_argument("--visual-only", action="store_true",
+ help="Generate just the visual/figure (for PPT workflow)")
+ parser.add_argument("--iterations", type=int, default=2,
+ help="Maximum refinement iterations (default: 2, max: 2)")
+ parser.add_argument("--api-key", help="OpenRouter API key (or use OPENROUTER_API_KEY env var)")
+ parser.add_argument("-v", "--verbose", action="store_true", help="Verbose output")
+
+ args = parser.parse_args()
+
+ # Check for API key
+ api_key = args.api_key or os.getenv("OPENROUTER_API_KEY")
+ if not api_key:
+ print("Error: OPENROUTER_API_KEY environment variable not set")
+ print("\nFor AI generation, you need an OpenRouter API key.")
+ print("Get one at: https://openrouter.ai/keys")
+ print("\nSet it with:")
+ print(" export OPENROUTER_API_KEY='your_api_key'")
+ print("\nOr use --api-key flag")
+ sys.exit(1)
+
+ # Find AI generation script
+ script_dir = Path(__file__).parent
+ ai_script = script_dir / "generate_slide_image_ai.py"
+
+ if not ai_script.exists():
+ print(f"Error: AI generation script not found: {ai_script}")
+ sys.exit(1)
+
+ # Build command
+ cmd = [sys.executable, str(ai_script), args.prompt, "-o", args.output]
+
+ # Add attachments
+ if args.attachments:
+ for att in args.attachments:
+ cmd.extend(["--attach", att])
+
+ if args.visual_only:
+ cmd.append("--visual-only")
+
+ # Enforce max 2 iterations
+ iterations = min(args.iterations, 2)
+ if iterations != 2:
+ cmd.extend(["--iterations", str(iterations)])
+
+ if api_key:
+ cmd.extend(["--api-key", api_key])
+
+ if args.verbose:
+ cmd.append("-v")
+
+ # Execute
+ try:
+ result = subprocess.run(cmd, check=False)
+ sys.exit(result.returncode)
+ except Exception as e:
+ print(f"Error executing AI generation: {e}")
+ sys.exit(1)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/scientific-skills/scientific-slides/scripts/generate_slide_image_ai.py b/scientific-skills/scientific-slides/scripts/generate_slide_image_ai.py
new file mode 100644
index 0000000..2a7780b
--- /dev/null
+++ b/scientific-skills/scientific-slides/scripts/generate_slide_image_ai.py
@@ -0,0 +1,763 @@
+#!/usr/bin/env python3
+"""
+AI-powered slide image generation using Nano Banana Pro.
+
+This script generates presentation slides or slide visuals using AI:
+- full_slide mode: Generate complete slides with title, content, and visuals (for PDF workflow)
+- visual_only mode: Generate just images/figures to place on slides (for PPT workflow)
+
+Supports attaching reference images for context (e.g., "create a slide about this chart").
+
+Uses smart iterative refinement:
+1. Generate initial image with Nano Banana Pro
+2. Quality review using Gemini 3 Pro
+3. Only regenerate if quality is below threshold
+4. Repeat until quality meets standards (max iterations)
+
+Requirements:
+ - OPENROUTER_API_KEY environment variable
+ - requests library
+
+Usage:
+ # Full slide for PDF workflow
+ python generate_slide_image_ai.py "Title: Introduction to ML\nKey points: supervised learning, neural networks" -o slide_01.png
+
+ # Visual only for PPT workflow
+ python generate_slide_image_ai.py "Neural network architecture diagram" -o figure.png --visual-only
+
+ # With reference images attached
+ python generate_slide_image_ai.py "Create a slide explaining this chart" -o slide.png --attach chart.png --attach logo.png
+"""
+
+import argparse
+import base64
+import json
+import os
+import sys
+import time
+from pathlib import Path
+from typing import Optional, Dict, Any, List, Tuple
+
+
+try:
+ import requests
+except ImportError:
+ print("Error: requests library not found. Install with: pip install requests")
+ sys.exit(1)
+
+
+def _load_env_file():
+ """Load .env file from current directory, parent directories, or package directory."""
+ try:
+ from dotenv import load_dotenv
+ except ImportError:
+ return False
+
+ # Try current working directory first
+ env_path = Path.cwd() / ".env"
+ if env_path.exists():
+ load_dotenv(dotenv_path=env_path, override=False)
+ return True
+
+ # Try parent directories (up to 5 levels)
+ cwd = Path.cwd()
+ for _ in range(5):
+ env_path = cwd / ".env"
+ if env_path.exists():
+ load_dotenv(dotenv_path=env_path, override=False)
+ return True
+ cwd = cwd.parent
+ if cwd == cwd.parent:
+ break
+
+ # Try the package's parent directory
+ script_dir = Path(__file__).resolve().parent
+ for _ in range(5):
+ env_path = script_dir / ".env"
+ if env_path.exists():
+ load_dotenv(dotenv_path=env_path, override=False)
+ return True
+ script_dir = script_dir.parent
+ if script_dir == script_dir.parent:
+ break
+
+ return False
+
+
+class SlideImageGenerator:
+ """Generate presentation slides or visuals using AI with iterative refinement.
+
+ Two modes:
+ - full_slide: Generate complete slide with title, content, visuals (for PDF workflow)
+ - visual_only: Generate just the image/figure for a slide (for PPT workflow)
+ """
+
+ # Quality threshold for presentations (lower than journal/conference papers)
+ QUALITY_THRESHOLD = 6.5
+
+ # Guidelines for generating full slides (complete slide images)
+ FULL_SLIDE_GUIDELINES = """
+Create a professional presentation slide image with these requirements:
+
+SLIDE LAYOUT (16:9 aspect ratio):
+- Clean, modern slide design
+- Clear visual hierarchy: title at top, content below
+- Generous margins (at least 5% on all sides)
+- Balanced composition with intentional white space
+
+TYPOGRAPHY:
+- LARGE, bold title text (easily readable from distance)
+- Clear, sans-serif fonts throughout
+- High contrast text (dark on light or light on dark)
+- Bullet points or key phrases, NOT paragraphs
+- Maximum 5-6 lines of text content
+- Default author/presenter: "K-Dense" (use this unless another name is specified)
+
+VISUAL ELEMENTS:
+- Use GENERIC, simple images and icons - avoid overly specific or detailed imagery
+- MINIMAL extra elements - no decorative borders, shadows, or flourishes
+- Visuals should support and enhance the message, not distract
+- Professional, clean aesthetic with restraint
+- Consistent color scheme (2-3 main colors only)
+- Prefer abstract/conceptual visuals over literal representations
+
+PROFESSIONAL MINIMALISM:
+- Less is more: favor empty space over additional elements
+- No unnecessary decorations, gradients, or visual noise
+- Clean lines and simple shapes
+- Focused content without visual clutter
+- Corporate/academic level of professionalism
+
+PRESENTATION QUALITY:
+- Designed for projection (high contrast)
+- Bold, impactful design that commands attention
+- Professional and polished appearance
+- No cluttered or busy layouts
+- Consistent styling throughout the deck
+"""
+
+ # Guidelines for generating slide visuals only (figures/images for PPT)
+ VISUAL_ONLY_GUIDELINES = """
+Create a high-quality visual/figure for a presentation slide:
+
+IMAGE QUALITY:
+- Clean, professional appearance
+- High resolution and sharp details
+- Suitable for embedding in a slide
+
+DESIGN:
+- Simple, clear composition with MINIMAL elements
+- High contrast for projection readability
+- No text unless essential to the visual
+- Transparent or white background preferred
+- GENERIC imagery - avoid overly specific or detailed visuals
+
+PROFESSIONAL MINIMALISM:
+- Favor simplicity over complexity
+- No decorative elements, shadows, or flourishes
+- Clean lines and simple shapes only
+- Remove any unnecessary visual noise
+- Abstract/conceptual rather than literal representations
+
+STYLE:
+- Modern, professional aesthetic
+- Colorblind-friendly colors
+- Bold but restrained imagery
+- Suitable for scientific/professional presentations
+- Corporate/academic level of polish
+"""
+
+ def __init__(self, api_key: Optional[str] = None, verbose: bool = False):
+ """
+ Initialize the generator.
+
+ Args:
+ api_key: OpenRouter API key (or use OPENROUTER_API_KEY env var)
+ verbose: Print detailed progress information
+ """
+ self.api_key = api_key or os.getenv("OPENROUTER_API_KEY")
+
+ if not self.api_key:
+ _load_env_file()
+ self.api_key = os.getenv("OPENROUTER_API_KEY")
+
+ if not self.api_key:
+ raise ValueError(
+ "OPENROUTER_API_KEY not found. Please either:\n"
+ " 1. Set the OPENROUTER_API_KEY environment variable\n"
+ " 2. Add OPENROUTER_API_KEY to your .env file\n"
+ " 3. Pass api_key parameter to the constructor\n"
+ "Get your API key from: https://openrouter.ai/keys"
+ )
+
+ self.verbose = verbose
+ self._last_error = None
+ self.base_url = "https://openrouter.ai/api/v1"
+ # Nano Banana Pro for image generation
+ self.image_model = "google/gemini-3-pro-image-preview"
+ # Gemini 3 Pro for quality review
+ self.review_model = "google/gemini-3-pro"
+
+ def _log(self, message: str):
+ """Log message if verbose mode is enabled."""
+ if self.verbose:
+ print(f"[{time.strftime('%H:%M:%S')}] {message}")
+
+ def _make_request(self, model: str, messages: List[Dict[str, Any]],
+ modalities: Optional[List[str]] = None) -> Dict[str, Any]:
+ """Make a request to OpenRouter API."""
+ headers = {
+ "Authorization": f"Bearer {self.api_key}",
+ "Content-Type": "application/json",
+ "HTTP-Referer": "https://github.com/scientific-writer",
+ "X-Title": "Scientific Slide Generator"
+ }
+
+ payload = {
+ "model": model,
+ "messages": messages
+ }
+
+ if modalities:
+ payload["modalities"] = modalities
+
+ self._log(f"Making request to {model}...")
+
+ try:
+ response = requests.post(
+ f"{self.base_url}/chat/completions",
+ headers=headers,
+ json=payload,
+ timeout=120
+ )
+
+ try:
+ response_json = response.json()
+ except json.JSONDecodeError:
+ response_json = {"raw_text": response.text[:500]}
+
+ if response.status_code != 200:
+ error_detail = response_json.get("error", response_json)
+ self._log(f"HTTP {response.status_code}: {error_detail}")
+ raise RuntimeError(f"API request failed (HTTP {response.status_code}): {error_detail}")
+
+ return response_json
+ except requests.exceptions.Timeout:
+ raise RuntimeError("API request timed out after 120 seconds")
+ except requests.exceptions.RequestException as e:
+ raise RuntimeError(f"API request failed: {str(e)}")
+
+ def _extract_image_from_response(self, response: Dict[str, Any]) -> Optional[bytes]:
+ """Extract base64-encoded image from API response."""
+ try:
+ choices = response.get("choices", [])
+ if not choices:
+ self._log("No choices in response")
+ return None
+
+ message = choices[0].get("message", {})
+
+ # Nano Banana Pro returns images in the 'images' field
+ images = message.get("images", [])
+ if images and len(images) > 0:
+ self._log(f"Found {len(images)} image(s) in 'images' field")
+
+ first_image = images[0]
+ if isinstance(first_image, dict):
+ if first_image.get("type") == "image_url":
+ url = first_image.get("image_url", {})
+ if isinstance(url, dict):
+ url = url.get("url", "")
+
+ if url and url.startswith("data:image"):
+ if "," in url:
+ base64_str = url.split(",", 1)[1]
+ base64_str = base64_str.replace('\n', '').replace('\r', '').replace(' ', '')
+ self._log(f"Extracted base64 data (length: {len(base64_str)})")
+ return base64.b64decode(base64_str)
+
+ # Fallback: check content field
+ content = message.get("content", "")
+
+ if isinstance(content, str) and "data:image" in content:
+ import re
+ match = re.search(r'data:image/[^;]+;base64,([A-Za-z0-9+/=\n\r]+)', content, re.DOTALL)
+ if match:
+ base64_str = match.group(1).replace('\n', '').replace('\r', '').replace(' ', '')
+ self._log(f"Found image in content field (length: {len(base64_str)})")
+ return base64.b64decode(base64_str)
+
+ if isinstance(content, list):
+ for i, block in enumerate(content):
+ if isinstance(block, dict) and block.get("type") == "image_url":
+ url = block.get("image_url", {})
+ if isinstance(url, dict):
+ url = url.get("url", "")
+ if url and url.startswith("data:image") and "," in url:
+ base64_str = url.split(",", 1)[1].replace('\n', '').replace('\r', '').replace(' ', '')
+ self._log(f"Found image in content block {i}")
+ return base64.b64decode(base64_str)
+
+ self._log("No image data found in response")
+ return None
+
+ except Exception as e:
+ self._log(f"Error extracting image: {str(e)}")
+ return None
+
+ def _image_to_base64(self, image_path: str) -> str:
+ """Convert image file to base64 data URL."""
+ with open(image_path, "rb") as f:
+ image_data = f.read()
+
+ ext = Path(image_path).suffix.lower()
+ mime_type = {
+ ".png": "image/png",
+ ".jpg": "image/jpeg",
+ ".jpeg": "image/jpeg",
+ ".gif": "image/gif",
+ ".webp": "image/webp"
+ }.get(ext, "image/png")
+
+ base64_data = base64.b64encode(image_data).decode("utf-8")
+ return f"data:{mime_type};base64,{base64_data}"
+
+ def generate_image(self, prompt: str, attachments: Optional[List[str]] = None) -> Optional[bytes]:
+ """
+ Generate an image using Nano Banana Pro.
+
+ Args:
+ prompt: Text description of the image to generate
+ attachments: Optional list of image file paths to attach as context
+
+ Returns:
+ Image bytes or None if generation failed
+ """
+ self._last_error = None
+
+ # Build content with text and optional image attachments
+ content = []
+
+ # Add text prompt
+ content.append({
+ "type": "text",
+ "text": prompt
+ })
+
+ # Add attached images as context
+ if attachments:
+ for img_path in attachments:
+ try:
+ img_data_url = self._image_to_base64(img_path)
+ content.append({
+ "type": "image_url",
+ "image_url": {"url": img_data_url}
+ })
+ self._log(f"Attached image: {img_path}")
+ except Exception as e:
+ self._log(f"Warning: Could not attach {img_path}: {e}")
+
+ messages = [
+ {
+ "role": "user",
+ "content": content if attachments else prompt
+ }
+ ]
+
+ try:
+ response = self._make_request(
+ model=self.image_model,
+ messages=messages,
+ modalities=["image", "text"]
+ )
+
+ if self.verbose:
+ self._log(f"Response keys: {response.keys()}")
+ if "error" in response:
+ self._log(f"API Error: {response['error']}")
+
+ if "error" in response:
+ error_msg = response["error"]
+ if isinstance(error_msg, dict):
+ error_msg = error_msg.get("message", str(error_msg))
+ self._last_error = f"API Error: {error_msg}"
+ print(f"✗ {self._last_error}")
+ return None
+
+ image_data = self._extract_image_from_response(response)
+ if image_data:
+ self._log(f"✓ Generated image ({len(image_data)} bytes)")
+ else:
+ self._last_error = "No image data in API response"
+ self._log(f"✗ {self._last_error}")
+
+ return image_data
+ except RuntimeError as e:
+ self._last_error = str(e)
+ self._log(f"✗ Generation failed: {self._last_error}")
+ return None
+ except Exception as e:
+ self._last_error = f"Unexpected error: {str(e)}"
+ self._log(f"✗ Generation failed: {self._last_error}")
+ return None
+
+ def review_image(self, image_path: str, original_prompt: str,
+ iteration: int, visual_only: bool = False,
+ max_iterations: int = 2) -> Tuple[str, float, bool]:
+ """Review generated image using Gemini 3 Pro."""
+ image_data_url = self._image_to_base64(image_path)
+ threshold = self.QUALITY_THRESHOLD
+
+ image_type = "slide visual/figure" if visual_only else "presentation slide"
+
+ review_prompt = f"""You are an expert reviewer evaluating a {image_type} for presentation quality.
+
+ORIGINAL REQUEST: {original_prompt}
+
+QUALITY THRESHOLD: {threshold}/10
+ITERATION: {iteration}/{max_iterations}
+
+Evaluate this {image_type} on these criteria:
+
+1. **Visual Impact** (0-2 points)
+ - Bold, attention-grabbing design
+ - Professional appearance
+ - Suitable for projection
+
+2. **Clarity** (0-2 points)
+ - Easy to understand at a glance
+ - Clear visual hierarchy
+ - Not cluttered or busy
+
+3. **Readability** (0-2 points)
+ - Text is large and readable (if present)
+ - High contrast
+ - Clean typography
+
+4. **Composition** (0-2 points)
+ - Balanced layout
+ - Good use of space
+ - Appropriate margins
+
+5. **Relevance** (0-2 points)
+ - Matches the requested content
+ - Appropriate style for presentations
+ - Professional quality
+
+RESPOND IN THIS EXACT FORMAT:
+SCORE: [total score 0-10]
+
+STRENGTHS:
+- [strength 1]
+- [strength 2]
+
+ISSUES:
+- [issue 1 if any]
+- [issue 2 if any]
+
+VERDICT: [ACCEPTABLE or NEEDS_IMPROVEMENT]
+
+If score >= {threshold}, the image is ACCEPTABLE.
+If score < {threshold}, mark as NEEDS_IMPROVEMENT with specific suggestions."""
+
+ messages = [
+ {
+ "role": "user",
+ "content": [
+ {"type": "text", "text": review_prompt},
+ {"type": "image_url", "image_url": {"url": image_data_url}}
+ ]
+ }
+ ]
+
+ try:
+ response = self._make_request(model=self.review_model, messages=messages)
+
+ choices = response.get("choices", [])
+ if not choices:
+ return "Image generated successfully", 7.0, False
+
+ message = choices[0].get("message", {})
+ content = message.get("content", "")
+
+ reasoning = message.get("reasoning", "")
+ if reasoning and not content:
+ content = reasoning
+
+ if isinstance(content, list):
+ text_parts = []
+ for block in content:
+ if isinstance(block, dict) and block.get("type") == "text":
+ text_parts.append(block.get("text", ""))
+ content = "\n".join(text_parts)
+
+ # Extract score
+ score = 7.0
+ import re
+ score_match = re.search(r'SCORE:\s*(\d+(?:\.\d+)?)', content, re.IGNORECASE)
+ if score_match:
+ score = float(score_match.group(1))
+ else:
+ score_match = re.search(r'(?:score|rating|quality)[:\s]+(\d+(?:\.\d+)?)', content, re.IGNORECASE)
+ if score_match:
+ score = float(score_match.group(1))
+
+ needs_improvement = False
+ if "NEEDS_IMPROVEMENT" in content.upper():
+ needs_improvement = True
+ elif score < threshold:
+ needs_improvement = True
+
+ self._log(f"✓ Review complete (Score: {score}/10, Threshold: {threshold}/10)")
+
+ return (content if content else "Image generated successfully", score, needs_improvement)
+ except Exception as e:
+ self._log(f"Review skipped: {str(e)}")
+ return "Image generated successfully (review skipped)", 7.0, False
+
+ def improve_prompt(self, original_prompt: str, critique: str,
+ iteration: int, visual_only: bool = False) -> str:
+ """Improve the generation prompt based on critique."""
+ guidelines = self.VISUAL_ONLY_GUIDELINES if visual_only else self.FULL_SLIDE_GUIDELINES
+
+ return f"""{guidelines}
+
+USER REQUEST: {original_prompt}
+
+ITERATION {iteration}: Based on previous feedback, address these specific improvements:
+{critique}
+
+Generate an improved version that addresses all the critique points."""
+
+ def generate_slide(self, user_prompt: str, output_path: str,
+ visual_only: bool = False,
+ iterations: int = 2,
+ attachments: Optional[List[str]] = None) -> Dict[str, Any]:
+ """
+ Generate a slide image or visual with iterative refinement.
+
+ Args:
+ user_prompt: Description of the slide/visual to generate
+ output_path: Path to save final image
+ visual_only: If True, generate just the visual (for PPT workflow)
+ iterations: Maximum refinement iterations (default: 2)
+ attachments: Optional list of image file paths to attach as context
+
+ Returns:
+ Dictionary with generation results and metadata
+ """
+ output_path = Path(output_path)
+ output_dir = output_path.parent
+ output_dir.mkdir(parents=True, exist_ok=True)
+
+ base_name = output_path.stem
+ extension = output_path.suffix or ".png"
+
+ mode = "visual_only" if visual_only else "full_slide"
+ guidelines = self.VISUAL_ONLY_GUIDELINES if visual_only else self.FULL_SLIDE_GUIDELINES
+
+ results = {
+ "user_prompt": user_prompt,
+ "mode": mode,
+ "quality_threshold": self.QUALITY_THRESHOLD,
+ "attachments": attachments or [],
+ "iterations": [],
+ "final_image": None,
+ "final_score": 0.0,
+ "success": False,
+ "early_stop": False
+ }
+
+ current_prompt = f"""{guidelines}
+
+USER REQUEST: {user_prompt}
+
+Generate a high-quality {'visual/figure' if visual_only else 'presentation slide'} that meets all the guidelines above."""
+
+ print(f"\n{'='*60}")
+ print(f"Generating Slide {'Visual' if visual_only else 'Image'}")
+ print(f"{'='*60}")
+ print(f"Description: {user_prompt[:100]}{'...' if len(user_prompt) > 100 else ''}")
+ print(f"Mode: {mode}")
+ if attachments:
+ print(f"Attachments: {len(attachments)} image(s)")
+ for att in attachments:
+ print(f" - {att}")
+ print(f"Quality Threshold: {self.QUALITY_THRESHOLD}/10")
+ print(f"Max Iterations: {iterations}")
+ print(f"Output: {output_path}")
+ print(f"{'='*60}\n")
+
+ # Track temporary files for cleanup
+ temp_files = []
+ final_image_data = None
+
+ for i in range(1, iterations + 1):
+ print(f"\n[Iteration {i}/{iterations}]")
+ print("-" * 40)
+
+ print(f"Generating image with Nano Banana Pro...")
+ image_data = self.generate_image(current_prompt, attachments=attachments)
+
+ if not image_data:
+ error_msg = self._last_error or 'Image generation failed'
+ print(f"✗ Generation failed: {error_msg}")
+ results["iterations"].append({
+ "iteration": i,
+ "success": False,
+ "error": error_msg
+ })
+ continue
+
+ # Save to temporary file for review (will be cleaned up)
+ import tempfile
+ temp_fd, temp_path = tempfile.mkstemp(suffix=extension)
+ os.close(temp_fd)
+ temp_path = Path(temp_path)
+ temp_files.append(temp_path)
+
+ with open(temp_path, "wb") as f:
+ f.write(image_data)
+ print(f"✓ Generated image (iteration {i})")
+
+ print(f"Reviewing image with Gemini 3 Pro...")
+ critique, score, needs_improvement = self.review_image(
+ str(temp_path), user_prompt, i, visual_only, iterations
+ )
+ print(f"✓ Score: {score}/10 (threshold: {self.QUALITY_THRESHOLD}/10)")
+
+ results["iterations"].append({
+ "iteration": i,
+ "critique": critique,
+ "score": score,
+ "needs_improvement": needs_improvement,
+ "success": True
+ })
+
+ if not needs_improvement:
+ print(f"\n✓ Quality meets threshold ({score} >= {self.QUALITY_THRESHOLD})")
+ final_image_data = image_data
+ results["final_score"] = score
+ results["success"] = True
+ results["early_stop"] = True
+ break
+
+ if i == iterations:
+ print(f"\n⚠ Maximum iterations reached")
+ final_image_data = image_data
+ results["final_score"] = score
+ results["success"] = True
+ break
+
+ print(f"\n⚠ Quality below threshold ({score} < {self.QUALITY_THRESHOLD})")
+ print(f"Improving prompt...")
+ current_prompt = self.improve_prompt(user_prompt, critique, i + 1, visual_only)
+
+ # Clean up temporary files
+ for temp_file in temp_files:
+ try:
+ if temp_file.exists():
+ temp_file.unlink()
+ except Exception:
+ pass
+
+ # Save only the final image to output path
+ if results["success"] and final_image_data:
+ with open(output_path, "wb") as f:
+ f.write(final_image_data)
+ results["final_image"] = str(output_path)
+ print(f"\n✓ Final image: {output_path}")
+
+ print(f"\n{'='*60}")
+ print(f"Generation Complete!")
+ print(f"Final Score: {results['final_score']}/10")
+ if results["early_stop"]:
+ success_count = len([r for r in results['iterations'] if r.get('success')])
+ print(f"Iterations Used: {success_count}/{iterations} (early stop)")
+ print(f"{'='*60}\n")
+
+ return results
+
+
+def main():
+ """Command-line interface."""
+ parser = argparse.ArgumentParser(
+ description="Generate presentation slides or visuals using Nano Banana Pro AI",
+ formatter_class=argparse.RawDescriptionHelpFormatter,
+ epilog="""
+Examples:
+ # Generate a full slide (for PDF workflow)
+ python generate_slide_image_ai.py "Title: Machine Learning Basics\\nKey points: supervised learning, neural networks, deep learning" -o slide_01.png
+
+ # Generate just a visual/figure (for PPT workflow)
+ python generate_slide_image_ai.py "Neural network architecture diagram with input, hidden, and output layers" -o figure.png --visual-only
+
+ # With reference images attached (Nano Banana Pro will see these)
+ python generate_slide_image_ai.py "Create a slide explaining this chart with key insights" -o slide.png --attach chart.png
+ python generate_slide_image_ai.py "Combine these images into a comparison slide" -o compare.png --attach before.png --attach after.png
+
+ # With custom iterations
+ python generate_slide_image_ai.py "Title slide for AI Conference 2025" -o title.png --iterations 2
+
+ # Verbose output
+ python generate_slide_image_ai.py "Data flow diagram" -o flow.png -v
+
+Environment:
+ OPENROUTER_API_KEY OpenRouter API key (required)
+ """
+ )
+
+ parser.add_argument("prompt", help="Description of the slide or visual to generate")
+ parser.add_argument("-o", "--output", required=True, help="Output image path")
+ parser.add_argument("--attach", action="append", dest="attachments", metavar="IMAGE",
+ help="Attach image file(s) as context for generation (can use multiple times)")
+ parser.add_argument("--visual-only", action="store_true",
+ help="Generate just the visual/figure (for PPT workflow)")
+ parser.add_argument("--iterations", type=int, default=2,
+ help="Maximum refinement iterations (default: 2)")
+ parser.add_argument("--api-key", help="OpenRouter API key (or set OPENROUTER_API_KEY)")
+ parser.add_argument("-v", "--verbose", action="store_true", help="Verbose output")
+
+ args = parser.parse_args()
+
+ api_key = args.api_key or os.getenv("OPENROUTER_API_KEY")
+ if not api_key:
+ print("Error: OPENROUTER_API_KEY environment variable not set")
+ print("\nSet it with:")
+ print(" export OPENROUTER_API_KEY='your_api_key'")
+ sys.exit(1)
+
+ if args.iterations < 1 or args.iterations > 2:
+ print("Error: Iterations must be between 1 and 2")
+ sys.exit(1)
+
+ # Validate attachments exist
+ if args.attachments:
+ for att in args.attachments:
+ if not Path(att).exists():
+ print(f"Error: Attachment file not found: {att}")
+ sys.exit(1)
+
+ try:
+ generator = SlideImageGenerator(api_key=api_key, verbose=args.verbose)
+ results = generator.generate_slide(
+ user_prompt=args.prompt,
+ output_path=args.output,
+ visual_only=args.visual_only,
+ iterations=args.iterations,
+ attachments=args.attachments
+ )
+
+ if results["success"]:
+ print(f"\n✓ Success! Image saved to: {args.output}")
+ sys.exit(0)
+ else:
+ print(f"\n✗ Generation failed. Check review log for details.")
+ sys.exit(1)
+ except Exception as e:
+ print(f"\n✗ Error: {str(e)}")
+ sys.exit(1)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/scientific-skills/scientific-slides/scripts/pdf_to_images.py b/scientific-skills/scientific-slides/scripts/pdf_to_images.py
new file mode 100644
index 0000000..0bc3234
--- /dev/null
+++ b/scientific-skills/scientific-slides/scripts/pdf_to_images.py
@@ -0,0 +1,221 @@
+#!/usr/bin/env python3
+"""
+PDF to Images Converter for Presentations
+
+Converts presentation PDFs to images for visual inspection and review.
+Supports multiple output formats and resolutions.
+
+Uses PyMuPDF (fitz) as the primary conversion method - no external
+dependencies required (no poppler, ghostscript, or ImageMagick needed).
+"""
+
+import sys
+import argparse
+from pathlib import Path
+from typing import Optional, List
+
+# Try to import pymupdf (preferred - no external dependencies)
+try:
+ import fitz # PyMuPDF
+ HAS_PYMUPDF = True
+except ImportError:
+ HAS_PYMUPDF = False
+
+
+class PDFToImagesConverter:
+ """Converts PDF presentations to images."""
+
+ def __init__(
+ self,
+ pdf_path: str,
+ output_prefix: str,
+ dpi: int = 150,
+ format: str = 'jpg',
+ first_page: Optional[int] = None,
+ last_page: Optional[int] = None
+ ):
+ self.pdf_path = Path(pdf_path)
+ self.output_prefix = output_prefix
+ self.dpi = dpi
+ self.format = format.lower()
+ self.first_page = first_page
+ self.last_page = last_page
+
+ # Validate format
+ if self.format not in ['jpg', 'jpeg', 'png']:
+ raise ValueError(f"Unsupported format: {format}. Use jpg or png.")
+
+ def convert(self) -> List[Path]:
+ """Convert PDF to images using PyMuPDF."""
+ if not self.pdf_path.exists():
+ raise FileNotFoundError(f"PDF not found: {self.pdf_path}")
+
+ print(f"Converting: {self.pdf_path.name}")
+ print(f"Output prefix: {self.output_prefix}")
+ print(f"DPI: {self.dpi}")
+ print(f"Format: {self.format}")
+
+ if HAS_PYMUPDF:
+ return self._convert_with_pymupdf()
+ else:
+ raise RuntimeError(
+ "PyMuPDF not installed. Install it with:\n"
+ " pip install pymupdf\n\n"
+ "PyMuPDF is a self-contained library - no external dependencies needed."
+ )
+
+ def _convert_with_pymupdf(self) -> List[Path]:
+ """Convert using PyMuPDF library (no external dependencies)."""
+ print("Using PyMuPDF (no external dependencies required)...")
+
+ # Open the PDF
+ doc = fitz.open(self.pdf_path)
+
+ # Determine page range
+ start_page = (self.first_page - 1) if self.first_page else 0
+ end_page = self.last_page if self.last_page else doc.page_count
+
+ # Calculate zoom factor from DPI (72 DPI is the base)
+ zoom = self.dpi / 72
+ matrix = fitz.Matrix(zoom, zoom)
+
+ output_files = []
+ output_dir = Path(self.output_prefix).parent
+ output_dir.mkdir(parents=True, exist_ok=True)
+
+ for page_num in range(start_page, end_page):
+ page = doc[page_num]
+
+ # Render page to pixmap
+ pixmap = page.get_pixmap(matrix=matrix)
+
+ # Determine output path
+ output_path = Path(f"{self.output_prefix}-{page_num + 1:03d}.{self.format}")
+
+ # Save the image
+ if self.format in ['jpg', 'jpeg']:
+ pixmap.save(str(output_path), output="jpeg")
+ else:
+ pixmap.save(str(output_path), output="png")
+
+ output_files.append(output_path)
+ print(f" Created: {output_path.name}")
+
+ doc.close()
+ return output_files
+
+
+def main():
+ parser = argparse.ArgumentParser(
+ description='Convert presentation PDFs to images',
+ formatter_class=argparse.RawDescriptionHelpFormatter,
+ epilog="""
+Examples:
+ %(prog)s presentation.pdf slides
+ → Creates slides-001.jpg, slides-002.jpg, ...
+
+ %(prog)s presentation.pdf output/slide --dpi 300 --format png
+ → Creates output/slide-001.png, slide-002.png, ... at high resolution
+
+ %(prog)s presentation.pdf review/s --first 5 --last 10
+ → Converts only slides 5-10
+
+Output:
+ Images are named: PREFIX-001.FORMAT, PREFIX-002.FORMAT, etc.
+
+Resolution:
+ - 150 DPI: Good for screen review (default)
+ - 200 DPI: Higher quality for detailed inspection
+ - 300 DPI: Print quality (larger files)
+
+Requirements:
+ Install PyMuPDF (no external dependencies needed):
+ pip install pymupdf
+ """
+ )
+
+ parser.add_argument(
+ 'pdf_path',
+ help='Path to PDF presentation'
+ )
+
+ parser.add_argument(
+ 'output_prefix',
+ help='Output filename prefix (e.g., "slides" or "output/slide")'
+ )
+
+ parser.add_argument(
+ '--dpi', '-r',
+ type=int,
+ default=150,
+ help='Resolution in DPI (default: 150)'
+ )
+
+ parser.add_argument(
+ '--format', '-f',
+ choices=['jpg', 'jpeg', 'png'],
+ default='jpg',
+ help='Output format (default: jpg)'
+ )
+
+ parser.add_argument(
+ '--first',
+ type=int,
+ help='First page to convert (1-indexed)'
+ )
+
+ parser.add_argument(
+ '--last',
+ type=int,
+ help='Last page to convert (1-indexed)'
+ )
+
+ args = parser.parse_args()
+
+ # Create output directory if needed
+ output_dir = Path(args.output_prefix).parent
+ if output_dir != Path('.'):
+ output_dir.mkdir(parents=True, exist_ok=True)
+
+ # Convert
+ try:
+ converter = PDFToImagesConverter(
+ pdf_path=args.pdf_path,
+ output_prefix=args.output_prefix,
+ dpi=args.dpi,
+ format=args.format,
+ first_page=args.first,
+ last_page=args.last
+ )
+
+ output_files = converter.convert()
+
+ print()
+ print("=" * 60)
+ print(f"✅ Success! Created {len(output_files)} image(s)")
+ print("=" * 60)
+
+ if output_files:
+ print(f"\nFirst image: {output_files[0]}")
+ print(f"Last image: {output_files[-1]}")
+
+ # Calculate total size
+ total_size = sum(f.stat().st_size for f in output_files)
+ size_mb = total_size / (1024 * 1024)
+ print(f"Total size: {size_mb:.2f} MB")
+
+ print("\nNext steps:")
+ print(" 1. Review images for layout issues")
+ print(" 2. Check for text overflow or element overlap")
+ print(" 3. Verify readability from distance")
+ print(" 4. Document issues with slide numbers")
+
+ sys.exit(0)
+
+ except Exception as e:
+ print(f"\n❌ Error: {str(e)}", file=sys.stderr)
+ sys.exit(1)
+
+
+if __name__ == '__main__':
+ main()
diff --git a/scientific-skills/scientific-slides/scripts/slides_to_pdf.py b/scientific-skills/scientific-slides/scripts/slides_to_pdf.py
new file mode 100644
index 0000000..550a828
--- /dev/null
+++ b/scientific-skills/scientific-slides/scripts/slides_to_pdf.py
@@ -0,0 +1,235 @@
+#!/usr/bin/env python3
+"""
+Combine slide images into a single PDF presentation.
+
+This script takes multiple slide images (PNG, JPG) and combines them
+into a single PDF file, maintaining aspect ratio and quality.
+
+Usage:
+ # Combine all PNG files in a directory
+ python slides_to_pdf.py slides/*.png -o presentation.pdf
+
+ # Combine specific files in order
+ python slides_to_pdf.py slide_01.png slide_02.png slide_03.png -o presentation.pdf
+
+ # From a directory (sorted by filename)
+ python slides_to_pdf.py slides/ -o presentation.pdf
+"""
+
+import argparse
+import sys
+from pathlib import Path
+from typing import List
+
+try:
+ from PIL import Image
+except ImportError:
+ print("Error: Pillow library not found. Install with: pip install Pillow")
+ sys.exit(1)
+
+
+def get_image_files(paths: List[str]) -> List[Path]:
+ """
+ Get list of image files from paths (files or directories).
+
+ Args:
+ paths: List of file paths or directory paths
+
+ Returns:
+ Sorted list of image file paths
+ """
+ image_extensions = {'.png', '.jpg', '.jpeg', '.gif', '.webp', '.bmp'}
+ image_files = []
+
+ for path_str in paths:
+ path = Path(path_str)
+
+ if path.is_file():
+ if path.suffix.lower() in image_extensions:
+ image_files.append(path)
+ else:
+ print(f"Warning: Skipping non-image file: {path}")
+ elif path.is_dir():
+ # Get all images in directory
+ for ext in image_extensions:
+ image_files.extend(path.glob(f"*{ext}"))
+ image_files.extend(path.glob(f"*{ext.upper()}"))
+ else:
+ # Try glob pattern
+ parent = path.parent
+ pattern = path.name
+ if parent.exists():
+ matches = list(parent.glob(pattern))
+ for match in matches:
+ if match.suffix.lower() in image_extensions:
+ image_files.append(match)
+
+ # Remove duplicates and sort
+ image_files = list(set(image_files))
+ image_files.sort(key=lambda x: x.name)
+
+ return image_files
+
+
+def combine_images_to_pdf(image_paths: List[Path], output_path: Path,
+ dpi: int = 150, verbose: bool = False) -> bool:
+ """
+ Combine multiple images into a single PDF.
+
+ Args:
+ image_paths: List of image file paths
+ output_path: Output PDF path
+ dpi: Resolution for the PDF (default: 150)
+ verbose: Print progress information
+
+ Returns:
+ True if successful, False otherwise
+ """
+ if not image_paths:
+ print("Error: No image files found")
+ return False
+
+ if verbose:
+ print(f"Combining {len(image_paths)} images into PDF...")
+
+ # Load all images
+ images = []
+ for i, img_path in enumerate(image_paths):
+ try:
+ img = Image.open(img_path)
+ # Convert to RGB if necessary (PDF doesn't support RGBA)
+ if img.mode in ('RGBA', 'P'):
+ # Create white background
+ background = Image.new('RGB', img.size, (255, 255, 255))
+ if img.mode == 'P':
+ img = img.convert('RGBA')
+ background.paste(img, mask=img.split()[-1] if img.mode == 'RGBA' else None)
+ img = background
+ elif img.mode != 'RGB':
+ img = img.convert('RGB')
+
+ images.append(img)
+
+ if verbose:
+ print(f" [{i+1}/{len(image_paths)}] Loaded: {img_path.name} ({img.size[0]}x{img.size[1]})")
+ except Exception as e:
+ print(f"Error loading {img_path}: {e}")
+ return False
+
+ if not images:
+ print("Error: No images could be loaded")
+ return False
+
+ # Create output directory if needed
+ output_path.parent.mkdir(parents=True, exist_ok=True)
+
+ # Save as PDF
+ try:
+ # First image
+ first_image = images[0]
+
+ # Remaining images (if any)
+ remaining_images = images[1:] if len(images) > 1 else []
+
+ # Save to PDF
+ first_image.save(
+ output_path,
+ "PDF",
+ resolution=dpi,
+ save_all=True,
+ append_images=remaining_images
+ )
+
+ if verbose:
+ print(f"\n✓ PDF created: {output_path}")
+ print(f" Total slides: {len(images)}")
+ file_size = output_path.stat().st_size
+ if file_size > 1024 * 1024:
+ print(f" File size: {file_size / (1024 * 1024):.1f} MB")
+ else:
+ print(f" File size: {file_size / 1024:.1f} KB")
+
+ return True
+ except Exception as e:
+ print(f"Error creating PDF: {e}")
+ return False
+ finally:
+ # Close all images
+ for img in images:
+ img.close()
+
+
+def main():
+ """Command-line interface."""
+ parser = argparse.ArgumentParser(
+ description="Combine slide images into a single PDF presentation",
+ formatter_class=argparse.RawDescriptionHelpFormatter,
+ epilog="""
+Examples:
+ # Combine PNG files using glob pattern
+ python slides_to_pdf.py slides/*.png -o presentation.pdf
+
+ # Combine specific files in order
+ python slides_to_pdf.py title.png intro.png methods.png results.png -o talk.pdf
+
+ # Combine all images from a directory (sorted by filename)
+ python slides_to_pdf.py slides/ -o presentation.pdf
+
+ # With custom DPI and verbose output
+ python slides_to_pdf.py slides/*.png -o presentation.pdf --dpi 200 -v
+
+Supported formats: PNG, JPG, JPEG, GIF, WEBP, BMP
+
+Tips:
+ - Name your slide images with numbers for correct ordering:
+ 01_title.png, 02_intro.png, 03_methods.png, etc.
+ - Use the generate_slide_image.py script to create slides first
+ - Standard presentation aspect ratio is 16:9 (1920x1080 or 1280x720)
+ """
+ )
+
+ parser.add_argument("images", nargs="+",
+ help="Image files, directories, or glob patterns")
+ parser.add_argument("-o", "--output", required=True,
+ help="Output PDF file path")
+ parser.add_argument("--dpi", type=int, default=150,
+ help="PDF resolution in DPI (default: 150)")
+ parser.add_argument("-v", "--verbose", action="store_true",
+ help="Verbose output")
+
+ args = parser.parse_args()
+
+ # Get image files
+ image_files = get_image_files(args.images)
+
+ if not image_files:
+ print("Error: No image files found matching the specified paths")
+ print("\nUsage examples:")
+ print(" python slides_to_pdf.py slides/*.png -o presentation.pdf")
+ print(" python slides_to_pdf.py slide1.png slide2.png -o presentation.pdf")
+ sys.exit(1)
+
+ print(f"Found {len(image_files)} image(s)")
+ if args.verbose:
+ for f in image_files:
+ print(f" - {f}")
+
+ # Combine into PDF
+ output_path = Path(args.output)
+ success = combine_images_to_pdf(
+ image_files,
+ output_path,
+ dpi=args.dpi,
+ verbose=args.verbose
+ )
+
+ if success:
+ print(f"\n✓ PDF created: {output_path}")
+ sys.exit(0)
+ else:
+ print(f"\n✗ Failed to create PDF")
+ sys.exit(1)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/scientific-skills/scientific-slides/scripts/validate_presentation.py b/scientific-skills/scientific-slides/scripts/validate_presentation.py
new file mode 100644
index 0000000..4142ca1
--- /dev/null
+++ b/scientific-skills/scientific-slides/scripts/validate_presentation.py
@@ -0,0 +1,403 @@
+#!/usr/bin/env python3
+"""
+Presentation Validation Script
+
+Validates scientific presentations for common issues:
+- Slide count vs. duration
+- LaTeX compilation
+- File size checks
+- Basic format validation
+"""
+
+import sys
+import os
+import argparse
+import subprocess
+from pathlib import Path
+from typing import Dict, List, Tuple, Optional
+
+# Try to import PyPDF2 for PDF analysis
+try:
+ import PyPDF2
+ HAS_PYPDF2 = True
+except ImportError:
+ HAS_PYPDF2 = False
+
+# Try to import python-pptx for PowerPoint analysis
+try:
+ from pptx import Presentation
+ HAS_PPTX = True
+except ImportError:
+ HAS_PPTX = False
+
+
+class PresentationValidator:
+ """Validates presentations for common issues."""
+
+ # Recommended slide counts by duration (min, recommended, max)
+ SLIDE_GUIDELINES = {
+ 5: (5, 6, 8),
+ 10: (8, 11, 14),
+ 15: (13, 16, 20),
+ 20: (18, 22, 26),
+ 30: (22, 27, 33),
+ 45: (32, 40, 50),
+ 60: (40, 52, 65),
+ }
+
+ def __init__(self, filepath: str, duration: Optional[int] = None):
+ self.filepath = Path(filepath)
+ self.duration = duration
+ self.file_type = self.filepath.suffix.lower()
+ self.issues = []
+ self.warnings = []
+ self.info = []
+
+ def validate(self) -> Dict:
+ """Run all validations and return results."""
+ print(f"Validating: {self.filepath.name}")
+ print(f"File type: {self.file_type}")
+ print("=" * 60)
+
+ # Check file exists
+ if not self.filepath.exists():
+ self.issues.append(f"File not found: {self.filepath}")
+ return self._format_results()
+
+ # File size check
+ self._check_file_size()
+
+ # Type-specific validation
+ if self.file_type == '.pdf':
+ self._validate_pdf()
+ elif self.file_type in ['.pptx', '.ppt']:
+ self._validate_pptx()
+ elif self.file_type in ['.tex']:
+ self._validate_latex()
+ else:
+ self.warnings.append(f"Unknown file type: {self.file_type}")
+
+ return self._format_results()
+
+ def _check_file_size(self):
+ """Check if file size is reasonable."""
+ size_mb = self.filepath.stat().st_size / (1024 * 1024)
+ self.info.append(f"File size: {size_mb:.2f} MB")
+
+ if size_mb > 100:
+ self.issues.append(
+ f"File is very large ({size_mb:.1f} MB). "
+ "Consider compressing images."
+ )
+ elif size_mb > 50:
+ self.warnings.append(
+ f"File is large ({size_mb:.1f} MB). "
+ "May be slow to email or upload."
+ )
+
+ def _validate_pdf(self):
+ """Validate PDF presentation."""
+ if not HAS_PYPDF2:
+ self.warnings.append(
+ "PyPDF2 not installed. Install with: pip install PyPDF2"
+ )
+ return
+
+ try:
+ with open(self.filepath, 'rb') as f:
+ reader = PyPDF2.PdfReader(f)
+ num_pages = len(reader.pages)
+
+ self.info.append(f"Number of slides: {num_pages}")
+
+ # Check slide count against duration
+ if self.duration:
+ self._check_slide_count(num_pages)
+
+ # Get page size
+ first_page = reader.pages[0]
+ media_box = first_page.mediabox
+ width = float(media_box.width)
+ height = float(media_box.height)
+
+ # Convert points to inches (72 points = 1 inch)
+ width_in = width / 72
+ height_in = height / 72
+ aspect = width / height
+
+ self.info.append(
+ f"Slide dimensions: {width_in:.1f}\" × {height_in:.1f}\" "
+ f"(aspect ratio: {aspect:.2f})"
+ )
+
+ # Check common aspect ratios
+ if abs(aspect - 16/9) < 0.01:
+ self.info.append("Aspect ratio: 16:9 (widescreen)")
+ elif abs(aspect - 4/3) < 0.01:
+ self.info.append("Aspect ratio: 4:3 (standard)")
+ else:
+ self.warnings.append(
+ f"Unusual aspect ratio: {aspect:.2f}. "
+ "Confirm this matches venue requirements."
+ )
+
+ except Exception as e:
+ self.issues.append(f"Error reading PDF: {str(e)}")
+
+ def _validate_pptx(self):
+ """Validate PowerPoint presentation."""
+ if not HAS_PPTX:
+ self.warnings.append(
+ "python-pptx not installed. Install with: pip install python-pptx"
+ )
+ return
+
+ try:
+ prs = Presentation(self.filepath)
+ num_slides = len(prs.slides)
+
+ self.info.append(f"Number of slides: {num_slides}")
+
+ # Check slide count against duration
+ if self.duration:
+ self._check_slide_count(num_slides)
+
+ # Get slide dimensions
+ width_inches = prs.slide_width / 914400 # EMU to inches
+ height_inches = prs.slide_height / 914400
+ aspect = prs.slide_width / prs.slide_height
+
+ self.info.append(
+ f"Slide dimensions: {width_inches:.1f}\" × {height_inches:.1f}\" "
+ f"(aspect ratio: {aspect:.2f})"
+ )
+
+ # Check fonts and text
+ self._check_pptx_content(prs)
+
+ except Exception as e:
+ self.issues.append(f"Error reading PowerPoint: {str(e)}")
+
+ def _check_pptx_content(self, prs):
+ """Check PowerPoint content for common issues."""
+ small_text_slides = []
+ many_bullets_slides = []
+
+ for idx, slide in enumerate(prs.slides, start=1):
+ for shape in slide.shapes:
+ if not shape.has_text_frame:
+ continue
+
+ text_frame = shape.text_frame
+
+ # Check for small fonts
+ for paragraph in text_frame.paragraphs:
+ for run in paragraph.runs:
+ if run.font.size and run.font.size.pt < 18:
+ small_text_slides.append(idx)
+ break
+
+ # Check for too many bullets
+ bullet_count = sum(1 for p in text_frame.paragraphs if p.level == 0)
+ if bullet_count > 6:
+ many_bullets_slides.append(idx)
+
+ # Report issues
+ if small_text_slides:
+ unique_slides = sorted(set(small_text_slides))
+ self.warnings.append(
+ f"Small text (<18pt) found on slides: {unique_slides[:5]}"
+ + (" ..." if len(unique_slides) > 5 else "")
+ )
+
+ if many_bullets_slides:
+ unique_slides = sorted(set(many_bullets_slides))
+ self.warnings.append(
+ f"Many bullets (>6) on slides: {unique_slides[:5]}"
+ + (" ..." if len(unique_slides) > 5 else "")
+ )
+
+ def _validate_latex(self):
+ """Validate LaTeX Beamer presentation."""
+ self.info.append("LaTeX source file detected")
+
+ # Try to compile
+ if self._try_compile_latex():
+ self.info.append("LaTeX compilation: SUCCESS")
+
+ # If PDF was generated, validate it
+ pdf_path = self.filepath.with_suffix('.pdf')
+ if pdf_path.exists():
+ pdf_validator = PresentationValidator(str(pdf_path), self.duration)
+ pdf_results = pdf_validator.validate()
+
+ # Merge results
+ self.info.extend(pdf_results['info'])
+ self.warnings.extend(pdf_results['warnings'])
+ self.issues.extend(pdf_results['issues'])
+ else:
+ self.issues.append(
+ "LaTeX compilation failed. Check .log file for errors."
+ )
+
+ def _try_compile_latex(self) -> bool:
+ """Try to compile LaTeX file."""
+ try:
+ # Try pdflatex
+ result = subprocess.run(
+ ['pdflatex', '-interaction=nonstopmode', self.filepath.name],
+ cwd=self.filepath.parent,
+ capture_output=True,
+ timeout=60
+ )
+ return result.returncode == 0
+ except (subprocess.TimeoutExpired, FileNotFoundError):
+ return False
+
+ def _check_slide_count(self, num_slides: int):
+ """Check if slide count is appropriate for duration."""
+ if self.duration not in self.SLIDE_GUIDELINES:
+ # Find nearest duration
+ durations = sorted(self.SLIDE_GUIDELINES.keys())
+ nearest = min(durations, key=lambda x: abs(x - self.duration))
+ min_slides, rec_slides, max_slides = self.SLIDE_GUIDELINES[nearest]
+ self.info.append(
+ f"Using guidelines for {nearest}-minute talk "
+ f"(closest to {self.duration} minutes)"
+ )
+ else:
+ min_slides, rec_slides, max_slides = self.SLIDE_GUIDELINES[self.duration]
+
+ self.info.append(
+ f"Recommended slides for {self.duration}-minute talk: "
+ f"{min_slides}-{max_slides} (optimal: ~{rec_slides})"
+ )
+
+ if num_slides < min_slides:
+ self.warnings.append(
+ f"Fewer slides ({num_slides}) than recommended ({min_slides}-{max_slides}). "
+ "May have too much time or too little content."
+ )
+ elif num_slides > max_slides:
+ self.warnings.append(
+ f"More slides ({num_slides}) than recommended ({min_slides}-{max_slides}). "
+ "Likely to run over time."
+ )
+ else:
+ self.info.append(
+ f"Slide count ({num_slides}) is within recommended range."
+ )
+
+ def _format_results(self) -> Dict:
+ """Format validation results."""
+ return {
+ 'filepath': str(self.filepath),
+ 'file_type': self.file_type,
+ 'info': self.info,
+ 'warnings': self.warnings,
+ 'issues': self.issues,
+ 'valid': len(self.issues) == 0
+ }
+
+
+def print_results(results: Dict):
+ """Print validation results in a readable format."""
+ print()
+ print("=" * 60)
+ print("VALIDATION RESULTS")
+ print("=" * 60)
+
+ # Print info
+ if results['info']:
+ print("\n📋 Information:")
+ for item in results['info']:
+ print(f" • {item}")
+
+ # Print warnings
+ if results['warnings']:
+ print("\n⚠️ Warnings:")
+ for item in results['warnings']:
+ print(f" • {item}")
+
+ # Print issues
+ if results['issues']:
+ print("\n❌ Issues:")
+ for item in results['issues']:
+ print(f" • {item}")
+
+ # Overall status
+ print("\n" + "=" * 60)
+ if results['valid']:
+ print("✅ Validation PASSED")
+ if results['warnings']:
+ print(f" ({len(results['warnings'])} warning(s) found)")
+ else:
+ print("❌ Validation FAILED")
+ print(f" ({len(results['issues'])} issue(s) found)")
+ print("=" * 60)
+
+
+def main():
+ parser = argparse.ArgumentParser(
+ description='Validate scientific presentations',
+ formatter_class=argparse.RawDescriptionHelpFormatter,
+ epilog="""
+Examples:
+ %(prog)s presentation.pdf --duration 15
+ %(prog)s slides.pptx --duration 45
+ %(prog)s beamer_talk.tex --duration 20
+
+Supported file types:
+ - PDF (.pdf)
+ - PowerPoint (.pptx, .ppt)
+ - LaTeX Beamer (.tex)
+
+Validation checks:
+ - Slide count vs. duration
+ - File size
+ - Slide dimensions
+ - Font sizes (PowerPoint)
+ - LaTeX compilation (Beamer)
+ """
+ )
+
+ parser.add_argument(
+ 'filepath',
+ help='Path to presentation file (PDF, PPTX, or TEX)'
+ )
+
+ parser.add_argument(
+ '--duration', '-d',
+ type=int,
+ help='Presentation duration in minutes'
+ )
+
+ parser.add_argument(
+ '--quiet', '-q',
+ action='store_true',
+ help='Only show issues and warnings'
+ )
+
+ args = parser.parse_args()
+
+ # Validate
+ validator = PresentationValidator(args.filepath, args.duration)
+ results = validator.validate()
+
+ # Print results
+ if args.quiet:
+ # Only show warnings and issues
+ if results['warnings'] or results['issues']:
+ print_results(results)
+ else:
+ print("✅ No issues found")
+ else:
+ print_results(results)
+
+ # Exit with appropriate code
+ sys.exit(0 if results['valid'] else 1)
+
+
+if __name__ == '__main__':
+ main()
+
diff --git a/scientific-skills/scientific-writing/SKILL.md b/scientific-skills/scientific-writing/SKILL.md
new file mode 100644
index 0000000..16fc9d2
--- /dev/null
+++ b/scientific-skills/scientific-writing/SKILL.md
@@ -0,0 +1,483 @@
+---
+name: scientific-writing
+description: "Core skill for the deep research and writing tool. Write scientific manuscripts in full paragraphs (never bullet points). Use two-stage process: (1) create section outlines with key points using research-lookup, (2) convert to flowing prose. IMRAD structure, citations (APA/AMA/Vancouver), figures/tables, reporting guidelines (CONSORT/STROBE/PRISMA), for research papers and journal submissions."
+allowed-tools: [Read, Write, Edit, Bash]
+---
+
+# Scientific Writing
+
+## Overview
+
+**This is the core skill for the deep research and writing tool**—combining AI-driven deep research with well-formatted written outputs. Every document produced is backed by comprehensive literature search and verified citations through the research-lookup skill.
+
+Scientific writing is a process for communicating research with precision and clarity. Write manuscripts using IMRAD structure, citations (APA/AMA/Vancouver), figures/tables, and reporting guidelines (CONSORT/STROBE/PRISMA). Apply this skill for research papers and journal submissions.
+
+**Critical Principle: Always write in full paragraphs with flowing prose. Never submit bullet points in the final manuscript.** Use a two-stage process: first create section outlines with key points using research-lookup, then convert those outlines into complete paragraphs.
+
+## When to Use This Skill
+
+This skill should be used when:
+- Writing or revising any section of a scientific manuscript (abstract, introduction, methods, results, discussion)
+- Structuring a research paper using IMRAD or other standard formats
+- Formatting citations and references in specific styles (APA, AMA, Vancouver, Chicago, IEEE)
+- Creating, formatting, or improving figures, tables, and data visualizations
+- Applying study-specific reporting guidelines (CONSORT for trials, STROBE for observational studies, PRISMA for reviews)
+- Drafting abstracts that meet journal requirements (structured or unstructured)
+- Preparing manuscripts for submission to specific journals
+- Improving writing clarity, conciseness, and precision
+- Ensuring proper use of field-specific terminology and nomenclature
+- Addressing reviewer comments and revising manuscripts
+
+## Visual Enhancement with Scientific Schematics
+
+**⚠️ MANDATORY: Every scientific paper MUST include at least 1-2 AI-generated figures using the scientific-schematics skill.**
+
+This is not optional. Scientific papers without visual elements are incomplete. Before finalizing any document:
+1. Generate at minimum ONE schematic or diagram using scientific-schematics
+2. Prefer 2-3 figures for comprehensive papers (methods flowchart, results visualization, conceptual diagram)
+
+**How to generate figures:**
+- Use the **scientific-schematics** skill to generate AI-powered publication-quality diagrams
+- Simply describe your desired diagram in natural language
+- Nano Banana Pro will automatically generate, review, and refine the schematic
+
+**How to generate schematics:**
+```bash
+python scripts/generate_schematic.py "your diagram description" -o figures/output.png
+```
+
+The AI will automatically:
+- Create publication-quality images with proper formatting
+- Review and refine through multiple iterations
+- Ensure accessibility (colorblind-friendly, high contrast)
+- Save outputs in the figures/ directory
+
+**When to add schematics:**
+- Study design and methodology flowcharts (CONSORT, PRISMA, STROBE)
+- Conceptual framework diagrams
+- Experimental workflow illustrations
+- Data analysis pipeline diagrams
+- Biological pathway or mechanism diagrams
+- System architecture visualizations
+- Any complex concept that benefits from visualization
+
+For detailed guidance on creating schematics, refer to the scientific-schematics skill documentation.
+
+---
+
+## Core Capabilities
+
+### 1. Manuscript Structure and Organization
+
+**IMRAD Format**: Guide papers through the standard Introduction, Methods, Results, And Discussion structure used across most scientific disciplines. This includes:
+- **Introduction**: Establish research context, identify gaps, state objectives
+- **Methods**: Detail study design, populations, procedures, and analysis approaches
+- **Results**: Present findings objectively without interpretation
+- **Discussion**: Interpret results, acknowledge limitations, propose future directions
+
+For detailed guidance on IMRAD structure, refer to `references/imrad_structure.md`.
+
+**Alternative Structures**: Support discipline-specific formats including:
+- Review articles (narrative, systematic, scoping)
+- Case reports and case series
+- Meta-analyses and pooled analyses
+- Theoretical/modeling papers
+- Methods papers and protocols
+
+### 2. Section-Specific Writing Guidance
+
+**Abstract Composition**: Craft concise, standalone summaries (100-250 words) that capture the paper's purpose, methods, results, and conclusions. Support both structured abstracts (with labeled sections) and unstructured single-paragraph formats.
+
+**Introduction Development**: Build compelling introductions that:
+- Establish the research problem's importance
+- Review relevant literature systematically
+- Identify knowledge gaps or controversies
+- State clear research questions or hypotheses
+- Explain the study's novelty and significance
+
+**Methods Documentation**: Ensure reproducibility through:
+- Detailed participant/sample descriptions
+- Clear procedural documentation
+- Statistical methods with justification
+- Equipment and materials specifications
+- Ethical approval and consent statements
+
+**Results Presentation**: Present findings with:
+- Logical flow from primary to secondary outcomes
+- Integration with figures and tables
+- Statistical significance with effect sizes
+- Objective reporting without interpretation
+
+**Discussion Construction**: Synthesize findings by:
+- Relating results to research questions
+- Comparing with existing literature
+- Acknowledging limitations honestly
+- Proposing mechanistic explanations
+- Suggesting practical implications and future research
+
+### 3. Citation and Reference Management
+
+Apply citation styles correctly across disciplines. For comprehensive style guides, refer to `references/citation_styles.md`.
+
+**Major Citation Styles:**
+- **AMA (American Medical Association)**: Numbered superscript citations, common in medicine
+- **Vancouver**: Numbered citations in square brackets, biomedical standard
+- **APA (American Psychological Association)**: Author-date in-text citations, common in social sciences
+- **Chicago**: Notes-bibliography or author-date, humanities and sciences
+- **IEEE**: Numbered square brackets, engineering and computer science
+
+**Best Practices:**
+- Cite primary sources when possible
+- Include recent literature (last 5-10 years for active fields)
+- Balance citation distribution across introduction and discussion
+- Verify all citations against original sources
+- Use reference management software (Zotero, Mendeley, EndNote)
+
+### 4. Figures and Tables
+
+Create effective data visualizations that enhance comprehension. For detailed best practices, refer to `references/figures_tables.md`.
+
+**When to Use Tables vs. Figures:**
+- **Tables**: Precise numerical data, complex datasets, multiple variables requiring exact values
+- **Figures**: Trends, patterns, relationships, comparisons best understood visually
+
+**Design Principles:**
+- Make each table/figure self-explanatory with complete captions
+- Use consistent formatting and terminology across all display items
+- Label all axes, columns, and rows with units
+- Include sample sizes (n) and statistical annotations
+- Follow the "one table/figure per 1000 words" guideline
+- Avoid duplicating information between text, tables, and figures
+
+**Common Figure Types:**
+- Bar graphs: Comparing discrete categories
+- Line graphs: Showing trends over time
+- Scatterplots: Displaying correlations
+- Box plots: Showing distributions and outliers
+- Heatmaps: Visualizing matrices and patterns
+
+### 5. Reporting Guidelines by Study Type
+
+Ensure completeness and transparency by following established reporting standards. For comprehensive guideline details, refer to `references/reporting_guidelines.md`.
+
+**Key Guidelines:**
+- **CONSORT**: Randomized controlled trials
+- **STROBE**: Observational studies (cohort, case-control, cross-sectional)
+- **PRISMA**: Systematic reviews and meta-analyses
+- **STARD**: Diagnostic accuracy studies
+- **TRIPOD**: Prediction model studies
+- **ARRIVE**: Animal research
+- **CARE**: Case reports
+- **SQUIRE**: Quality improvement studies
+- **SPIRIT**: Study protocols for clinical trials
+- **CHEERS**: Economic evaluations
+
+Each guideline provides checklists ensuring all critical methodological elements are reported.
+
+### 6. Writing Principles and Style
+
+Apply fundamental scientific writing principles. For detailed guidance, refer to `references/writing_principles.md`.
+
+**Clarity**:
+- Use precise, unambiguous language
+- Define technical terms and abbreviations at first use
+- Maintain logical flow within and between paragraphs
+- Use active voice when appropriate for clarity
+
+**Conciseness**:
+- Eliminate redundant words and phrases
+- Favor shorter sentences (15-20 words average)
+- Remove unnecessary qualifiers
+- Respect word limits strictly
+
+**Accuracy**:
+- Report exact values with appropriate precision
+- Use consistent terminology throughout
+- Distinguish between observations and interpretations
+- Acknowledge uncertainty appropriately
+
+**Objectivity**:
+- Present results without bias
+- Avoid overstating findings or implications
+- Acknowledge conflicting evidence
+- Maintain professional, neutral tone
+
+### 7. Writing Process: From Outline to Full Paragraphs
+
+**CRITICAL: Always write in full paragraphs, never submit bullet points in scientific papers.**
+
+Scientific papers must be written in complete, flowing prose. Use this two-stage approach for effective writing:
+
+**Stage 1: Create Section Outlines with Key Points**
+
+When starting a new section:
+1. Use the research-lookup skill to gather relevant literature and data
+2. Create a structured outline with bullet points marking:
+ - Main arguments or findings to present
+ - Key studies to cite
+ - Data points and statistics to include
+ - Logical flow and organization
+3. These bullet points serve as scaffolding—they are NOT the final manuscript
+
+**Example outline (Introduction section):**
+```
+- Background: AI in drug discovery gaining traction
+ * Cite recent reviews (Smith 2023, Jones 2024)
+ * Traditional methods are slow and expensive
+- Gap: Limited application to rare diseases
+ * Only 2 prior studies (Lee 2022, Chen 2023)
+ * Small datasets remain a challenge
+- Our approach: Transfer learning from common diseases
+ * Novel architecture combining X and Y
+- Study objectives: Validate on 3 rare disease datasets
+```
+
+**Stage 2: Convert Key Points to Full Paragraphs**
+
+Once the outline is complete, expand each bullet point into proper prose:
+
+1. **Transform bullet points into complete sentences** with subjects, verbs, and objects
+2. **Add transitions** between sentences and ideas (however, moreover, in contrast, subsequently)
+3. **Integrate citations naturally** within sentences, not as lists
+4. **Expand with context and explanation** that bullet points omit
+5. **Ensure logical flow** from one sentence to the next within each paragraph
+6. **Vary sentence structure** to maintain reader engagement
+
+**Example conversion to prose:**
+
+```
+Artificial intelligence approaches have gained significant traction in drug discovery
+pipelines over the past decade (Smith, 2023; Jones, 2024). While these computational
+methods show promise for accelerating the identification of therapeutic candidates,
+traditional experimental approaches remain slow and resource-intensive, often requiring
+years of laboratory work and substantial financial investment. However, the application
+of AI to rare diseases has been limited, with only two prior studies demonstrating
+proof-of-concept results (Lee, 2022; Chen, 2023). The primary obstacle has been the
+scarcity of training data for conditions affecting small patient populations.
+
+To address this challenge, we developed a transfer learning approach that leverages
+knowledge from well-characterized common diseases to predict therapeutic targets for
+rare conditions. Our novel neural architecture combines convolutional layers for
+molecular feature extraction with attention mechanisms for protein-ligand interaction
+modeling. The objective of this study was to validate our approach across three
+independent rare disease datasets, assessing both predictive accuracy and biological
+interpretability of the results.
+```
+
+**Key Differences Between Outlines and Final Text:**
+
+| Outline (Planning Stage) | Final Manuscript |
+|--------------------------|------------------|
+| Bullet points and fragments | Complete sentences and paragraphs |
+| Telegraphic notes | Full explanations with context |
+| List of citations | Citations integrated into prose |
+| Abbreviated ideas | Developed arguments with transitions |
+| For your eyes only | For publication and peer review |
+
+**Common Mistakes to Avoid:**
+
+- ❌ **Never** leave bullet points in the final manuscript
+- ❌ **Never** submit lists where paragraphs should be
+- ❌ **Don't** use numbered or bulleted lists in Results or Discussion sections (except for specific cases like study hypotheses or inclusion criteria)
+- ❌ **Don't** write sentence fragments or incomplete thoughts
+- ✅ **Do** use occasional lists only in Methods (e.g., inclusion/exclusion criteria, materials lists)
+- ✅ **Do** ensure every section flows as connected prose
+- ✅ **Do** read paragraphs aloud to check for natural flow
+
+**When Lists ARE Acceptable (Limited Cases):**
+
+Lists may appear in scientific papers only in specific contexts:
+- **Methods**: Inclusion/exclusion criteria, materials and reagents, participant characteristics
+- **Supplementary Materials**: Extended protocols, equipment lists, detailed parameters
+- **Never in**: Abstract, Introduction, Results, Discussion, Conclusions
+
+**Integration with Research Lookup:**
+
+The research-lookup skill is essential for Stage 1 (creating outlines):
+1. Search for relevant papers using research-lookup
+2. Extract key findings, methods, and data
+3. Organize findings as bullet points in your outline
+4. Then convert the outline to full paragraphs in Stage 2
+
+This two-stage process ensures you:
+- Gather and organize information systematically
+- Create logical structure before writing
+- Produce polished, publication-ready prose
+- Maintain focus on the narrative flow
+
+### 8. Journal-Specific Formatting
+
+Adapt manuscripts to journal requirements:
+- Follow author guidelines for structure, length, and format
+- Apply journal-specific citation styles
+- Meet figure/table specifications (resolution, file formats, dimensions)
+- Include required statements (funding, conflicts of interest, data availability, ethical approval)
+- Adhere to word limits for each section
+- Format according to template requirements when provided
+
+### 9. Field-Specific Language and Terminology
+
+Adapt language, terminology, and conventions to match the specific scientific discipline. Each field has established vocabulary, preferred phrasings, and domain-specific conventions that signal expertise and ensure clarity for the target audience.
+
+**Identify Field-Specific Linguistic Conventions:**
+- Review terminology used in recent high-impact papers in the target journal
+- Note field-specific abbreviations, units, and notation systems
+- Identify preferred terms (e.g., "participants" vs. "subjects," "compound" vs. "drug," "specimens" vs. "samples")
+- Observe how methods, organisms, or techniques are typically described
+
+**Biomedical and Clinical Sciences:**
+- Use precise anatomical and clinical terminology (e.g., "myocardial infarction" not "heart attack" in formal writing)
+- Follow standardized disease nomenclature (ICD, DSM, SNOMED-CT)
+- Specify drug names using generic names first, brand names in parentheses if needed
+- Use "patients" for clinical studies, "participants" for community-based research
+- Follow Human Genome Variation Society (HGVS) nomenclature for genetic variants
+- Report lab values with standard units (SI units in most international journals)
+
+**Molecular Biology and Genetics:**
+- Use italics for gene symbols (e.g., *TP53*), regular font for proteins (e.g., p53)
+- Follow species-specific gene nomenclature (uppercase for human: *BRCA1*; sentence case for mouse: *Brca1*)
+- Specify organism names in full at first mention, then use accepted abbreviations (e.g., *Escherichia coli*, then *E. coli*)
+- Use standard genetic notation (e.g., +/+, +/-, -/- for genotypes)
+- Employ established terminology for molecular techniques (e.g., "quantitative PCR" or "qPCR," not "real-time PCR")
+
+**Chemistry and Pharmaceutical Sciences:**
+- Follow IUPAC nomenclature for chemical compounds
+- Use systematic names for novel compounds, common names for well-known substances
+- Specify chemical structures using standard notation (e.g., SMILES, InChI for databases)
+- Report concentrations with appropriate units (mM, μM, nM, or % w/v, v/v)
+- Describe synthesis routes using accepted reaction nomenclature
+- Use terms like "bioavailability," "pharmacokinetics," "IC50" consistently with field definitions
+
+**Ecology and Environmental Sciences:**
+- Use binomial nomenclature for species (italicized: *Homo sapiens*)
+- Specify taxonomic authorities at first species mention when relevant
+- Employ standardized habitat and ecosystem classifications
+- Use consistent terminology for ecological metrics (e.g., "species richness," "Shannon diversity index")
+- Describe sampling methods with field-standard terms (e.g., "transect," "quadrat," "mark-recapture")
+
+**Physics and Engineering:**
+- Follow SI units consistently unless field conventions dictate otherwise
+- Use standard notation for physical quantities (scalars vs. vectors, tensors)
+- Employ established terminology for phenomena (e.g., "quantum entanglement," "laminar flow")
+- Specify equipment with model numbers and manufacturers when relevant
+- Use mathematical notation consistent with field standards (e.g., ℏ for reduced Planck constant)
+
+**Neuroscience:**
+- Use standardized brain region nomenclature (e.g., refer to atlases like Allen Brain Atlas)
+- Specify coordinates for brain regions using established stereotaxic systems
+- Follow conventions for neural terminology (e.g., "action potential" not "spike" in formal writing)
+- Use "neural activity," "neuronal firing," "brain activation" appropriately based on measurement method
+- Describe recording techniques with proper specificity (e.g., "whole-cell patch clamp," "extracellular recording")
+
+**Social and Behavioral Sciences:**
+- Use person-first language when appropriate (e.g., "people with schizophrenia" not "schizophrenics")
+- Employ standardized psychological constructs and validated assessment names
+- Follow APA guidelines for reducing bias in language
+- Specify theoretical frameworks using established terminology
+- Use "participants" rather than "subjects" for human research
+
+**General Principles:**
+
+**Match Audience Expertise:**
+- For specialized journals: Use field-specific terminology freely, define only highly specialized or novel terms
+- For broad-impact journals (e.g., *Nature*, *Science*): Define more technical terms, provide context for specialized concepts
+- For interdisciplinary audiences: Balance precision with accessibility, define terms at first use
+
+**Define Technical Terms Strategically:**
+- Define abbreviations at first use: "messenger RNA (mRNA)"
+- Provide brief explanations for specialized techniques when writing for broader audiences
+- Avoid over-defining terms well-known to the target audience (signals unfamiliarity with field)
+- Create a glossary if numerous specialized terms are unavoidable
+
+**Maintain Consistency:**
+- Use the same term for the same concept throughout (don't alternate between "medication," "drug," and "pharmaceutical")
+- Follow a consistent system for abbreviations (decide on "PCR" or "polymerase chain reaction" after first definition)
+- Apply the same nomenclature system throughout (especially for genes, species, chemicals)
+
+**Avoid Field Mixing Errors:**
+- Don't use clinical terminology for basic science (e.g., don't call mice "patients")
+- Avoid colloquialisms or overly general terms in place of precise field terminology
+- Don't import terminology from adjacent fields without ensuring proper usage
+
+**Verify Terminology Usage:**
+- Consult field-specific style guides and nomenclature resources
+- Check how terms are used in recent papers from the target journal
+- Use domain-specific databases and ontologies (e.g., Gene Ontology, MeSH terms)
+- When uncertain, cite a key reference that establishes terminology
+
+### 10. Common Pitfalls to Avoid
+
+**Top Rejection Reasons:**
+1. Inappropriate, incomplete, or insufficiently described statistics
+2. Over-interpretation of results or unsupported conclusions
+3. Poorly described methods affecting reproducibility
+4. Small, biased, or inappropriate samples
+5. Poor writing quality or difficult-to-follow text
+6. Inadequate literature review or context
+7. Figures and tables that are unclear or poorly designed
+8. Failure to follow reporting guidelines
+
+**Writing Quality Issues:**
+- Mixing tenses inappropriately (use past tense for methods/results, present for established facts)
+- Excessive jargon or undefined acronyms
+- Paragraph breaks that disrupt logical flow
+- Missing transitions between sections
+- Inconsistent notation or terminology
+
+## Workflow for Manuscript Development
+
+**Stage 1: Planning**
+1. Identify target journal and review author guidelines
+2. Determine applicable reporting guideline (CONSORT, STROBE, etc.)
+3. Outline manuscript structure (usually IMRAD)
+4. Plan figures and tables as the backbone of the paper
+
+**Stage 2: Drafting** (Use two-stage writing process for each section)
+1. Start with figures and tables (the core data story)
+2. For each section below, follow the two-stage process:
+ - **First**: Create outline with bullet points using research-lookup
+ - **Second**: Convert bullet points to full paragraphs with flowing prose
+3. Write Methods (often easiest to draft first)
+4. Draft Results (describing figures/tables objectively)
+5. Compose Discussion (interpreting findings)
+6. Write Introduction (setting up the research question)
+7. Craft Abstract (synthesizing the complete story)
+8. Create Title (concise and descriptive)
+
+**Remember**: Bullet points are for planning only—the final manuscript must be in complete paragraphs.
+
+**Stage 3: Revision**
+1. Check logical flow and "red thread" throughout
+2. Verify consistency in terminology and notation
+3. Ensure figures/tables are self-explanatory
+4. Confirm adherence to reporting guidelines
+5. Verify all citations are accurate and properly formatted
+6. Check word counts for each section
+7. Proofread for grammar, spelling, and clarity
+
+**Stage 4: Final Preparation**
+1. Format according to journal requirements
+2. Prepare supplementary materials
+3. Write cover letter highlighting significance
+4. Complete submission checklists
+5. Gather all required statements and forms
+
+## Integration with Other Scientific Skills
+
+This skill works effectively with:
+- **Data analysis skills**: For generating results to report
+- **Statistical analysis**: For determining appropriate statistical presentations
+- **Literature review skills**: For contextualizing research
+- **Figure creation tools**: For developing publication-quality visualizations
+
+## References
+
+This skill includes comprehensive reference files covering specific aspects of scientific writing:
+
+- `references/imrad_structure.md`: Detailed guide to IMRAD format and section-specific content
+- `references/citation_styles.md`: Complete citation style guides (APA, AMA, Vancouver, Chicago, IEEE)
+- `references/figures_tables.md`: Best practices for creating effective data visualizations
+- `references/reporting_guidelines.md`: Study-specific reporting standards and checklists
+- `references/writing_principles.md`: Core principles of effective scientific communication
+
+Load these references as needed when working on specific aspects of scientific writing.
diff --git a/scientific-skills/scientific-writing/references/citation_styles.md b/scientific-skills/scientific-writing/references/citation_styles.md
new file mode 100644
index 0000000..e27d1bb
--- /dev/null
+++ b/scientific-skills/scientific-writing/references/citation_styles.md
@@ -0,0 +1,720 @@
+# Citation Styles Guide
+
+## Overview
+
+Citation styles provide standardized formats for acknowledging sources in scientific writing. Different disciplines prefer different styles, and journals typically specify which style to use. The five most common citation styles in science are AMA, Vancouver, APA, Chicago, and IEEE.
+
+## Choosing the Right Style
+
+| Style | Primary Disciplines | In-Text Format |
+|-------|-------------------|----------------|
+| AMA | Medicine, health sciences | Superscript numbers¹ |
+| Vancouver | Biomedical sciences | Numbers in brackets [1] |
+| APA | Psychology, social sciences, education | Author-date (Smith, 2023) |
+| Chicago | Humanities, history, some sciences | Notes-bibliography or author-date |
+| IEEE | Engineering, computer science | Numbers in brackets [1] |
+| ACS | Chemistry | Superscript numbers¹ or (1) |
+| NLM | Life sciences, PubMed | Numbers in brackets [1] |
+
+**Default recommendation**: When in doubt, check the journal's author guidelines. Most biomedical journals use Vancouver or AMA style.
+
+## AMA Style (American Medical Association)
+
+### Overview
+- Used primarily in medical research
+- Based on the *AMA Manual of Style* (11th edition, 2020)
+- Numbered citations appearing as superscripts
+- References listed numerically in order of appearance
+
+### In-Text Citations
+
+**Basic format**: Superscript numerals outside periods and commas, inside semicolons and colons.
+
+**Examples:**
+```
+Several studies have demonstrated this effect.¹
+
+The results were inconclusive,² although Smith et al³ reported otherwise.
+
+These findings³⁻⁵ suggest a correlation.
+
+One meta-analysis⁶ found significant heterogeneity; however, the pooled effect was significant.⁷
+```
+
+**Multiple citations**: Use commas or hyphens for ranges
+```
+Multiple studies¹,³,⁵⁻⁷ have confirmed this.
+```
+
+**Same source cited multiple times**: Use the same number throughout
+
+### Reference List Format
+
+**Journal Articles:**
+```
+1. Author AA, Author BB, Author CC. Title of article. Journal Name. Year;Volume(Issue):Page range. doi:xx.xxxx
+```
+
+**Example:**
+```
+1. Smith JD, Johnson AB, Williams CD. Effectiveness of cognitive behavioral therapy for anxiety disorders. JAMA Psychiatry. 2023;80(5):456-464. doi:10.1001/jamapsychiatry.2023.0123
+```
+
+**Books:**
+```
+2. Author AA. Book Title. Edition. Publisher; Year.
+```
+
+**Book Chapters:**
+```
+3. Chapter Author AA. Chapter title. In: Editor AA, Editor BB, eds. Book Title. Edition. Publisher; Year:Page range.
+```
+
+**Online Resources:**
+```
+4. Organization Name. Page title. Website name. Published date. Updated date. Accessed date. URL
+```
+
+### Special Cases
+
+**More than 6 authors**: List first 3, then "et al"
+```
+Smith JD, Jones AB, Williams CD, et al.
+```
+
+**No author**: Begin with title
+
+**Advance online publication**:
+```
+Published online Month Day, Year. doi:xx.xxxx
+```
+
+## Vancouver Style
+
+### Overview
+- Developed by the International Committee of Medical Journal Editors (ICMJE)
+- Described in *Recommendations for the Conduct, Reporting, Editing, and Publication of Scholarly Work in Medical Journals*
+- Also called "author-number style"
+- Numbered citations in square brackets
+- References listed numerically
+
+### In-Text Citations
+
+**Basic format**: Numbers in square brackets after the relevant text, before periods and commas.
+
+**Examples:**
+```
+Several studies have shown this effect [1].
+
+The results were inconclusive [2], although Smith et al [3] reported otherwise.
+
+These findings [3-5] suggest a correlation.
+
+Multiple studies [1,3,5-7] have confirmed this.
+```
+
+### Reference List Format
+
+**Journal Articles:**
+```
+1. Author AA, Author BB, Author CC. Title of article. Journal Name. Year;Volume(Issue):Page range.
+```
+
+**Example:**
+```
+1. Smith JD, Johnson AB, Williams CD. Effectiveness of cognitive behavioral therapy for anxiety disorders. JAMA Psychiatry. 2023;80(5):456-464.
+```
+
+**Books:**
+```
+2. Author AA, Author BB. Book title. Edition. Place of publication: Publisher; Year.
+```
+
+**Book Chapters:**
+```
+3. Chapter Author AA, Chapter Author BB. Chapter title. In: Editor AA, Editor BB, editors. Book title. Edition. Place: Publisher; Year. p. Page range.
+```
+
+**Electronic Sources:**
+```
+4. Author AA. Title of page [Internet]. Place: Publisher; Date of publication [cited Date of citation]. Available from: URL
+```
+
+### Special Cases
+
+**More than 6 authors**: List first 6, then "et al."
+
+**Journal title abbreviations**: Use PubMed/Index Medicus abbreviations
+- *The Journal of the American Medical Association* → *JAMA*
+- *Nature Medicine* → *Nat Med*
+
+**No volume or issue**: Use year and page numbers only
+
+**Article in press**: Use "[Epub ahead of print]" notation
+
+## APA Style (American Psychological Association)
+
+### Overview
+- Widely used in psychology, education, and social sciences
+- Based on the *Publication Manual of the APA* (7th edition, 2020)
+- Author-date format for in-text citations
+- References listed alphabetically by author surname
+
+### In-Text Citations
+
+**Basic format**: (Author, Year)
+
+**Examples:**
+```
+One study found significant effects (Smith, 2023).
+
+Smith (2023) found significant effects.
+
+Multiple studies (Jones, 2020; Smith, 2023; Williams, 2024) support this conclusion.
+```
+
+**Two authors**: Use "&" in parentheses, "and" in narrative
+```
+(Smith & Jones, 2023)
+Smith and Jones (2023) demonstrated...
+```
+
+**Three or more authors**: Use "et al." after first author
+```
+(Smith et al., 2023)
+Smith et al. (2023) reported...
+```
+
+**Multiple works by same author(s) in same year**: Add letters
+```
+(Smith, 2023a, 2023b)
+```
+
+**Direct quotations**: Include page numbers
+```
+(Smith, 2023, p. 45)
+"Quote text" (Smith, 2023, p. 45).
+Smith (2023) stated, "Quote text" (p. 45).
+```
+
+### Reference List Format
+
+**Journal Articles:**
+```
+Author, A. A., Author, B. B., & Author, C. C. (Year). Title of article. Journal Name, Volume(Issue), page range. https://doi.org/xx.xxxx
+```
+
+**Example:**
+```
+Smith, J. D., Johnson, A. B., & Williams, C. D. (2023). Effectiveness of cognitive behavioral therapy for anxiety disorders. JAMA Psychiatry, 80(5), 456-464. https://doi.org/10.1001/jamapsychiatry.2023.0123
+```
+
+**Books:**
+```
+Author, A. A. (Year). Book title: Subtitle (Edition). Publisher. https://doi.org/xx.xxxx
+```
+
+**Book Chapters:**
+```
+Chapter Author, A. A., & Chapter Author, B. B. (Year). Chapter title. In E. E. Editor & F. F. Editor (Eds.), Book title (pp. page range). Publisher.
+```
+
+**Websites:**
+```
+Author, A. A. (Year, Month Day). Page title. Website Name. URL
+```
+
+### Capitalization Rules
+- Sentence case for article and book titles (capitalize only first word and proper nouns)
+- Title case for journal names (capitalize all major words)
+
+**Example:**
+```
+Smith, J. D. (2023). Effects of stress on cognitive performance: A meta-analysis. Journal of Experimental Psychology: General, 152(3), 456-478.
+```
+
+### Special Cases
+
+**No author**: Move title to author position
+```
+Title of work. (Year). Journal Name...
+```
+
+**No date**: Use (n.d.)
+```
+Smith, J. D. (n.d.). Title...
+```
+
+**Up to 20 authors**: List all authors with "&" before last
+**21 or more authors**: List first 19, then "...", then final author
+
+## Chicago Style
+
+### Overview
+- Based on *The Chicago Manual of Style* (17th edition, 2017)
+- Two systems: Notes-Bibliography and Author-Date
+- Notes-Bibliography common in humanities
+- Author-Date common in sciences
+
+### Notes-Bibliography System
+
+**In-Text**: Superscript numbers for footnotes or endnotes
+```
+One study demonstrated this effect.¹
+```
+
+**Note format:**
+```
+1. John D. Smith, Alice B. Johnson, and Carol D. Williams, "Effectiveness of Cognitive Behavioral Therapy for Anxiety Disorders," JAMA Psychiatry 80, no. 5 (2023): 456-64.
+```
+
+**Bibliography format:**
+```
+Smith, John D., Alice B. Johnson, and Carol D. Williams. "Effectiveness of Cognitive Behavioral Therapy for Anxiety Disorders." JAMA Psychiatry 80, no. 5 (2023): 456-64.
+```
+
+### Author-Date System
+
+**In-Text**: Similar to APA
+```
+(Smith, Johnson, and Williams 2023)
+Smith, Johnson, and Williams (2023) found...
+```
+
+**Reference list**: Similar to APA but with different punctuation
+```
+Smith, John D., Alice B. Johnson, and Carol D. Williams. 2023. "Effectiveness of Cognitive Behavioral Therapy for Anxiety Disorders." JAMA Psychiatry 80 (5): 456-64.
+```
+
+### Special Features
+- Full names in bibliography (not just initials)
+- Uses "and" not "&"
+- Different punctuation from APA
+
+## IEEE Style
+
+### Overview
+- Used in engineering, computer science, and technology
+- Published by the Institute of Electrical and Electronics Engineers
+- Numbered citations in square brackets
+- References listed numerically
+
+### In-Text Citations
+
+**Format**: Numbers in square brackets
+
+**Examples:**
+```
+Several studies have demonstrated this effect [1].
+
+The algorithm was described by Smith [2] and later improved [3], [4].
+
+Multiple implementations [1]-[4] have been proposed.
+```
+
+### Reference List Format
+
+**Journal Articles:**
+```
+[1] A. A. Author, B. B. Author, and C. C. Author, "Title of article," Journal Name, vol. X, no. X, pp. XX-XX, Month Year.
+```
+
+**Example:**
+```
+[1] J. D. Smith, A. B. Johnson, and C. D. Williams, "Effectiveness of cognitive behavioral therapy for anxiety disorders," JAMA Psychiatry, vol. 80, no. 5, pp. 456-464, May 2023.
+```
+
+**Books:**
+```
+[2] A. A. Author, Book Title, Edition. City, State: Publisher, Year.
+```
+
+**Conference Papers:**
+```
+[3] A. A. Author, "Paper title," in Proc. Conference Name, City, State, Year, pp. XX-XX.
+```
+
+**Online Sources:**
+```
+[4] A. A. Author. "Title." Website. URL (accessed Mon. Day, Year).
+```
+
+### Special Features
+- Abbreviated first and middle names
+- Uses "and" before last author (not comma)
+- Month abbreviations (Jan., Feb., etc.)
+- "vol." and "no." before volume and issue
+- "pp." before page range
+
+## Additional Styles
+
+### ACS Style (American Chemical Society)
+
+**In-Text**: Superscript numbers or numbers in parentheses
+```
+This reaction has been well studied.¹
+This reaction has been well studied (1).
+```
+
+**Reference format:**
+```
+(1) Smith, J. D.; Johnson, A. B.; Williams, C. D. Title of Article. J. Am. Chem. Soc. 2023, 145, 1234-1245.
+```
+
+**Features:**
+- Semicolons between authors
+- Abbreviated journal names
+- Year in bold
+- No issue numbers
+
+### NLM Style (National Library of Medicine)
+
+**Very similar to Vancouver**, used by PubMed/MEDLINE
+
+**Key differences:**
+- Uses PubMed journal abbreviations
+- Specific format for electronic publications
+- PMID or PMCID can be included
+
+**Example:**
+```
+Smith JD, Johnson AB, Williams CD. Effectiveness of cognitive behavioral therapy for anxiety disorders. JAMA Psychiatry. 2023 May;80(5):456-64. doi: 10.1001/jamapsychiatry.2023.0123. PMID: 12345678.
+```
+
+## General Citation Best Practices
+
+### Across All Styles
+
+**When to cite:**
+- Direct quotations
+- Paraphrased ideas from others
+- Statistics, data, or figures from other sources
+- Theories, models, or frameworks developed by others
+- Information that is not common knowledge
+
+**Citation density:**
+- Introduction: Cite liberally to establish context
+- Methods: Cite when referencing established protocols or instruments
+- Results: Rarely cite (focus on your own findings)
+- Discussion: Cite frequently when comparing to prior work
+
+**Source quality:**
+- Prefer peer-reviewed journal articles
+- Cite original sources when possible (not secondary citations)
+- Use recent sources (within 5-10 years for active fields)
+- Ensure sources are reputable and relevant
+
+**Common mistakes to avoid:**
+- Inconsistent formatting
+- Missing required elements (DOI, page numbers, etc.)
+- Citing sources not actually read (citation chaining)
+- Over-reliance on review articles instead of primary sources
+- Including uncited references or missing cited references
+- Incorrect author names or initials
+- Wrong year of publication
+- Truncated titles
+
+### Managing Citations
+
+**Reference Management Software:**
+- **Zotero**: Free, open-source, browser integration
+- **Mendeley**: Free, PDF annotation, social features
+- **EndNote**: Commercial, powerful, institutional support
+- **RefWorks**: Web-based, institutional subscriptions
+
+**Software benefits:**
+- Automatic formatting in multiple styles
+- In-text citation insertion
+- Reference list generation
+- PDF organization
+- Sharing capabilities
+
+### Verifying Citations
+
+**Before submission, check:**
+1. Every in-text citation has a corresponding reference
+2. Every reference is cited in text
+3. Formatting is consistent throughout
+4. Author names and initials are correct
+5. Titles are accurate
+6. Journal names match required abbreviations
+7. Volume, issue, and page numbers are correct
+8. DOIs are included (when required)
+9. URLs are functional (for web sources)
+10. Citations appear in correct order (numerical styles)
+
+## DOI (Digital Object Identifier)
+
+### What is a DOI?
+A unique alphanumeric string identifying digital content permanently.
+
+**Format:**
+```
+doi:10.1001/jamapsychiatry.2023.0123
+or
+https://doi.org/10.1001/jamapsychiatry.2023.0123
+```
+
+### When to include:
+- Required by most journals for recent publications
+- Preferred over URLs because DOIs don't change
+- Look up DOIs at https://www.crossref.org/ if not provided
+
+### Style-specific formatting:
+- **AMA**: `doi:10.xxxx/xxxxx`
+- **APA**: `https://doi.org/10.xxxx/xxxxx`
+- **Vancouver**: Often omitted or added at journal's discretion
+- **Chicago**: `https://doi.org/10.xxxx/xxxxx`
+
+## Quick Reference: Journal Article Format
+
+| Style | Format |
+|-------|--------|
+| **AMA** | Author AA, Author BB. Title of article. *Journal*. Year;Vol(Iss):pp. doi:xx |
+| **Vancouver** | Author AA, Author BB. Title of article. Journal. Year;Vol(Iss):pp. |
+| **APA** | Author, A. A., & Author, B. B. (Year). Title of article. *Journal*, Vol(Iss), pp. https://doi.org/xx |
+| **Chicago A-D** | Author, A. A., and B. B. Author. Year. "Title." *Journal* Vol (Iss): pp. |
+| **IEEE** | A. A. Author and B. B. Author, "Title," *Journal*, vol. X, no. X, pp. XX-XX, Mon. Year. |
+
+## Common Abbreviations
+
+### Journal Abbreviations
+Follow the journal's specified system (usually Index Medicus or ISO):
+- *The Journal of Biological Chemistry* → *J Biol Chem*
+- *Proceedings of the National Academy of Sciences* → *Proc Natl Acad Sci USA*
+- *Nature Medicine* → *Nat Med*
+
+### Month Abbreviations
+- Jan., Feb., Mar., Apr., May, June, July, Aug., Sept., Oct., Nov., Dec.
+- Some styles use three-letter abbreviations without periods
+
+### Edition Abbreviations
+- 1st ed., 2nd ed., 3rd ed., etc.
+- Or: 1st edition, 2nd edition
+
+## Special Publication Types
+
+### Preprints
+```
+APA: Author, A. A. (Year). Title [Preprint]. Repository Name. https://doi.org/xx.xxxx
+```
+
+### Theses and Dissertations
+```
+APA: Author, A. A. (Year). Title [Doctoral dissertation, University Name]. Repository Name. URL
+```
+
+### Conference Proceedings
+```
+IEEE: A. A. Author, "Title," in Proc. Conf. Name, City, Year, pp. XX-XX.
+```
+
+### Software/Code
+```
+APA: Author, A. A. (Year). Title (Version X.X) [Computer software]. Publisher. URL
+```
+
+### Datasets
+```
+APA: Author, A. A. (Year). Title of dataset (Version X) [Data set]. Repository. https://doi.org/xx.xxxx
+```
+
+## Transitioning Between Styles
+
+When converting between citation styles:
+
+1. **Use reference management software** for automatic conversion
+2. **Check these elements** that vary by style:
+ - In-text citation format (numbered vs. author-date)
+ - Author name format (initials vs. full names)
+ - Title capitalization (sentence case vs. title case)
+ - Journal name formatting (abbreviated vs. full)
+ - Punctuation (periods, commas, semicolons)
+ - Use of italics and bold
+ - Order of elements
+3. **Manually verify** after automatic conversion
+4. **Check journal guidelines** for specific requirements
+
+## Journal-Specific Citation Styles and Requirements
+
+### How to Identify a Journal's Citation Style
+
+**Step 1: Check Author Guidelines**
+- Every journal provides author instructions (usually "Instructions for Authors" or "Author Guidelines")
+- Citation style is typically specified in "References" or "Citations" section
+- Look for example references formatted in the journal's style
+
+**Step 2: Review Recent Publications**
+- Examine 3-5 recent articles from your target journal
+- Note the in-text citation format (numbered vs. author-date)
+- Compare reference list formatting
+- Check for journal-specific variations
+
+**Step 3: Verify Journal-Specific Variations**
+Some journals use modified versions of standard styles:
+- Abbreviated vs. full journal names
+- DOI inclusion requirements
+- Article titles in title case vs. sentence case
+- Maximum number of authors before "et al."
+
+### Common Journals and Their Citation Styles
+
+| Journal | Citation Style | Key Features |
+|---------|---------------|--------------|
+| **JAMA, JAMA Network journals** | AMA | Superscript numbers, abbreviated journal names, no issue numbers |
+| **New England Journal of Medicine** | Modified Vancouver | Numbered brackets, abbreviated journals, limited authors (3 then et al) |
+| **The Lancet** | Vancouver | Numbered brackets, PubMed abbreviations |
+| **BMJ** | Vancouver | Numbered in-text, DOIs required when available |
+| **Nature, Nature journals** | Nature style (numbered) | Numbered superscripts, abbreviated journals, no article titles in some journals |
+| **Science** | Science style (numbered) | Numbered in-text, abbreviated format |
+| **Cell, Cell Press journals** | Cell style (author-year) | Author-date, specific formatting for multiple citations |
+| **PLOS journals** | Vancouver | Numbered brackets, full journal names in some PLOS journals |
+| **Journal of Biological Chemistry** | JBC style (numbered) | Numbered in-text, specific abbreviation rules |
+| **Psychological journals** | APA | Author-date, DOIs required |
+| **IEEE journals** | IEEE | Numbered brackets, specific format for conference papers |
+| **ACS journals** | ACS | Superscript or numbered, semicolons between authors |
+
+### Journal Family Consistency
+
+**Journals from the same publisher often share citation styles:**
+
+**Elsevier journals:**
+- Vary widely; check specific journal
+- Many use numbered Vancouver-style
+- Some allow author-date
+
+**Springer Nature journals:**
+- Nature journals: Nature style (numbered, abbreviated)
+- Springer journals: Often numbered or author-date depending on field
+- BMC journals: Vancouver with full journal names
+
+**Wiley journals:**
+- Varies by field
+- Many biomedical journals use Vancouver
+- Psychology/social science journals often use APA
+
+**American Chemical Society (ACS):**
+- All ACS journals use ACS style
+- Consistent across Journal of American Chemical Society, Analytical Chemistry, etc.
+
+### High-Impact Journal and Conference Preferences
+
+| Venue | Field | Citation Preference | Key Features |
+|-------|-------|-------------------|--------------|
+| **Nature/Science** | Multidisciplinary | Numbered, abbreviated | Space-saving, broad readability |
+| **Cell family** | Life sciences | Author-date or numbered | Attribution visibility |
+| **NEJM/Lancet/JAMA** | Medicine | Vancouver/AMA numbered | Medical standard |
+| **NeurIPS/ICML/ICLR** | Machine Learning | Numbered [1] or (Author, Year) | Varies by conference, check template |
+| **CVPR/ICCV/ECCV** | Computer Vision | Numbered [1], IEEE-like | Compact format |
+| **ACL/EMNLP** | NLP | Author-year (ACL style) | Attribution-focused |
+
+### Adapting Citations for Different Target Journals
+
+**When switching journals after desk rejection or withdrawal:**
+
+**Use reference management software:**
+1. Import references into Zotero, Mendeley, or EndNote
+2. Select target journal's citation style from software library
+3. Regenerate citations and reference list automatically
+4. Manually verify formatting matches journal examples
+
+**Key elements to check when converting:**
+- In-text format (switch numbered ↔ author-date)
+- Journal name abbreviation style
+- Article title capitalization
+- Author name format (initials vs. full names)
+- DOI format and inclusion
+- Issue number inclusion/exclusion
+- Page number format
+
+**Manual verification essential for:**
+- Preprints and non-standard sources
+- Software/datasets citations
+- Conference proceedings
+- Dissertations and theses
+
+### Venue-Specific Evaluation Criteria
+
+**Content expectations:**
+- **High-impact journals**: >50% citations from last 5 years; primary sources preferred
+- **Medical journals**: Recent clinical evidence; systematic reviews valued
+- **ML conferences**: Recent papers (last 2-3 years); preprints (arXiv) acceptable
+- **Self-citation**: Keep <20% across all venues
+
+**Format compliance (often automated):**
+- Match venue citation style exactly
+- All in-text citations have corresponding references
+- Include DOIs when required (journals) or arXiv IDs (ML conferences)
+- Use correct abbreviations (PubMed for medical, standard for ML)
+
+**ML conference specifics:**
+- **NeurIPS/ICML/ICLR**: ArXiv preprints widely cited; recent work heavily valued
+- **Page limits strict**: Citation formatting affects space
+- **Supplementary material**: Can include extended bibliography
+- **Double-blind review**: Avoid obvious self-citation patterns during review
+
+### Citation Density by Venue Type
+
+| Venue Type | Expected Citations | Key Notes |
+|-----------|-------------------|-----------|
+| **Nature/Science research** | 30-50 | Selective, high-impact citations |
+| **Medical journals (RCT)** | 25-40 | Recent clinical evidence |
+| **Field-specific journals** | 30-60 | Comprehensive field coverage |
+| **ML conferences (8-page)** | 20-40 | Space-limited, recent work |
+| **Review articles** | 100-300+ | Comprehensive coverage |
+
+**ML conference citation practices:**
+- **NeurIPS/ICML**: 25-40 references typical for 8-page papers
+- **Workshop papers**: 15-25 references
+- **ArXiv preprints**: Widely accepted and cited
+- **Related work**: Concise but comprehensive; often moved to appendix
+- **Recency critical**: Cite work from last 1-2 years when relevant
+
+### Pre-Submission Citation Checklist
+
+**Content:**
+- [ ] ≥50% citations from last 5-10 years (or 2-3 years for ML conferences)
+- [ ] <20% self-citations; balanced perspectives
+- [ ] Primary sources cited (not citation chains)
+- [ ] All claims supported by appropriate citations
+
+**Format:**
+- [ ] Style matches venue exactly (check template)
+- [ ] All in-text citations in reference list and vice versa
+- [ ] DOIs/arXiv IDs included as required
+- [ ] Abbreviations match venue style
+
+**ML conferences additional:**
+- [ ] ArXiv preprints properly formatted
+- [ ] Self-citations anonymized if double-blind review
+- [ ] References fit within page limits
+
+## Resources for Citation Styles
+
+### Official Manuals
+- AMA: https://www.amamanualofstyle.com/
+- Vancouver/ICMJE: http://www.icmje.org/
+- APA: https://apastyle.apa.org/
+- Chicago: https://www.chicagomanualofstyle.org/
+- IEEE: https://ieeeauthorcenter.ieee.org/
+
+### Journal-Specific Style Guides
+- Nature: https://www.nature.com/nature/for-authors/formatting-guide
+- Science: https://www.science.org/content/page/instructions-authors
+- Cell: https://www.cell.com/cell/authors
+- JAMA: https://jamanetwork.com/journals/jama/pages/instructions-for-authors
+
+### Quick Reference Guides
+- Purdue OWL: https://owl.purdue.edu/
+- Citation Machine: https://www.citationmachine.net/
+- EasyBib: https://www.easybib.com/
+
+### Reference Management
+- Zotero: https://www.zotero.org/
+- Mendeley: https://www.mendeley.com/
+- EndNote: https://endnote.com/
+
+### Journal Citation Style Databases
+- Journal Citation Reports (Clarivate): Lists journal citation styles
+- EndNote style repository: >7000 journal-specific styles
+- Zotero Style Repository: https://www.zotero.org/styles
diff --git a/scientific-skills/scientific-writing/references/figures_tables.md b/scientific-skills/scientific-writing/references/figures_tables.md
new file mode 100644
index 0000000..4f61242
--- /dev/null
+++ b/scientific-skills/scientific-writing/references/figures_tables.md
@@ -0,0 +1,806 @@
+# Figures and Tables Best Practices
+
+## Overview
+
+Figures and tables are essential components of scientific papers, serving to display data patterns, summarize results, and provide evidence for conclusions. Effective visual displays enhance comprehension and can sustain reader interest while illustrating trends, patterns, and relationships not easily conveyed through text alone.
+
+A recent Nature Cell Biology checklist (2025) emphasizes that creating clear and engaging scientific figures is crucial for communicating complex data with clarity, accessibility, and design excellence.
+
+## When to Use Tables vs. Figures
+
+### Use Tables When:
+- Presenting precise numerical values that readers need to reference
+- Comparing exact measurements across multiple variables
+- Showing detailed statistical outputs
+- Data cannot be adequately summarized in 1-2 sentences
+- Readers need access to specific data points
+- Displaying demographic or baseline characteristics
+- Presenting multiple related statistical tests
+
+**Example use cases:**
+- Baseline participant characteristics (age, sex, diagnosis, etc.)
+- Detailed statistical model outputs (coefficients, p-values, confidence intervals)
+- Dose-response data with exact values
+- Gene expression levels for specific genes
+- Chemical compositions or concentrations
+
+### Use Figures When:
+- Showing trends over time
+- Displaying relationships or correlations
+- Comparing groups visually
+- Illustrating distributions
+- Demonstrating patterns not easily seen in numbers
+- Showing images (microscopy, radiography, etc.)
+- Displaying workflows, diagrams, or schematics
+
+**Example use cases:**
+- Growth curves or time series
+- Dose-response curves
+- Scatter plots showing correlations
+- Bar graphs comparing treatment groups
+- Histograms showing distributions
+- Heatmaps displaying patterns across conditions
+- Microscopy images or Western blots
+
+### General Decision Rule
+
+**Can the information be conveyed in 1-2 sentences of text?**
+- Yes → Use text only
+- No, and precise values are needed → Use a table
+- No, and patterns/trends are most important → Use a figure
+
+## Core Design Principles
+
+### 1. Self-Explanatory Display Items
+
+**Each figure or table must stand alone without requiring the main text.**
+
+**Essential elements:**
+- Complete, descriptive caption
+- All abbreviations defined (in caption or footnote)
+- Units of measurement clearly indicated
+- Sample sizes (n) reported
+- Statistical significance annotations explained
+- Legend included (for figures with multiple data series)
+
+**Example of self-explanatory caption:**
+```
+Figure 1. Mean systolic blood pressure (SBP) over 12 weeks in intervention and control groups.
+Error bars represent standard error of the mean (SEM). Asterisks indicate significant
+differences between groups at each time point (*p < 0.05, **p < 0.01, ***p < 0.001,
+two-tailed t-tests). n = 48 per group. BP = blood pressure; SEM = standard error of mean.
+```
+
+### 2. Avoid Redundancy
+
+**Do not duplicate information between text, tables, and figures.**
+
+**Bad practice:**
+```
+"Mean age was 45.2 years in Group A and 47.8 years in Group B. Mean BMI was 26.3 in
+Group A and 28.1 in Group B. Mean systolic blood pressure was 132 mmHg in Group A..."
+[Also shown in Table 1]
+```
+
+**Good practice:**
+```
+"Baseline characteristics were similar between groups (Table 1), with no significant
+differences in age, BMI, or blood pressure (all p > 0.15)."
+[Details in Table 1]
+```
+
+**Key principle:** Text should highlight key findings from tables/figures, not repeat all data.
+
+### 3. Consistency
+
+**Maintain uniform formatting across all display items:**
+- Font types and sizes
+- Color schemes
+- Terminology and abbreviations
+- Axis labels and units
+- Statistical annotation methods
+- Figure styles (all line graphs should look similar)
+
+**Example of inconsistency to avoid:**
+- Figure 1 uses "standard error" while Figure 2 uses "SE"
+- Figure 1 has blue/red color scheme while Figure 2 uses green/yellow
+- Table 1 reports p-values as "p = 0.023" while Table 2 uses "p-value = .023"
+
+### 4. Optimal Quantity
+
+**Follow the "one display item per 1000 words" guideline.**
+
+**Typical manuscript:**
+- 3000-4000 words → 3-4 tables/figures total
+- 5000-6000 words → 5-6 tables/figures total
+
+**Quality over quantity:** A few well-designed, information-rich displays are better than many redundant or poorly designed ones.
+
+### 5. Clarity and Simplicity
+
+**Avoid cluttered or overly complex displays:**
+- Don't include too many variables in one figure
+- Use clear, readable fonts (minimum 8-10 pt in final size)
+- Provide adequate spacing between elements
+- Use high contrast (especially for color-blind accessibility)
+- Remove unnecessary grid lines, borders, or decoration
+- Maximize data-ink ratio (Tufte principle: minimize non-data ink)
+
+## Figure Types and When to Use Them
+
+### Bar Graphs
+
+**Best for:**
+- Comparing discrete categories or groups
+- Showing counts or frequencies
+- Displaying mean values with error bars
+
+**Design guidelines:**
+- Start y-axis at zero (unless showing small differences in large values)
+- Order bars logically (by size, alphabetically, or temporally)
+- Use error bars (SD, SEM, or CI) consistently
+- Include sample sizes
+- Avoid 3D effects (they distort perception)
+
+**Common mistakes:**
+- Not starting at zero (can exaggerate differences)
+- Too many categories (consider table instead)
+- Missing error bars
+
+**Example applications:**
+- Mean gene expression across tissue types
+- Treatment group comparisons
+- Frequency of adverse events
+
+### Line Graphs
+
+**Best for:**
+- Showing trends over continuous variables (usually time)
+- Displaying multiple groups on same axes
+- Illustrating dose-response relationships
+
+**Design guidelines:**
+- Use different line styles or colors for groups
+- Include data point markers for sparse data
+- Show error bars or shaded confidence intervals
+- Label axes clearly with units
+- Use consistent intervals on x-axis
+
+**Common mistakes:**
+- Connecting discrete data points that shouldn't be connected
+- Too many lines making graph unreadable
+- Inconsistent time intervals without indication
+
+**Example applications:**
+- Growth curves
+- Time course experiments
+- Survival curves (Kaplan-Meier plots)
+- Pharmacokinetic profiles
+
+### Scatter Plots
+
+**Best for:**
+- Showing relationships between two continuous variables
+- Displaying correlations
+- Identifying outliers
+
+**Design guidelines:**
+- Include trend line or regression line with equation and R²
+- Report correlation coefficient and p-value
+- Use semi-transparent points if data overlap
+- Consider logarithmic scales for wide ranges
+- Mark outliers if relevant
+
+**Common mistakes:**
+- Not showing individual data points
+- Using scatter plots for categorical data
+- Missing correlation statistics
+
+**Example applications:**
+- Correlation between biomarkers
+- Relationship between dose and response
+- Method comparison (Bland-Altman plots)
+
+### Box Plots (Box-and-Whisker Plots)
+
+**Best for:**
+- Showing distributions and spread
+- Comparing distributions across groups
+- Identifying outliers
+
+**Design guidelines:**
+- Clearly define box elements (median, quartiles, whiskers)
+- Show or note outliers explicitly
+- Consider violin plots for small sample sizes
+- Overlay individual data points when n < 20
+
+**Common mistakes:**
+- Not defining what whiskers represent
+- Using for very small samples without showing raw data
+- Not marking outliers
+
+**Example applications:**
+- Comparing distributions across treatment groups
+- Showing variability in measurements
+- Quality control data
+
+### Heatmaps
+
+**Best for:**
+- Displaying matrices of data
+- Showing patterns across many conditions
+- Representing clustering or grouping
+
+**Design guidelines:**
+- Use color scales that are perceptually uniform
+- Include color scale bar with units
+- Consider hierarchical clustering for rows/columns
+- Use appropriate color scheme (diverging vs. sequential)
+- Make axes labels readable
+
+**Common mistakes:**
+- Poor color choice (rainbow scales are often misleading)
+- Too many rows/columns making labels unreadable
+- No color scale bar
+
+**Example applications:**
+- Gene expression across samples
+- Correlation matrices
+- Time-series data across multiple variables
+
+### Images (Microscopy, Gels, Blots)
+
+**Best for:**
+- Showing representative examples
+- Demonstrating morphology or localization
+- Presenting gel electrophoresis or Western blots
+
+**Design guidelines:**
+- Include scale bars (not magnification in caption)
+- Show representative images with quantification in separate panel
+- Label important features with arrows or labels
+- Ensure adequate resolution (usually 300+ dpi)
+- Show full, unmanipulated images with cropping noted
+- Include all relevant controls
+
+**Common mistakes:**
+- No scale bar
+- Over-processed or manipulated images
+- Cherry-picking best images without quantification
+- Insufficient resolution
+
+**Example applications:**
+- Histological sections
+- Immunofluorescence
+- Western blots
+- Gel electrophoresis
+
+### Forest Plots
+
+**Best for:**
+- Displaying meta-analysis results
+- Showing effect sizes with confidence intervals
+- Comparing multiple studies or subgroups
+
+**Design guidelines:**
+- Include point estimates and CI for each study
+- Show overall pooled estimate clearly
+- Include line of no effect (typically at 1.0 or 0)
+- List study details or weights
+
+**Example applications:**
+- Meta-analyses
+- Systematic reviews
+- Subgroup analyses
+
+### Flow Diagrams
+
+**Best for:**
+- Study participant flow (CONSORT diagrams)
+- Systematic review search process (PRISMA diagrams)
+- Experimental workflows
+
+**Design guidelines:**
+- Follow reporting guideline templates (CONSORT, PRISMA)
+- Use consistent shapes and connectors
+- Include numbers at each stage
+- Clearly show inclusions and exclusions
+
+## Table Design Guidelines
+
+### Structure
+
+**Basic anatomy:**
+1. **Table number and title** (above table)
+2. **Column headers** (with units)
+3. **Row labels**
+4. **Data cells** (with appropriate precision)
+5. **Footnotes** (below table for abbreviations, statistics, notes)
+
+### Formatting Best Practices
+
+**Column headers:**
+- Use clear, concise labels
+- Include units in parentheses
+- Use abbreviations sparingly (define in footnote)
+
+**Data presentation:**
+- Align decimal points in columns
+- Use consistent decimal places (usually 1-2 for means)
+- Report same precision across rows/columns
+- Use en-dash (–) for "not applicable"
+- Use appropriate precision (don't over-report)
+
+**Statistical annotations:**
+- Use superscript letters (ᵃ, ᵇ, ᶜ) or symbols (*, †, ‡) for footnotes
+- Define p-value thresholds clearly
+- Report exact p-values when possible (p = 0.032, not p < 0.05)
+
+**Footnotes:**
+- Define all abbreviations
+- Explain statistical tests used
+- Note any missing data
+- Indicate data source if not original
+
+### Example Table Format
+
+```
+Table 1. Baseline Characteristics of Study Participants
+
+Characteristic Intervention (n=50) Control (n=48) p-value
+─────────────────────────────────────────────────────────────────────────
+Age, years 45.3 ± 8.2 47.1 ± 9.1 0.28
+Male sex, n (%) 28 (56) 25 (52) 0.71
+BMI, kg/m² 26.3 ± 3.8 27.1 ± 4.2 0.32
+Current smoker, n (%) 12 (24) 15 (31) 0.42
+Systolic BP, mmHg 132 ± 15 134 ± 18 0.54
+─────────────────────────────────────────────────────────────────────────
+
+Data presented as mean ± SD or n (%). p-values from independent t-tests for
+continuous variables and χ² tests for categorical variables. BMI = body mass
+index; BP = blood pressure; SD = standard deviation.
+```
+
+### Common Table Mistakes
+
+1. **Excessive complexity** (too many rows/columns)
+2. **Insufficient context** (missing units, unclear abbreviations)
+3. **Over-precision** (reporting 5 decimal places for p-values)
+4. **Missing sample sizes**
+5. **No statistical comparisons when appropriate**
+6. **Inconsistent formatting** across multiple tables
+7. **Duplicate information** with figures or text
+
+## Statistical Presentation in Figures and Tables
+
+### Reporting Requirements
+
+**For each comparison, report:**
+1. **Point estimate** (mean, median, proportion)
+2. **Measure of variability** (SD, SEM, CI)
+3. **Sample size** (n)
+4. **Test statistic** (t, F, χ², etc.)
+5. **p-value** (exact when p > 0.001)
+6. **Effect size** (when appropriate)
+
+### Error Bars
+
+**Choose the appropriate measure:**
+
+| Measure | Meaning | When to Use |
+|---------|---------|-------------|
+| **SD (Standard Deviation)** | Variability in the data | Showing data spread |
+| **SEM (Standard Error of Mean)** | Precision of mean estimate | Showing measurement precision |
+| **95% CI (Confidence Interval)** | Range likely to contain true mean | Showing statistical significance |
+
+**Key rule:** Always state which measure is shown.
+
+**Example caption:**
+```
+"Error bars represent 95% confidence intervals."
+NOT: "Error bars represent standard error."
+```
+
+**Recommendation:** 95% CI preferred because non-overlapping CIs indicate significant differences.
+
+### Significance Indicators
+
+**Common notation:**
+```
+* p < 0.05
+** p < 0.01
+*** p < 0.001
+n.s. or NS = not significant
+```
+
+**Alternative:** Show exact p-values in table or caption
+
+**Best practice:** Define significance indicators in every figure caption or table footnote.
+
+## Accessibility Considerations
+
+### Color-Blind Friendly Design
+
+**Recommendations:**
+- Use color palettes designed for color-blind accessibility
+- Don't rely on color alone (add patterns, shapes, or labels)
+- Test figures in grayscale
+- Avoid red-green combinations
+
+**Color-blind safe palettes:**
+- Blue-Orange
+- Purple-Yellow
+- Colorbrewer2.org palettes
+- Viridis, Plasma, Inferno (for heatmaps)
+
+### High Contrast
+
+**Ensure readability:**
+- Dark text on light background (or vice versa)
+- Avoid low-contrast color combinations (gray on gray)
+- Use thick enough lines (minimum 0.5-1 pt)
+- Large enough text (minimum 8-10 pt after scaling)
+
+### Screen and Print Compatibility
+
+**Design for both media:**
+- Use vector formats when possible (PDF, EPS, SVG)
+- Minimum 300 dpi for raster images (TIFF, PNG)
+- Test appearance at final print size
+- Ensure color figures work in grayscale if printed
+
+## Technical Requirements
+
+### File Formats
+
+**Vector formats** (preferred for graphs and diagrams):
+- **PDF**: Universal, preserves quality
+- **EPS**: Encapsulated PostScript, publishing standard
+- **SVG**: Scalable vector graphics, web-friendly
+
+**Raster formats** (for photos and images):
+- **TIFF**: Uncompressed, high quality, large files
+- **PNG**: Lossless compression, good for screen
+- **JPEG**: Lossy compression, avoid for data figures
+
+**Avoid:**
+- Low-resolution screenshots
+- Figures copied from presentations (usually too low resolution)
+- Heavily compressed JPEGs (artifacts)
+
+### Resolution Requirements
+
+**Minimum standards:**
+- **Line art** (graphs, diagrams): 300-600 dpi
+- **Halftones** (photos, grayscale): 300 dpi
+- **Combination** (images with labels): 300-600 dpi
+
+**Best practice:** Create figures at final size and resolution.
+
+### Dimensions
+
+**Check journal requirements:**
+- **Single column**: typically 8-9 cm (3-3.5 inches) wide
+- **Double column**: typically 17-18 cm (6.5-7 inches) wide
+- **Full page**: varies by journal
+
+**Recommendation:** Design figures to fit single column when possible.
+
+### Image Manipulation
+
+**Allowed:**
+- Brightness/contrast adjustment applied to entire image
+- Color balance adjustment
+- Cropping (with notation)
+- Rotation
+
+**NOT allowed:**
+- Selective editing (e.g., enhancing bands in gels)
+- Removing background artifacts
+- Splicing images without clear indication
+- Any manipulation that obscures, eliminates, or misrepresents data
+
+**Ethical requirement:** Report all image adjustments in Methods section.
+
+## Figure and Table Numbering
+
+### Numbering System
+
+**Figures:**
+- Number consecutively in order of first mention in text
+- Use Arabic numerals: Figure 1, Figure 2, Figure 3...
+- Supplementary figures: Figure S1, Figure S2...
+
+**Tables:**
+- Number separately from figures
+- Use Arabic numerals: Table 1, Table 2, Table 3...
+- Supplementary tables: Table S1, Table S2...
+
+### In-Text References
+
+**Format:**
+```
+"Results are shown in Figure 1."
+"Participant characteristics are presented in Table 2."
+"Multiple analyses confirmed this finding (Figures 3-5)."
+```
+
+**NOT:**
+```
+"Figure 1 below shows..." (avoid "above" or "below" - pagination may change)
+"The figure shows..." (always use specific number)
+```
+
+## Captions
+
+### Caption Structure
+
+**For figures:**
+```
+Figure 1. [One-sentence title]. [Additional description sentences providing context,
+defining abbreviations, explaining panels, describing statistical tests, and noting
+sample sizes].
+```
+
+**For tables:**
+```
+Table 1. [Descriptive Title]
+[Table contents]
+[Footnotes defining abbreviations, statistical methods, and providing additional context]
+```
+
+### Caption Content
+
+**Essential information:**
+1. What is being shown (brief title)
+2. Detailed description of content
+3. Definition of all abbreviations and symbols
+4. Sample sizes
+5. Statistical tests used
+6. Meaning of error bars or annotations
+7. Panel labels explained (if multiple panels)
+
+**Example comprehensive caption:**
+```
+Figure 3. Cognitive performance improves with treatment over 12 weeks. (A) Mean Mini-Mental
+State Examination (MMSE) scores at baseline, 6 weeks, and 12 weeks for treatment (blue) and
+placebo (gray) groups. (B) Individual participant trajectories for treatment group. Error bars
+represent 95% confidence intervals. Asterisks indicate significant between-group differences
+(*p < 0.05, **p < 0.01, ***p < 0.001; repeated measures ANOVA with Bonferroni correction).
+n = 42 treatment, n = 40 placebo. MMSE scores range from 0-30, with higher scores indicating
+better cognitive function.
+```
+
+## Journal-Specific Requirements
+
+### Before Creating Figures/Tables
+
+**Check journal guidelines for:**
+- Preferred file formats
+- Resolution requirements
+- Color specifications (RGB vs. CMYK)
+- Maximum number of display items
+- Dimension requirements
+- Font restrictions
+- Whether to embed figures in manuscript or submit separately
+
+### During Submission
+
+**Prepare checklist:**
+- [ ] All figures/tables numbered correctly
+- [ ] All cited in text in order
+- [ ] Captions complete and self-explanatory
+- [ ] Abbreviations defined
+- [ ] Correct file format and resolution
+- [ ] Appropriate size/dimensions
+- [ ] High enough quality for print
+- [ ] Color-blind friendly (if using color)
+- [ ] Permissions obtained (if adapting from others' work)
+
+## Common Pitfalls to Avoid
+
+### Content Issues
+1. **Duplication** between text, tables, and figures
+2. **Insufficient context** (unclear what is shown)
+3. **Too much information** in one display
+4. **Missing key information** (sample sizes, units, statistics)
+5. **Cherry-picking** data without showing full picture
+
+### Design Issues
+6. **Poor color choices** (not color-blind friendly)
+7. **Inconsistent formatting** across displays
+8. **Cluttered or busy designs**
+9. **Too small text** at final size
+10. **Misleading visualizations** (truncated axes, 3D distortions)
+
+### Technical Issues
+11. **Insufficient resolution** (pixelated when printed)
+12. **Wrong file format** (lossy compression, non-vector graphs)
+13. **Improper image manipulation** (undeclared editing)
+14. **Missing scale bars** on images
+15. **Figures that don't work in grayscale** (if journal prints in B&W)
+
+## Tools for Creating Figures
+
+### Graphing Software
+- **R (ggplot2)**: Highly customizable, publication-quality, reproducible
+- **Python (matplotlib, seaborn)**: Flexible, programmable, widely used
+- **GraphPad Prism**: User-friendly, statistics integrated, common in life sciences
+- **Origin**: Advanced graphing, popular in physics/engineering
+- **Excel**: Basic graphs, widely available, limited customization
+- **MATLAB**: Technical computing, good for complex visualizations
+
+### Image Processing
+- **ImageJ/Fiji**: Free, powerful, widely used in microscopy
+- **Adobe Photoshop**: Professional standard, extensive tools
+- **GIMP**: Free alternative to Photoshop
+- **Adobe Illustrator**: Vector graphics, figure assembly
+- **Inkscape**: Free vector graphics editor
+
+### Best Practices for Software Choice
+- Use tools that produce vector output for graphs
+- Learn one tool well rather than many superficially
+- Script your figure generation for reproducibility
+- Save original data files separately from figure files
+
+## Journal-Specific Figure and Table Requirements
+
+### Understanding Journal Expectations
+
+**Different journals have vastly different requirements for figures and tables.** Before creating display items, always consult your target journal's author guidelines for specific requirements.
+
+### Common Journal-Specific Variations
+
+| Aspect | Variation by Journal | Example Journals |
+|--------|---------------------|------------------|
+| **Number allowed** | 4-10 display items for research articles | Nature (4-6), PLOS ONE (unlimited), Science (4-5) |
+| **File format** | TIFF, EPS, PDF, AI, or specific formats | Nature (EPS/PDF for line art), Cell (TIFF preferred) |
+| **Resolution** | 300-1000 dpi depending on type | JAMA (300-600 dpi), Nature (300+ dpi) |
+| **Color** | RGB vs. CMYK | Print journals: CMYK; Online: RGB |
+| **Dimensions** | Single vs. double column widths | Nature (89mm or 183mm), Science (specific templates) |
+| **Figure legends** | Length limits, specific format | Some journals: 150 word max per legend |
+| **Table format** | Editable vs. image | Most prefer editable tables, not images |
+
+### Venue-Specific Requirements Summary
+
+| Venue Type | Display Limit | Format | Resolution | Key Features |
+|-----------|--------------|--------|------------|--------------|
+| **Nature/Science** | 4-6 main | EPS/PDF/TIFF | 300+ dpi | Extended data allowed; multi-panel figures |
+| **Medical journals** | 3-5 | TIFF/EPS | 300-600 dpi | CONSORT diagrams; conservative design |
+| **PLOS ONE** | Unlimited | TIFF/EPS/PDF | 300+ dpi | Must work in grayscale |
+| **ML conferences** | 4-6 in 8-page limit | PDF (vector preferred) | Print quality | Compact design; info-dense figures |
+
+**ML Conference Figure Requirements:**
+
+**NeurIPS/ICML/ICLR:**
+- Figures count toward page limit (typically 8 pages including references)
+- Vector graphics (PDF) preferred for plots
+- High information density expected
+- Supplementary material for additional figures
+- LaTeX template provided (use neurips_2024.sty or equivalent)
+- Figures must be legible when printed in grayscale
+
+**Computer Vision (CVPR/ICCV/ECCV):**
+- Qualitative results figures critical
+- Side-by-side comparisons standard
+- Must show failure cases
+- Supplementary material for videos/additional examples
+- Often 6-8 main figures in 8-page papers
+
+**Key ML conference figure practices:**
+- **Ablation studies**: Compact tables/plots showing component contributions
+- **Architecture diagrams**: Clear, professional block diagrams
+- **Performance plots**: Include error bars/confidence intervals
+- **Qualitative examples**: Show diverse, representative samples
+- **Comparison tables**: Concise, bold best results
+
+### Evaluation Criteria Across Venues
+
+**What reviewers check:**
+- **Necessity**: Each figure/table supports conclusions
+- **Quality**: Professional appearance, sufficient resolution
+- **Clarity**: Self-explanatory with captions; proper labeling
+- **Statistics**: Error bars, sample sizes, significance indicators
+- **Consistency**: Formatting uniform across display items
+
+**Common rejection reasons:**
+- Poor resolution or image quality
+- Missing error bars or sample sizes
+- Unclear or missing labels
+- Too many figures (exceeds venue limits)
+- Figures duplicate text information
+
+**ML conference specific evaluation:**
+- **Ablation studies**: Must demonstrate component contributions
+- **Baselines**: Comparison with relevant prior work required
+- **Error bars**: Confidence intervals/std dev expected
+- **Architecture diagrams**: Must be clear and informative
+- **Space efficiency**: Information density valued (page limits strict)
+
+### Caption/Legend Styles by Venue
+
+| Venue Type | Style | Example Features |
+|-----------|-------|------------------|
+| **Nature/Science** | Concise | Brief; *P<0.05; minimal methods |
+| **Medical** | Formal | Title case; 95% CIs; statistical tests spelled out |
+| **PLOS/BMC** | Detailed | Complete sentences; all abbreviations defined |
+| **ML conferences** | Technical | Architecture details; hyperparameters; dataset info |
+
+**ML conference caption example:**
+```
+Figure 1. Architecture of proposed model. (a) Encoder with 12 transformer layers.
+(b) Attention visualization. (c) Performance vs. baseline on ImageNet (error bars:
+95% CI over 3 runs).
+```
+- Technical precision
+- Hyperparameters when relevant
+- Dataset/experimental setup details
+- Compact to save space
+
+### Quick Adaptation Guide
+
+**When changing venues:**
+- **Journal → ML conference**: Compress figures; increase information density; add hyperparameters to captions
+- **ML conference → journal**: Expand captions; separate dense figures; add more methodological detail
+- **Specialist → broad journal**: Simplify; add explanatory panels; define terms in captions
+- **Broad → specialist journal**: Add technical detail; use field-standard plot types
+
+### Pre-Submission Figure/Table Checklist
+
+**Technical (all venues):**
+- [ ] Meets format requirements (PDF/EPS/TIFF)
+- [ ] Sufficient resolution (300+ dpi)
+- [ ] Fits venue dimensions/page limits
+- [ ] Self-explanatory captions
+- [ ] All symbols/abbreviations defined
+- [ ] Error bars defined; sample sizes noted
+
+**ML conferences additional:**
+- [ ] Figures fit in page limit (8-9 pages typical)
+- [ ] Comparison with baselines shown
+- [ ] Ablation studies included
+- [ ] Architecture diagram clear
+- [ ] Legible in grayscale
+
+## Checklist for Final Review
+
+### Before Submission
+
+**For every figure:**
+- [ ] High enough resolution (300+ dpi)?
+- [ ] Correct file format per journal requirements?
+- [ ] Correct dimensions for journal (single/double column)?
+- [ ] Meets journal's RGB/CMYK requirements?
+- [ ] Self-explanatory caption with all abbreviations defined?
+- [ ] Caption length within journal limits?
+- [ ] All symbols/colors explained in caption or legend?
+- [ ] Error bars included and defined?
+- [ ] Sample sizes noted?
+- [ ] Statistical tests described?
+- [ ] Axes labeled with units?
+- [ ] Readable text at final print size?
+- [ ] Works in grayscale or color-blind friendly?
+- [ ] Referenced in text in correct order?
+- [ ] Style matches target journal's published figures?
+
+**For every table:**
+- [ ] Clear, descriptive title?
+- [ ] Title capitalization matches journal style?
+- [ ] Column headers include units?
+- [ ] Appropriate numerical precision?
+- [ ] Abbreviations defined in footnotes?
+- [ ] Statistical methods explained?
+- [ ] Sample sizes included?
+- [ ] Consistent formatting with other tables?
+- [ ] Editable format (not image)?
+- [ ] Referenced in text in correct order?
+- [ ] Formatting matches target journal's tables?
+
+**Overall:**
+- [ ] Number of display items within journal limits?
+- [ ] Appropriate number of display items (~1 per 1000 words)?
+- [ ] No duplication between text, figures, and tables?
+- [ ] Consistent formatting across all display items?
+- [ ] All display items necessary (each tells important part of story)?
+- [ ] Visual style matches target journal?
+- [ ] Quality comparable to published examples in journal?
diff --git a/scientific-skills/scientific-writing/references/imrad_structure.md b/scientific-skills/scientific-writing/references/imrad_structure.md
new file mode 100644
index 0000000..800e571
--- /dev/null
+++ b/scientific-skills/scientific-writing/references/imrad_structure.md
@@ -0,0 +1,658 @@
+# IMRAD Structure Guide
+
+## Overview
+
+IMRAD (Introduction, Methods, Results, And Discussion) is the predominant organizational structure for scientific journal articles of original research. Adopted as the majority format since the 1970s, it is now the standard in medical, health, biological, chemical, engineering, and computer sciences.
+
+## Why IMRAD?
+
+The IMRAD structure mirrors the scientific method:
+- **Introduction**: What question did you ask?
+- **Methods**: How did you study it?
+- **Results**: What did you find?
+- **Discussion**: What does it mean?
+
+This logical flow makes scientific papers easier to write, read, and evaluate.
+
+## Complete Manuscript Components
+
+A full scientific manuscript typically includes these sections in order:
+
+1. **Title**
+2. **Abstract**
+3. **Introduction**
+4. **Methods** (also called Materials and Methods, Methodology)
+5. **Results**
+6. **Discussion** (sometimes combined with Results)
+7. **Conclusion** (sometimes part of Discussion)
+8. **Acknowledgments**
+9. **References**
+10. **Supplementary Materials** (if applicable)
+
+## Title
+
+### Purpose
+Attract readers and accurately represent the paper's content.
+
+### Guidelines
+- Be concise yet descriptive (typically 10-15 words)
+- Include key variables and the relationship studied
+- Avoid abbreviations, jargon, and question formats (unless the journal allows)
+- Make it specific enough to distinguish from other studies
+- Include key search terms for discoverability
+
+### Examples
+- Good: "Effects of High-Intensity Interval Training on Cardiovascular Function in Older Adults"
+- Too vague: "Exercise and Health"
+- Too detailed: "A Randomized Controlled Trial Examining the Effects of High-Intensity Interval Training Compared to Moderate Continuous Training on Cardiovascular Function Measured by VO2 Max in Adults Aged 60-75 Years"
+
+## Abstract
+
+### Purpose
+Provide a complete, standalone summary enabling readers to decide if the full paper is relevant to them.
+
+### Structure
+Most journals now require **structured abstracts** with labeled sections:
+
+**Background/Objective**: Why was the study needed? What was the aim?
+- 1-2 sentences
+- State the research problem and objective
+
+**Methods**: How was it done?
+- 2-4 sentences
+- Study design, participants, key procedures, analysis methods
+
+**Results**: What was found?
+- 3-5 sentences
+- Main findings with key statistics
+- Present the most important numerical data
+
+**Conclusions**: What does it mean?
+- 1-2 sentences
+- Interpretation and implications
+- Avoid overstating or adding new information
+
+### Length
+- Typically 100-250 words (check journal requirements)
+- Some journals allow up to 300 words
+
+### Key Rules
+- Write the abstract **last** (after completing all other sections)
+- Make it fully understandable without reading the paper
+- Do not cite references in the abstract
+- Avoid abbreviations or define them at first use
+- Use past tense for methods and results, present tense for conclusions
+- Include key quantitative results with statistical measures
+
+### Example Structure
+```
+Background: Hospital-acquired infections remain a major cause of morbidity. This study
+evaluated the effectiveness of a new disinfection protocol in reducing infection rates.
+
+Methods: We conducted a 12-month before-after study in a 500-bed teaching hospital.
+Environmental surfaces were cultured monthly, and infection rates were tracked via
+surveillance data. The intervention involved UV-C disinfection added to standard cleaning.
+
+Results: Post-intervention, surface contamination decreased by 47% (95% CI: 38-56%,
+p<0.001), and catheter-associated urinary tract infections declined from 3.2 to 1.8
+per 1000 catheter-days (RR=0.56, 95% CI: 0.38-0.83, p=0.004). No adverse effects were
+observed.
+
+Conclusions: UV-C disinfection significantly reduced environmental contamination and
+infection rates. This intervention may be a valuable addition to hospital infection
+control programs.
+```
+
+## Introduction
+
+### Purpose
+Convince readers that the research addresses an important question using an appropriate approach.
+
+### Structure and Content
+
+**Paragraph 1: The Big Picture**
+- Establish the broad research area
+- Explain why this topic matters
+- Use present tense for established facts
+- Keep it accessible to non-specialists
+
+**Paragraphs 2-3: Narrowing Down**
+- Review relevant prior research
+- Show what is already known
+- Identify controversies or limitations in existing work
+- Create a logical progression toward the gap
+
+**Paragraph 4: The Gap**
+- Explicitly identify what remains unknown
+- Explain why this knowledge gap is problematic
+- Connect the gap to the big picture importance
+
+**Final Paragraph: This Study**
+- State the specific research question or hypothesis
+- Describe the overall approach briefly
+- Explain how this study addresses the gap
+- Optional: Preview key findings (some journals discourage this)
+
+### Length
+- Typically 1.5-2 pages (depending on journal)
+- Usually 4-5 paragraphs
+- Shorter for letters/brief communications
+
+### Verb Tense
+- **Present tense**: Established facts ("Exercise improves cardiovascular health")
+- **Past tense**: Previous studies and their findings ("Smith et al. found that...")
+- **Present/past tense**: Your study aims ("This study investigates..." or "This study investigated...")
+
+### Common Mistakes to Avoid
+- Starting too broad (e.g., "Since the beginning of time...")
+- Exhaustive literature review (save for review articles)
+- Citing irrelevant or outdated references
+- Failing to identify a clear gap
+- Weak justification for the study
+- Not stating a clear research question or hypothesis
+- Including methods or results (these belong in later sections)
+
+### Key Questions to Answer
+1. What do we know about this topic?
+2. What don't we know? (the gap)
+3. Why does this gap matter?
+4. What did this study aim to find out?
+
+## Methods
+
+### Purpose
+Provide sufficient detail for others to replicate the study and evaluate its validity.
+
+### Key Principle
+Another expert in the field should be able to repeat your experiment exactly as you performed it.
+
+### Standard Subsections
+
+#### Study Design
+- State the overall design (e.g., randomized controlled trial, cohort study, cross-sectional survey)
+- Justify the design choice if not obvious
+- Mention blinding, randomization, or controls if applicable
+
+#### Participants/Subjects/Sample
+- Define the population of interest
+- Describe inclusion and exclusion criteria precisely
+- Report sample size and how it was determined (power analysis)
+- Explain recruitment methods and setting
+- For animals: specify species, strain, age, sex, housing conditions
+
+#### Materials and Equipment
+- List all materials, reagents, and equipment used
+- Include manufacturer names and locations (in parentheses)
+- Specify catalog numbers for specialized items
+- Report software names and versions
+
+#### Procedures
+- Describe what was done in chronological order
+- Include sufficient detail for replication
+- Use subheadings to organize complex procedures
+- Specify timing (e.g., "incubated for 2 hours at 37°C")
+- For surveys/interviews: describe instruments, validation, administration
+
+#### Measurements and Outcomes
+- Define all variables measured
+- Specify primary and secondary outcomes
+- Describe measurement instruments and their validity
+- Include units of measurement
+
+#### Statistical Analysis
+- Name all statistical tests used
+- Justify test selection
+- State significance level (typically α = 0.05)
+- Report power analysis for sample size
+- Name statistical software with version
+- Describe handling of missing data
+- Mention adjustments for multiple comparisons if applicable
+
+#### Ethical Considerations
+- State IRB/ethics committee approval (with approval number)
+- Mention informed consent procedures
+- For human studies: state adherence to Helsinki Declaration
+- For animal studies: state adherence to relevant guidelines (e.g., ARRIVE)
+
+### Length
+- Typically 2-4 pages
+- Proportional to study complexity
+
+### Verb Tense
+- **Past tense** for actions you performed ("We measured...", "Participants completed...")
+- **Present tense** for established procedures ("PCR amplifies...", "The questionnaire contains...")
+
+### Common Mistakes
+- Insufficient detail for replication
+- Methods appearing for the first time in Results
+- Including results or discussion
+- Missing statistical tests
+- Undefined abbreviations
+- Lack of ethical approval statement
+
+## Results
+
+### Purpose
+Present the findings objectively without interpretation.
+
+### Key Principle
+Show, don't interpret. Save interpretation for the Discussion.
+
+### Structure and Content
+
+**Opening Paragraph**
+- Describe the participants/sample characteristics
+- Report recruitment flow (e.g., screened, enrolled, completed)
+- Consider including a CONSORT-style flow diagram
+
+**Subsequent Paragraphs**
+- Present results in logical order (usually primary outcome first)
+- Follow the order of objectives stated in Introduction
+- Organize by theme or by chronology, depending on what's clearest
+- Reference figures and tables by number
+
+**Each Finding Should Include:**
+- The observed result
+- The direction of the effect
+- The magnitude of the effect
+- The statistical significance
+- The confidence interval
+
+**Example**: "Mean systolic blood pressure decreased by 12 mmHg in the intervention group compared to 3 mmHg in controls (difference: 9 mmHg, 95% CI: 4-14 mmHg, p=0.002)."
+
+### Integration with Figures and Tables
+
+**When to Use:**
+- **Figures**: Trends, patterns, distributions, comparisons, relationships
+- **Tables**: Precise values, demographic data, multiple variables
+
+**How to Reference:**
+- "Figure 1 shows the distribution of..." (not "Figure 1 below")
+- "Table 2 presents baseline characteristics..."
+- Don't repeat all table data in text; highlight key findings
+- Each figure/table should be referenced in text
+
+### Figures and Tables Guidelines
+- Number consecutively in order of mention
+- Include complete, standalone captions
+- Define all abbreviations in caption or footnote
+- Report sample sizes (n)
+- Indicate statistical significance (*, p-values)
+- Use consistent formatting
+
+### Statistical Reporting
+
+**Required Elements:**
+- Test statistic (t, F, χ², etc.)
+- Degrees of freedom
+- p-value (exact if p > 0.001, otherwise report as "p < 0.001")
+- Effect size and confidence interval
+- Sample sizes
+
+**Example**: "Groups differed significantly on test performance (t(48) = 3.21, p = 0.002, Cohen's d = 0.87, 95% CI: 0.34-1.40)."
+
+### Length
+- Typically 2-4 pages
+- Roughly equivalent to Methods length
+
+### Verb Tense
+- **Past tense** for your findings ("The mean was...", "Participants showed...")
+
+### Common Mistakes
+- Interpreting results (save for Discussion)
+- Repeating all table/figure data in text
+- Presenting new methods
+- Insufficient statistical detail
+- Inconsistent units or notation
+- Not addressing negative or unexpected findings
+- Selective reporting (all tested hypotheses should be reported)
+
+### Organization Strategies
+
+**By Objective:**
+```
+Effect of intervention on primary outcome
+Effect of intervention on secondary outcome A
+Effect of intervention on secondary outcome B
+```
+
+**By Analysis Type:**
+```
+Descriptive statistics
+Univariate analyses
+Multivariate analyses
+```
+
+**Chronological:**
+```
+Baseline characteristics
+Short-term outcomes (1 month)
+Long-term outcomes (6 months)
+```
+
+## Discussion
+
+### Purpose
+Interpret findings, relate them to existing knowledge, acknowledge limitations, and propose future directions.
+
+### Structure and Content
+
+**Paragraph 1: Summary of Main Findings**
+- Restate the primary objective or hypothesis
+- Summarize the principal findings in 2-4 sentences
+- Avoid repeating details from Results
+- State clearly whether the hypothesis was supported
+
+**Paragraphs 2-4: Interpretation in Context**
+- Compare your findings with previous research
+- Explain agreements and disagreements with prior work
+- Propose mechanisms or explanations for findings
+- Discuss unexpected results
+- Consider alternative explanations
+- Address whether findings support or refute existing theories
+
+**Paragraph 5: Strengths and Limitations**
+- Acknowledge study limitations honestly
+- Explain how limitations might affect interpretation
+- Mention study strengths (design, sample, methods)
+- Avoid generic limitations ("larger sample needed")—be specific
+
+**Paragraph 6: Implications**
+- Clinical implications (for medical research)
+- Practical applications
+- Policy implications
+- Theoretical contributions
+
+**Final Paragraph: Conclusions and Future Directions**
+- Summarize the take-home message
+- Suggest specific future research to address gaps or limitations
+- End with a strong concluding statement
+
+### Length
+- Typically 3-5 pages
+- Usually the longest section
+
+### Verb Tense
+- **Past tense**: Your study findings ("We found that...", "The results showed...")
+- **Present tense**: Established facts and your interpretations ("This suggests that...", "These findings indicate...")
+- **Future tense**: Implications and future research ("Future studies should investigate...")
+
+### Discussion Strategies
+
+**Comparing to Prior Work:**
+```
+"Our finding of a 30% reduction in symptoms aligns with Smith et al. (2023), who
+reported a 28% reduction using a similar intervention. However, Jones et al. (2022)
+found no significant effect, possibly due to their use of a less intensive protocol."
+```
+
+**Proposing Mechanisms:**
+```
+"The observed improvement in cognitive function may result from increased cerebral
+blood flow, as evidenced by the concurrent increase in functional MRI signals in the
+prefrontal cortex. This interpretation is consistent with the vascular hypothesis of
+cognitive enhancement."
+```
+
+**Acknowledging Limitations:**
+```
+"The cross-sectional design prevents causal inference. Additionally, the convenience
+sample from a single academic medical center may limit generalizability to community
+settings. Self-reported measures may introduce recall bias, though we attempted to
+minimize this through structured interviews."
+```
+
+### Common Mistakes
+- Simply repeating results without interpretation
+- Over-interpreting findings or claiming causation without warrant
+- Ignoring inconsistent or negative findings
+- Failing to compare with existing literature
+- Introducing new data or methods
+- Generic or superficial discussion of limitations
+- Overgeneralization beyond the study population
+- Missing the "so what?"—failing to explain significance
+
+### Key Questions to Answer
+1. What do these findings mean?
+2. How do they compare to prior research?
+3. Why might differences exist?
+4. What are alternative explanations?
+5. What are the limitations?
+6. What are the practical implications?
+7. What should future research investigate?
+
+## Conclusion
+
+### Purpose
+Provide a concise summary of key findings and their significance.
+
+### Placement
+- May be a separate section or the final paragraph of Discussion (check journal requirements)
+
+### Content
+- 1-2 paragraphs maximum
+- Restate the main finding(s)
+- Emphasize the significance or implications
+- End with a strong, memorable statement
+- Do NOT introduce new information
+
+### Example
+```
+This randomized trial demonstrates that a 12-week mindfulness intervention significantly
+reduces anxiety symptoms in college students, with effects persisting at 6-month follow-up.
+These findings support the integration of mindfulness-based programs into university mental
+health services. Given the scalability and cost-effectiveness of group-based mindfulness
+training, this approach offers a promising strategy to address the growing mental health
+crisis in higher education.
+```
+
+## Additional Sections
+
+### Acknowledgments
+- Thank funding sources (with grant numbers)
+- Acknowledge substantial contributions not qualifying for authorship
+- Thank those who provided materials, equipment, or assistance
+- Declare any conflicts of interest
+
+### References
+- Format according to journal style (see `citation_styles.md`)
+- Verify all citations are accurate
+- Ensure all citations appear in text and vice versa
+- Typical range: 20-50 references for original research
+
+### Supplementary Materials
+- Additional figures, tables, or data sets
+- Detailed protocols or questionnaires
+- Video or audio files
+- Large datasets or code repositories
+
+## Tense Usage Summary
+
+| Section | Verb Tense |
+|---------|-----------|
+| Abstract - Background | Present (established facts) or past (prior studies) |
+| Abstract - Methods | Past |
+| Abstract - Results | Past |
+| Abstract - Conclusions | Present |
+| Introduction - General background | Present |
+| Introduction - Prior studies | Past |
+| Introduction - Your objectives | Present or past |
+| Methods | Past (your actions), present (general procedures) |
+| Results | Past |
+| Discussion - Your findings | Past |
+| Discussion - Interpretations | Present |
+| Discussion - Prior work | Present or past |
+| Conclusion | Present |
+
+## IMRAD Variations
+
+### Combined Results and Discussion
+- Some journals allow or require this format
+- Interweaves presentation and interpretation
+- Each result is presented then immediately discussed
+- Useful for complex studies with multiple experiments
+
+### IMRaD without separate Conclusion
+- Conclusion integrated into final Discussion paragraph
+- Common in many journals
+
+### Extended IMRAD (ILMRaD)
+- Adds "Literature Review" as separate section
+- More common in theses and dissertations
+
+## Adapting IMRAD to Different Study Types
+
+### Clinical Trials
+- Add CONSORT flow diagram in Results
+- Include trial registration number in Methods
+- Report adverse events in Results
+
+### Systematic Reviews/Meta-Analyses
+- Methods describes search strategy and inclusion criteria
+- Results includes PRISMA flow diagram and synthesis
+- May have additional sections (risk of bias assessment)
+
+### Case Reports
+- Introduction: background on the condition
+- Case Presentation: replaces Methods and Results
+- Discussion: relates case to literature
+
+### Observational Studies
+- Follow STROBE guidelines
+- Careful attention to potential confounders in Methods
+- Discussion addresses causality limitations
+
+## Venue-Specific Structure Expectations
+
+### Journal vs. Conference Formats
+
+| Venue Type | Length | Structure | Methods Placement | Key Focus |
+|-----------|--------|-----------|-------------------|-----------|
+| **Nature/Science** | 2,000-4,500 words | Modified IMRAD | Supplement | Broad significance |
+| **Medical** | 2,700-3,500 words | Strict IMRAD | Main text | Clinical outcomes |
+| **Field journals** | 3,000-6,000 words | Standard IMRAD | Main text | Technical depth |
+| **ML conferences** | 8-9 pages (~6,000 words) | Intro-Method-Experiments-Conclusion | Main text (concise) | Novel contribution |
+
+### ML Conference Structure (NeurIPS/ICML/ICLR)
+
+**Typical 8-page structure:**
+1. **Abstract** (150-200 words): Problem, method, key results
+2. **Introduction** (1 page): Motivation, contribution summary, related work overview
+3. **Method** (2-3 pages): Technical approach, architecture, algorithms
+4. **Experiments** (2-3 pages): Setup, datasets, baselines, results, ablations
+5. **Related Work** (0.5-1 page, often in appendix): Detailed literature comparison
+6. **Conclusion** (0.25-0.5 pages): Summary, limitations, future work
+7. **References** (within page limit or separate depending on conference)
+8. **Appendix/Supplement** (unlimited): Additional experiments, proofs, details
+
+**Key differences from journals:**
+- **Contribution bullets**: Often numbered list in intro (e.g., "Our contributions are: (1)... (2)... (3)...")
+- **No separate Results/Discussion**: Integrated in Experiments section
+- **Ablation studies**: Critical component showing what matters
+- **Computational requirements**: Often required (training time, GPUs, memory)
+- **Code availability**: Increasingly expected
+
+### Section Length Proportions
+
+| Venue | Intro | Methods | Results/Experiments | Discussion/Conclusion |
+|-------|-------|---------|---------------------|----------------------|
+| **Nature/Science** | 10% | 15%* | 40% | 35% |
+| **Medical (NEJM/JAMA)** | 10% | 25% | 30% | 35% |
+| **Field journals** | 20% | 25% | 30% | 25% |
+| **ML conferences** | 12-15% | 30-35% | 40-45% | 5-8% |
+
+*Methods often in supplement for Nature/Science
+
+**Key medical journal features:**
+- NEJM/Lancet/JAMA: Strict IMRAD; clinical focus; structured Discussion; CONSORT/STROBE compliance
+- Clear primary/secondary outcomes; statistical pre-specification
+
+**Key ML conference features:**
+- Numbered contribution list in intro
+- Method details with pseudocode/equations
+- Extensive experiments: main results, ablations, analysis
+- Brief conclusion (limitations noted)
+- Related work often in appendix
+
+### Writing Style by Venue
+
+| Venue | Audience | Intro Focus | Methods Detail | Results/Experiments | Discussion/Conclusion |
+|-------|----------|-------------|----------------|---------------------|----------------------|
+| **Nature/Science** | Non-specialists | Broad significance | Brief, supplement | Story-driven | Broad implications |
+| **Medical** | Clinicians | Clinical problem | Comprehensive | Primary outcome first | Clinical relevance |
+| **Specialized** | Experts | Field context | Full technical | By experiment | Mechanistic depth |
+| **ML conferences** | ML researchers | Novel contribution | Reproducible | Baselines, ablations | Brief, limitations |
+
+**ML conference emphasis:**
+- **Introduction**: Clear problem statement; numbered contributions; positioning vs. prior work
+- **Method**: Mathematical notation; pseudocode; architecture diagrams; complexity analysis
+- **Experiments**: Datasets described; multiple baselines; ablation studies; error analysis
+- **Conclusion**: Summary; acknowledged limitations; broader impact (if required)
+
+### Evaluation Across Venues
+
+**What gets checked:**
+- **Fit**: Appropriate for venue scope and audience
+- **Length**: Within limits (strict for conferences)
+- **Clarity**: Writing quality sufficient; claims supported
+- **Reproducibility**: Methods enable replication
+- **Completeness**: All outcomes reported; limitations acknowledged
+
+**Common rejection reasons:**
+- Insufficient significance for venue
+- Methods lack detail for reproduction
+- Results don't support claims
+- Discussion overstates findings
+- Page/word limits exceeded (conferences strict)
+
+**ML conference specific evaluation:**
+- Clear problem formulation and motivation
+- Novelty and contribution well-articulated
+- Baselines comprehensive and fair
+- Ablation studies demonstrate what works
+- Code/data availability (increasingly required)
+- Reproducibility information (seeds, hyperparameters)
+
+### Quick Adaptation Guide
+
+**Journal → ML conference:**
+- Condense intro; add numbered contributions
+- Methods: keep concise, add pseudocode
+- Combine Results+Discussion → Experiments section
+- Add extensive ablations and baseline comparisons
+- Brief conclusion with limitations
+
+**ML conference → Journal:**
+- Expand introduction with more background
+- Separate Methods section with full details
+- Split Experiments into Results and Discussion
+- Remove contribution numbering
+- Expand limitations discussion
+
+**Specialist → Broad journal:**
+- Simplify intro; emphasize broad significance
+- Move technical methods to supplement
+- Story-driven results organization
+- Lead discussion with implications
+
+**Broad → Specialist:**
+- Add detailed literature review
+- Full methods in main text
+- Organize results by experiment
+- Add mechanistic discussion depth
+
+### Pre-Submission Structure Checklist
+
+**All venues:**
+- [ ] Word/page count within limits
+- [ ] Section proportions appropriate
+- [ ] Writing style matches venue
+- [ ] Methods enable reproducibility
+- [ ] Limitations acknowledged
+
+**ML conferences add:**
+- [ ] Contributions clearly listed
+- [ ] Ablation studies included
+- [ ] Baselines comprehensive
+- [ ] Hyperparameters/seeds reported
+- [ ] Code availability statement
diff --git a/scientific-skills/scientific-writing/references/reporting_guidelines.md b/scientific-skills/scientific-writing/references/reporting_guidelines.md
new file mode 100644
index 0000000..e986470
--- /dev/null
+++ b/scientific-skills/scientific-writing/references/reporting_guidelines.md
@@ -0,0 +1,748 @@
+# Reporting Guidelines for Scientific Studies
+
+## Overview
+
+Reporting guidelines are evidence-based recommendations for what information should be included when reporting specific types of research studies. They provide checklists and flow diagrams to ensure complete, accurate, and transparent reporting, which is essential for readers to assess study validity and for other researchers to replicate the work.
+
+The EQUATOR Network (Enhancing the QUAlity and Transparency Of health Research) maintains a comprehensive library of reporting guidelines. Using appropriate reporting guidelines improves manuscript quality and increases the likelihood of publication acceptance.
+
+## Why Use Reporting Guidelines?
+
+### Benefits
+
+**For authors:**
+- Ensures nothing important is forgotten
+- Increases acceptance rates
+- Improves manuscript organization
+- Reduces reviewer requests for additional information
+
+**For readers and reviewers:**
+- Enables critical appraisal of study validity
+- Facilitates systematic reviews and meta-analyses
+- Improves understanding of what was actually done
+
+**For science:**
+- Enhances reproducibility
+- Reduces research waste
+- Improves transparency
+- Enables better evidence synthesis
+
+### When to Use
+
+- **During study design**: Many guidelines include protocol versions (e.g., SPIRIT for trial protocols)
+- **During manuscript drafting**: Use checklist to ensure all items are covered
+- **Before submission**: Verify adherence and often submit checklist with manuscript
+- **Many journals require**: Reporting guideline checklists as part of submission
+
+## Major Reporting Guidelines by Study Type
+
+### CONSORT - Randomized Controlled Trials
+
+**Full name:** Consolidated Standards of Reporting Trials
+
+**When to use:** Any randomized controlled trial (RCT), including pilot and feasibility trials
+
+**Latest version:** CONSORT 2010 (updated statement)
+
+**Key components:**
+- **Checklist**: 25 items covering title, abstract, introduction, methods, results, discussion
+- **Flow diagram**: Participant flow through enrollment, allocation, follow-up, and analysis
+
+**Main checklist items:**
+1. Title identifies study as randomized trial
+2. Structured abstract
+3. Scientific background and rationale
+4. Specific objectives and hypotheses
+5. Trial design description (parallel, crossover, factorial, etc.)
+6. Eligibility criteria for participants
+7. Settings and locations of data collection
+8. Interventions described in sufficient detail for replication
+9. Primary and secondary outcomes defined
+10. Sample size determination and power calculation
+11. Randomization sequence generation
+12. Allocation concealment mechanism
+13. Blinding implementation
+14. Statistical methods
+15. Participant flow with reasons for dropouts
+16. Recruitment dates and follow-up dates
+17. Baseline characteristics table
+18. Analysis results for each outcome
+19. Harms and adverse events
+20. Trial limitations
+21. Generalizability
+22. Interpretation consistent with results
+23. Trial registration number
+24. Full protocol access
+25. Funding sources
+
+**Extensions for specific designs:**
+- CONSORT for cluster randomized trials
+- CONSORT for non-inferiority and equivalence trials
+- CONSORT for pragmatic trials
+- CONSORT for crossover trials
+- CONSORT for N-of-1 trials
+- CONSORT for stepped wedge designs
+
+**Where to access:** http://www.consort-statement.org/
+
+### STROBE - Observational Studies
+
+**Full name:** Strengthening the Reporting of Observational Studies in Epidemiology
+
+**When to use:** Cohort studies, case-control studies, and cross-sectional studies
+
+**Latest version:** STROBE 2007 (widely adopted standard)
+
+**Key study designs covered:**
+- **Cohort**: Follow exposed and unexposed groups forward in time
+- **Case-control**: Compare exposure history between cases and controls
+- **Cross-sectional**: Measure exposure and outcome simultaneously
+
+**Main checklist items (22 items):**
+1. Title and abstract indicate study design
+2. Background and rationale
+3. Objectives
+4. Study design with rationale
+5. Setting, locations, and dates
+6. Eligibility criteria and selection methods
+7. Variables clearly defined (outcomes, exposures, confounders)
+8. Data sources and measurement methods
+9. Bias management strategies
+10. Study size justification
+11. Handling of quantitative variables
+12. Statistical methods including confounding and interactions
+13. Sensitivity analyses
+14. Participant flow with reasons for non-participation
+15. Descriptive data including follow-up time
+16. Outcome data
+17. Main results with unadjusted and adjusted estimates
+18. Other analyses (subgroups, sensitivity analyses)
+19. Key results summary
+20. Limitations with potential bias discussion
+21. Interpretation and generalizability
+22. Funding sources and role
+
+**Extensions:**
+- STROBE-ME (Molecular Epidemiology)
+- RECORD (Routinely collected health data)
+- STROBE-RDS (Respondent-driven sampling)
+
+**Where to access:** https://www.strobe-statement.org/
+
+### PRISMA - Systematic Reviews and Meta-Analyses
+
+**Full name:** Preferred Reporting Items for Systematic Reviews and Meta-Analyses
+
+**When to use:** Systematic reviews with or without meta-analysis
+
+**Latest version:** PRISMA 2020 (significant update)
+
+**Key components:**
+- **Checklist**: 27 items covering all sections
+- **Flow diagram**: Study selection process
+
+**Main sections:**
+1. **Title**: Identify as systematic review/meta-analysis
+2. **Abstract**: Structured summary
+3. **Introduction**: Rationale and objectives
+4. **Methods**:
+ - Eligibility criteria
+ - Information sources (databases, dates)
+ - Search strategy (full strategy for at least one database)
+ - Selection process
+ - Data collection process
+ - Data items extracted
+ - Risk of bias assessment
+ - Effect measures
+ - Synthesis methods
+ - Reporting bias assessment
+ - Certainty assessment (e.g., GRADE)
+5. **Results**:
+ - Study selection flow diagram
+ - Study characteristics
+ - Risk of bias assessment results
+ - Synthesis results (meta-analysis if applicable)
+ - Reporting biases
+ - Certainty of evidence
+6. **Discussion**:
+ - Limitations
+ - Interpretation
+ - Implications
+
+**Extensions:**
+- PRISMA for Abstracts
+- PRISMA for Protocols (PRISMA-P)
+- PRISMA for Network Meta-Analyses
+- PRISMA for Scoping Reviews (PRISMA-ScR)
+- PRISMA for Individual Patient Data
+- PRISMA for Diagnostic Test Accuracy
+- PRISMA for Equity-focused reviews
+
+**Where to access:** http://www.prisma-statement.org/
+
+### SPIRIT - Study Protocols for Clinical Trials
+
+**Full name:** Standard Protocol Items: Recommendations for Interventional Trials
+
+**When to use:** Protocols for randomized trials and other planned intervention studies
+
+**Latest version:** SPIRIT 2013
+
+**Purpose:** Ensure trial protocols contain complete descriptions before trial begins
+
+**Main checklist items (33 items):**
+- Administrative information (title, trial registration, funding)
+- Introduction (background, rationale, objectives)
+- Methods: Trial design
+ - Study setting
+ - Eligibility criteria
+ - Interventions in detail
+ - Outcomes (primary and secondary)
+ - Participant timeline
+ - Sample size calculation
+ - Recruitment strategy
+ - Allocation and randomization
+ - Blinding
+ - Data collection methods
+ - Data management
+ - Statistical methods
+ - Monitoring (data monitoring committee)
+ - Harms reporting
+ - Auditing
+- Ethics and dissemination
+ - Ethics approval
+ - Consent procedures
+ - Confidentiality
+ - Dissemination plans
+
+**Where to access:** https://www.spirit-statement.org/
+
+### STARD - Diagnostic Accuracy Studies
+
+**Full name:** Standards for Reporting of Diagnostic Accuracy Studies
+
+**When to use:** Studies evaluating diagnostic test accuracy
+
+**Latest version:** STARD 2015
+
+**Main checklist items (30 items):**
+1. Study design identification
+2. Background information and objectives
+3. Study design description
+4. Participant selection criteria and recruitment
+5. Data collection methods
+6. Index test description and execution
+7. Reference standard description
+8. Rationale for choosing reference standard
+9. Test result definition and cutoffs
+10. Flow of participants with timing
+11. Baseline demographic and clinical characteristics
+12. Cross-tabulation of index test results by reference standard
+13. Estimates of diagnostic accuracy with confidence intervals
+14. Handling of indeterminate results
+15. Adverse events from testing
+
+**Flow diagram:** Shows participant flow and test results
+
+**Where to access:** https://www.equator-network.org/reporting-guidelines/stard/
+
+### TRIPOD - Prediction Model Studies
+
+**Full name:** Transparent Reporting of a multivariable prediction model for Individual Prognosis Or Diagnosis
+
+**When to use:** Studies developing, validating, or updating prediction models
+
+**Latest version:** TRIPOD 2015
+
+**Types of studies:**
+- Model development only
+- Model development with validation
+- External validation of existing model
+- Model update
+
+**Main checklist items (22 items):**
+1. Title identifies study as prediction model study
+2. Abstract summarizes key elements
+3. Background and objectives
+4. Data source and participants
+5. Outcome definition
+6. Predictors (candidate and selected)
+7. Sample size justification
+8. Missing data handling
+9. Model building procedure
+10. Model specification (equation or algorithm)
+11. Model performance measures
+12. Risk groups if used
+13. Participant flow diagram
+14. Model development results
+15. Model performance
+16. Model updating if applicable
+
+**Where to access:** https://www.tripod-statement.org/
+
+### ARRIVE - Animal Research
+
+**Full name:** Animal Research: Reporting of In Vivo Experiments
+
+**When to use:** All in vivo animal studies
+
+**Latest version:** ARRIVE 2.0 (2020 update)
+
+**Two sets of items:**
+
+**ARRIVE Essential 10** (minimum requirements):
+1. Study design
+2. Sample size calculation
+3. Inclusion and exclusion criteria
+4. Randomization
+5. Blinding
+6. Outcome measures
+7. Statistical methods
+8. Experimental animals (species, strain, sex, age)
+9. Experimental procedures
+10. Results and interpretation
+
+**ARRIVE Recommended Set** (additional items for full reporting):
+- Abstract, background, objectives
+- Ethics statement
+- Housing and husbandry
+- Animal care and monitoring
+- Interpretation and generalizability
+- Protocol registration
+- Data access
+
+**Where to access:** https://arriveguidelines.org/
+
+### CARE - Case Reports
+
+**Full name:** CAse REport Guidelines
+
+**When to use:** Case reports and case series
+
+**Latest version:** CARE 2013
+
+**Main checklist items (13 items):**
+1. Title with "case report"
+2. Abstract summarizing case
+3. Introduction with case background
+4. Patient information (demographics, primary concern)
+5. Clinical findings
+6. Timeline of events
+7. Diagnostic assessment
+8. Therapeutic intervention
+9. Follow-up and outcomes
+10. Discussion with strengths and limitations
+11. Patient perspective
+12. Informed consent
+
+**Where to access:** https://www.care-statement.org/
+
+### SQUIRE - Quality Improvement Studies
+
+**Full name:** Standards for QUality Improvement Reporting Excellence
+
+**When to use:** Healthcare quality improvement reports
+
+**Latest version:** SQUIRE 2.0 (2015)
+
+**Main sections (18 items):**
+1. Title and abstract
+2. Introduction (problem description, available knowledge, rationale, objectives)
+3. Methods (context, intervention, study design, measures, analysis, ethical review)
+4. Results (intervention, outcomes)
+5. Discussion (summary, interpretation, limitations, conclusions)
+6. Other information (funding)
+
+**Where to access:** http://www.squire-statement.org/
+
+### CHEERS - Economic Evaluations
+
+**Full name:** Consolidated Health Economic Evaluation Reporting Standards
+
+**When to use:** Health economic evaluations
+
+**Latest version:** CHEERS 2022 (major update from 2013)
+
+**Main checklist items (28 items):**
+1. Title identification as economic evaluation
+2. Abstract
+3. Background and objectives
+4. Target population and subgroups
+5. Setting and location
+6. Study perspective
+7. Comparators
+8. Time horizon
+9. Discount rate
+10. Selection of outcomes
+11. Measurement of effectiveness
+12. Measurement and valuation of costs
+13. Currency and price adjustments
+14. Choice of model
+15. Assumptions
+16. Analytical methods
+
+**Where to access:** https://www.equator-network.org/reporting-guidelines/cheers/
+
+### SRQR - Qualitative Research
+
+**Full name:** Standards for Reporting Qualitative Research
+
+**When to use:** Qualitative and mixed methods research
+
+**Latest version:** SRQR 2014
+
+**Main sections:**
+- Title and abstract
+- Introduction (problem formulation, purpose)
+- Methods (qualitative approach, researcher characteristics, context, sampling strategy, ethical issues, data collection, data analysis, trustworthiness)
+- Results (synthesis and interpretation, links to empirical data)
+- Discussion (limitations, implications)
+
+**Alternative:** COREQ (Consolidated criteria for reporting qualitative research) for interviews and focus groups
+
+**Where to access:** https://www.equator-network.org/reporting-guidelines/srqr/
+
+## How to Use Reporting Guidelines
+
+### During Study Planning
+
+1. **Identify relevant guideline** based on study design
+2. **Review checklist items** that require planning (e.g., randomization, blinding)
+3. **Design study** to ensure all required elements will be captured
+4. **Consider protocol guidelines** (e.g., SPIRIT for trials)
+
+### During Manuscript Drafting
+
+1. **Download checklist** from guideline website
+2. **Work through each item** systematically
+3. **Note where each item is addressed** in manuscript (page/line numbers)
+4. **Revise manuscript** to include missing items
+5. **Use flow diagrams** as appropriate
+
+### Before Submission
+
+1. **Complete formal checklist** with page numbers
+2. **Review all items** are adequately addressed
+3. **Include checklist** with submission if journal requires
+4. **Note guideline adherence** in cover letter or methods
+
+### Example Checklist Entry
+
+```
+Item 7: Eligibility criteria for participants, and the settings and locations where the data were collected
+Page 6, lines 112-125: "Participants were community-dwelling adults aged 60-85 years with mild cognitive impairment (MCI) as defined by Petersen criteria. Exclusion criteria included dementia diagnosis, major psychiatric disorders, or unstable medical conditions. Recruitment occurred from three memory clinics in Boston, MA, between January 2022 and December 2023."
+```
+
+## Finding the Right Guideline
+
+### EQUATOR Network Search
+
+**Website:** https://www.equator-network.org/
+
+**How to use:**
+1. Select your study design from the wizard
+2. Browse by health research category
+3. Search for specific keywords
+4. Filter by guideline status (development stage)
+
+### By Study Design
+
+| If your study is a... | Use this guideline |
+|----------------------|-------------------|
+| Randomized controlled trial | CONSORT |
+| Cohort, case-control, or cross-sectional study | STROBE |
+| Systematic review or meta-analysis | PRISMA |
+| Protocol for a trial | SPIRIT |
+| Diagnostic accuracy study | STARD |
+| Prediction model study | TRIPOD |
+| Animal study | ARRIVE |
+| Case report | CARE |
+| Quality improvement study | SQUIRE |
+| Economic evaluation | CHEERS |
+| Qualitative research | SRQR or COREQ |
+
+### Multiple Guidelines
+
+**Some studies may require multiple guidelines:**
+
+**Example 1:** Pilot RCT with qualitative component
+- CONSORT for quantitative arm
+- SRQR for qualitative component
+
+**Example 2:** Systematic review of diagnostic tests
+- PRISMA for review methods
+- STARD considerations for included studies
+
+## Extensions and Adaptations
+
+Many reporting guidelines have extensions for specific contexts:
+
+### CONSORT Extensions (examples)
+
+- **CONSORT for Abstracts**: Structured abstracts for RCT reports
+- **CONSORT for Harms**: Reporting adverse events
+- **CONSORT-EHEALTH**: eHealth interventions
+- **CONSORT-SPI**: Social and psychological interventions
+
+### PRISMA Extensions (examples)
+
+- **PRISMA-P**: Protocols for systematic reviews
+- **PRISMA for Abstracts**: Conference abstracts
+- **PRISMA-NMA**: Network meta-analyses
+- **PRISMA-IPD**: Individual patient data reviews
+- **PRISMA-S**: Search strategies
+- **PRISMA-DTA**: Diagnostic test accuracy reviews
+
+### STROBE Extensions (examples)
+
+- **STROBE-ME**: Molecular epidemiology
+- **RECORD**: Routinely collected health data
+
+## Creating Flow Diagrams
+
+### CONSORT Flow Diagram
+
+**Four stages:**
+1. **Enrollment**: Assessed for eligibility
+2. **Allocation**: Randomly assigned to groups
+3. **Follow-up**: Received intervention, lost to follow-up
+4. **Analysis**: Included in analysis
+
+**Example:**
+```
+Assessed for eligibility (n=250)
+ ↓
+Excluded (n=50)
+ • Did not meet criteria (n=30)
+ • Declined to participate (n=15)
+ • Other reasons (n=5)
+ ↓
+Randomized (n=200)
+ ├─────────────────┬─────────────────┐
+ ↓ ↓ ↓
+Allocated to Allocated to Allocated to
+Intervention A Intervention B Control
+(n=67) (n=66) (n=67)
+ ↓ ↓ ↓
+Lost to follow-up Lost to follow-up Lost to follow-up
+(n=3) (n=5) (n=2)
+ ↓ ↓ ↓
+Analyzed Analyzed Analyzed
+(n=64) (n=61) (n=65)
+```
+
+### PRISMA Flow Diagram
+
+**Stages:**
+1. **Identification**: Records from databases and registers
+2. **Screening**: Records screened, excluded
+3. **Included**: Studies included in review and synthesis
+
+**New features in PRISMA 2020:**
+- Separate tracking for database and register searches
+- Tracking of duplicate removal
+- Clear distinction between reports and studies
+
+## Common Mistakes and How to Avoid Them
+
+### Mistake 1: Not Using Guidelines at All
+
+**Impact:** Missing critical information, lower chance of acceptance
+
+**Solution:** Identify and use appropriate guideline from study planning stage
+
+### Mistake 2: Using Guidelines Only After Manuscript is Complete
+
+**Impact:** May realize key data were not collected or documented
+
+**Solution:** Review guidelines during study design and data collection
+
+### Mistake 3: Incomplete Checklist Completion
+
+**Impact:** Missed items remain unreported
+
+**Solution:** Systematically address every single checklist item
+
+### Mistake 4: Using Outdated Guidelines
+
+**Impact:** Missing recent improvements in reporting standards
+
+**Solution:** Always check for latest version on official guideline website
+
+### Mistake 5: Using Wrong Guideline for Study Design
+
+**Impact:** Important design-specific elements not reported
+
+**Solution:** Carefully match study design to appropriate guideline
+
+### Mistake 6: Not Submitting Checklist When Required
+
+**Impact:** Editorial desk rejection or delays
+
+**Solution:** Check journal submission guidelines and include checklist
+
+### Mistake 7: Generic Reporting Without Specificity
+
+**Impact:** Insufficient detail for replication or appraisal
+
+**Solution:** Provide specific, detailed information for each item
+
+## Journal Requirements
+
+### Many Journals Now Require:
+
+1. **Statement of adherence** to reporting guidelines in Methods
+2. **Completed checklist** uploaded as supplementary file
+3. **Page/line numbers** on checklist indicating where items are addressed
+4. **Flow diagrams** as figures in manuscript
+
+### Example Methods Statement:
+
+```
+"This study is reported in accordance with the Strengthening the Reporting of
+Observational Studies in Epidemiology (STROBE) statement. A completed STROBE
+checklist is provided as Supplementary File 1."
+```
+
+### Journals with Strong Requirements:
+
+- PLOS journals (require checklists for specific designs)
+- BMJ (requires CONSORT, PRISMA, and others)
+- The Lancet (requires adherence statements)
+- JAMA and JAMA Network journals (require checklists)
+- Nature portfolio journals (encourage guidelines)
+
+## Resources
+
+### Official Guideline Websites
+
+- **EQUATOR Network**: https://www.equator-network.org/
+- **CONSORT**: http://www.consort-statement.org/
+- **STROBE**: https://www.strobe-statement.org/
+- **PRISMA**: http://www.prisma-statement.org/
+- **SPIRIT**: https://www.spirit-statement.org/
+- **ARRIVE**: https://arriveguidelines.org/
+- **CARE**: https://www.care-statement.org/
+
+### Training Materials
+
+- EQUATOR Network provides webinars and training resources
+- Many guidelines have explanatory papers published in medical journals
+- Universities often provide workshops on reporting guidelines
+
+### Software Tools
+
+- **Some reference managers** can insert reporting guideline citations
+- **Covidence, RevMan** for systematic review reporting
+- **PRISMA flow diagram generator**: http://prisma.thetacollaborative.ca/
+
+## Checklist: Using Reporting Guidelines
+
+**Before starting your study:**
+- [ ] Identified appropriate reporting guideline(s)
+- [ ] Reviewed checklist items requiring prospective planning
+- [ ] Designed study to capture all required elements
+- [ ] Registered protocol if applicable
+
+**During manuscript drafting:**
+- [ ] Downloaded latest version of guideline checklist
+- [ ] Systematically addressed each checklist item
+- [ ] Created required flow diagram
+- [ ] Noted where each item is addressed (page/line)
+
+**Before submission:**
+- [ ] Completed formal checklist with page numbers
+- [ ] Verified all items adequately addressed
+- [ ] Included adherence statement in Methods
+- [ ] Prepared checklist as supplementary file if required
+- [ ] Checked journal-specific requirements
+- [ ] Mentioned guideline adherence in cover letter
+
+## Venue-Specific Reporting Requirements
+
+### Reporting Standards by Venue Type
+
+| Venue Type | Guideline Use | Transparency Requirements |
+|-----------|--------------|---------------------------|
+| **Medical journals** | Mandatory (CONSORT, STROBE, etc.) | Checklist required at submission |
+| **PLOS/BMC** | Mandatory for study types | Checklist uploaded as supplement |
+| **Nature/Science** | Recommended | Methods completeness emphasized |
+| **ML conferences** | No formal guidelines | Reproducibility details required |
+
+### ML Conference Reporting Standards
+
+**NeurIPS/ICML/ICLR reproducibility requirements:**
+- **Datasets**: Names, versions, access methods, preprocessing
+- **Code**: Availability statement; GitHub common
+- **Hyperparameters**: All settings reported (learning rate, batch size, etc.)
+- **Seeds**: Random seeds for reproducibility
+- **Computational resources**: GPUs used, training time
+- **Statistical significance**: Error bars, confidence intervals, multiple runs
+- **Broader Impact** statement (NeurIPS): Societal implications
+
+**What to include (typically in appendix):**
+- Complete hyperparameter settings
+- Training details and convergence criteria
+- Hardware specifications
+- Software versions (PyTorch 2.0, etc.)
+- Dataset splits and any preprocessing
+- Evaluation metrics and protocols
+
+### Enforcement and Evaluation
+
+**What gets checked:**
+- **Medical journals**: Checklist uploaded; adherence statement in Methods; systematic completeness
+- **PLOS/BMC**: Mandatory checklists for certain designs; reproducibility emphasized
+- **High-impact**: Methods sufficiency for replication (checklist often not required)
+- **ML conferences**: Reproducibility checklist (NeurIPS); code availability increasingly expected
+
+**Common issues leading to rejection:**
+- Missing required checklists (medical journals)
+- Insufficient methods detail for reproduction
+- Missing key information (randomization, blinding, power calculation)
+- No data/code availability statement when required
+
+**Methods statement examples:**
+
+**Journal (STROBE):**
+```
+This study followed STROBE reporting guidelines. Checklist provided in Supplement 1.
+```
+
+**ML conference (reproducibility):**
+```
+Code available at github.com/user/project. All hyperparameters in Appendix A.
+Training used 4×A100 GPUs (~20 hours). Seeds: {42, 123, 456}.
+```
+
+### Pre-Submission Reporting Checklist
+
+**For clinical trials (medical journals):**
+- [ ] CONSORT checklist complete with page numbers
+- [ ] Trial registration number in abstract and methods
+- [ ] CONSORT flow diagram included
+- [ ] Statistical analysis plan described
+- [ ] Adherence statement in Methods
+
+**For observational studies (medical/epidemiology):**
+- [ ] STROBE checklist complete
+- [ ] Study design clearly stated
+- [ ] Statistical methods detailed
+- [ ] Confounders addressed
+- [ ] Adherence statement in Methods
+
+**For systematic reviews:**
+- [ ] PRISMA checklist complete
+- [ ] PRISMA flow diagram included
+- [ ] Protocol registered (PROSPERO)
+- [ ] Search strategy documented
+- [ ] Risk of bias assessment included
+
+**For ML conference papers:**
+- [ ] All datasets named with versions
+- [ ] Code availability stated (GitHub link if available)
+- [ ] Hyperparameters listed (appendix acceptable)
+- [ ] Random seeds reported
+- [ ] Computational resources specified
+- [ ] Error bars/confidence intervals shown
+- [ ] Broader Impact statement (if required)
diff --git a/scientific-skills/scientific-writing/references/writing_principles.md b/scientific-skills/scientific-writing/references/writing_principles.md
new file mode 100644
index 0000000..83cb577
--- /dev/null
+++ b/scientific-skills/scientific-writing/references/writing_principles.md
@@ -0,0 +1,824 @@
+# Scientific Writing Principles
+
+## Overview
+
+Effective scientific writing requires mastering fundamental principles that ensure clarity, precision, and impact. Unlike creative or narrative writing, scientific writing prioritizes accuracy, conciseness, and objectivity. This guide covers the core principles that distinguish good scientific writing from poor writing and provides practical strategies for improvement.
+
+## The Three Pillars of Scientific Writing
+
+### 1. Clarity
+
+**Definition:** Writing that is immediately understandable to the intended audience without ambiguity or confusion.
+
+**Why it matters:** Science is complex enough without unclear writing adding confusion. Readers should focus on understanding the science, not deciphering the prose.
+
+#### Strategies for Clarity
+
+**Use precise, unambiguous language:**
+```
+Poor: "The drug seemed to help quite a few patients."
+Better: "The drug reduced symptoms in 68% (32/47) of patients."
+```
+
+**Define technical terms at first use:**
+```
+"We measured brain-derived neurotrophic factor (BDNF), a protein involved in
+neuronal survival and plasticity."
+```
+
+**Maintain logical flow within and between paragraphs:**
+- Each paragraph should have one main idea
+- Topic sentence introduces the paragraph's focus
+- Supporting sentences develop that focus
+- Transition sentences connect paragraphs
+
+**Use active voice when it improves clarity:**
+```
+Passive (less clear): "The samples were analyzed by the researchers."
+Active (clearer): "Researchers analyzed the samples."
+```
+
+However, passive voice is acceptable and often preferred in Methods when the action is more important than the actor:
+```
+"Blood samples were collected at baseline and after 6 weeks."
+```
+
+**Break up long, complex sentences:**
+```
+Poor: "The results of our study, which involved 200 participants recruited from
+three hospitals and followed for 12 months with assessments every 4 weeks using
+validated questionnaires, showed significant improvements in the intervention
+group."
+
+Better: "Our study involved 200 participants recruited from three hospitals.
+Participants were followed for 12 months with assessments every 4 weeks using
+validated questionnaires. The intervention group showed significant improvements."
+```
+
+**Use specific verbs:**
+```
+Weak: "The study looked at depression in adolescents."
+Stronger: "The study examined factors contributing to depression in adolescents."
+```
+
+#### Common Clarity Problems
+
+**Ambiguous pronouns:**
+```
+Poor: "Group A received the drug and Group B received placebo. They showed
+improvement."
+(Who is "they"?)
+
+Better: "Group A received the drug and Group B received placebo. The drug-treated
+group showed improvement."
+```
+
+**Misplaced modifiers:**
+```
+Poor: "We measured blood pressure in patients using an automated monitor."
+(Are the patients using the monitor, or are we?)
+
+Better: "Using an automated monitor, we measured blood pressure in patients."
+```
+
+**Unclear referents:**
+```
+Poor: "The increase in expression was accompanied by decreased proliferation, which
+was unexpected."
+(What was unexpected—the decrease, the accompaniment, or both?)
+
+Better: "The increase in expression was accompanied by decreased proliferation.
+This inverse relationship was unexpected."
+```
+
+### 2. Conciseness
+
+**Definition:** Expressing ideas in the fewest words necessary without sacrificing clarity or completeness.
+
+**Why it matters:** Concise writing respects readers' time. Every unnecessary word is a missed opportunity for clarity and impact. As the principle states: "We value concise writing because we value time."
+
+#### Strategies for Conciseness
+
+**Eliminate redundant words and phrases:**
+
+| Wordy | Concise |
+|-------|---------|
+| "due to the fact that" | "because" |
+| "in order to" | "to" |
+| "it is important to note that" | [delete] |
+| "a total of 50 participants" | "50 participants" |
+| "completely eliminate" | "eliminate" |
+| "has been shown to be" | "is" |
+| "in the event that" | "if" |
+| "at the present time" | "now" or "currently" |
+| "conduct an investigation into" | "investigate" |
+| "give consideration to" | "consider" |
+
+**Avoid throat-clearing phrases:**
+```
+Wordy: "It is interesting to note that the results of our study demonstrate that..."
+Concise: "Our results demonstrate that..." or "The results show that..."
+```
+
+**Use strong verbs instead of noun+verb combinations:**
+
+| Wordy | Concise |
+|-------|---------|
+| "make a decision" | "decide" |
+| "perform an analysis" | "analyze" |
+| "conduct a study" | "study" or "studied" |
+| "make an assessment" | "assess" |
+| "provide information about" | "inform" |
+
+**Eliminate unnecessary intensifiers:**
+```
+Wordy: "The results were very significant."
+Concise: "The results were significant." (p-value conveys the degree)
+```
+
+**Avoid repeating information unnecessarily:**
+```
+Redundant: "The results showed that participants in the intervention group, who
+received the treatment intervention, had better outcomes."
+Concise: "The intervention group had better outcomes."
+```
+
+**Favor shorter constructions:**
+```
+Wordy: "In spite of the fact that the sample size was small..."
+Concise: "Although the sample size was small..."
+```
+
+#### Acceptable Length vs. Unnecessary Length
+
+**Not all long sentences are bad:**
+```
+This detailed sentence is fine: "We analyzed blood samples using liquid
+chromatography-tandem mass spectrometry (LC-MS/MS) with a Waters Acquity UPLC
+system coupled to a Xevo TQ-S mass spectrometer (Waters Corporation, Milford, MA)."
+
+Why? Because each element is necessary information.
+```
+
+**The key question:** Can any word be removed without losing meaning or precision? If yes, remove it.
+
+### 3. Accuracy
+
+**Definition:** Precise, correct representation of data, methods, and interpretations.
+
+**Why it matters:** Scientific credibility depends on accuracy. Inaccurate reporting undermines the entire scientific enterprise.
+
+#### Strategies for Accuracy
+
+**Report exact values with appropriate precision:**
+```
+Poor: "The mean was about 25."
+Better: "The mean was 24.7 ± 3.2 (SD)."
+```
+
+**Match precision to measurement capability:**
+```
+Inappropriate: "Mean age was 45.237 years" (implies false precision)
+Appropriate: "Mean age was 45.2 years"
+```
+
+**Use consistent terminology throughout:**
+```
+Inconsistent: Introduction calls it "cognitive function," Methods call it "mental
+performance," Results call it "intellectual ability."
+
+Consistent: Use "cognitive function" throughout, or define explicitly: "cognitive
+function (also termed mental performance)"
+```
+
+**Distinguish observations from interpretations:**
+```
+Observation: "Mean blood pressure decreased from 145 to 132 mmHg (p=0.003)."
+Interpretation: "This suggests the intervention effectively lowers blood pressure."
+```
+
+**Be specific about uncertainty:**
+```
+Vague: "There may be some error in these measurements."
+Specific: "Measurements have a standard error of ±2.5 mmHg based on instrument
+specifications."
+```
+
+**Use correct statistical language:**
+```
+Incorrect: "The correlation was highly significant (p=0.03)."
+Correct: "The correlation was statistically significant (p=0.03)."
+(p=0.03 is not "highly" significant; that's reserved for p<0.001)
+```
+
+**Verify all numbers:**
+- Check that numbers in text match tables/figures
+- Verify that n values sum correctly
+- Confirm percentages are correctly calculated
+- Double-check all statistics
+
+#### Common Accuracy Problems
+
+**Overgeneralization:**
+```
+Poor: "Exercise prevents depression."
+Better: "In our sample, participants randomized to the exercise intervention showed
+fewer depressive symptoms than controls (mean difference 3.2 points on the BDI-II,
+95% CI: 1.5-4.9, p<0.001)."
+```
+
+**Unwarranted causal claims:**
+```
+Poor (from observational study): "Vitamin D supplementation reduces cancer risk."
+Better: "Vitamin D levels were inversely associated with cancer incidence in this
+cohort (HR=0.82, 95% CI: 0.71-0.95)."
+```
+
+**Imprecise numerical descriptions:**
+```
+Vague: "Many participants dropped out."
+Precise: "15/50 (30%) participants withdrew before study completion."
+```
+
+## Additional Key Principles
+
+### 4. Objectivity
+
+**Definition:** Presenting information impartially without bias, exaggeration, or unsupported opinion.
+
+**Strategies:**
+
+**Present results without bias:**
+```
+Biased: "As expected, our superior method performed better."
+Objective: "Method A showed higher accuracy than Method B (87% vs. 76%, p=0.02)."
+```
+
+**Acknowledge conflicting evidence:**
+```
+"Our findings contrast with Smith et al. (2022), who reported no significant effect.
+This discrepancy may result from differences in intervention intensity or population
+characteristics."
+```
+
+**Avoid emotional or evaluative language:**
+```
+Subjective: "The results were disappointing and concerning."
+Objective: "The intervention did not significantly reduce symptoms (p=0.42)."
+```
+
+**Distinguish fact from speculation:**
+```
+"The observed decrease in cell viability was accompanied by increased caspase-3
+activity, suggesting that apoptosis may be the primary mechanism of cell death."
+(Uses "suggesting" and "may be" to indicate interpretation)
+```
+
+### 5. Consistency
+
+**Maintain consistency throughout the manuscript:**
+
+**Terminology:**
+- Use the same term for the same concept (not synonyms for variety)
+- Define abbreviations at first use and use consistently thereafter
+- Use standard nomenclature for genes, proteins, chemicals
+
+**Notation:**
+- Statistical notation (p-value format, CI presentation)
+- Units of measurement
+- Number formatting (decimal places)
+
+**Tense:**
+- Past tense for your specific study actions
+- Present tense for established facts
+- See detailed tense guide in IMRAD structure reference
+
+**Style:**
+- Follow journal guidelines consistently
+- Citation format
+- Heading capitalization
+- Number vs. word for numerals
+
+### 6. Logical Organization
+
+**Create a clear "red thread" through the manuscript:**
+
+**Paragraph structure:**
+1. Topic sentence (main idea)
+2. Supporting sentences (evidence, explanation)
+3. Concluding/transition sentence (link to next idea)
+
+**Section flow:**
+- Each section builds logically on the previous
+- Questions raised in Introduction are answered in Results
+- Findings presented in Results are interpreted in Discussion
+
+**Signposting:**
+```
+"First, we examined..."
+"Next, we investigated..."
+"Finally, we assessed..."
+```
+
+**Parallelism:**
+```
+Not parallel: "Aims were to (1) measure blood pressure, (2) assessment of
+cognitive function, and (3) we wanted to evaluate mood."
+
+Parallel: "Aims were to (1) measure blood pressure, (2) assess cognitive
+function, and (3) evaluate mood."
+```
+
+## Verb Tense in Scientific Writing
+
+### General Guidelines
+
+**Present tense** for:
+- Established facts and general truths
+ - "DNA is composed of nucleotides."
+- Conclusions you are drawing
+ - "These findings suggest that..."
+- Referring to figures and tables
+ - "Figure 1 shows the distribution..."
+
+**Past tense** for:
+- Specific findings from completed research (yours and others')
+ - "Smith et al. (2022) found that..."
+ - "We observed a significant decrease..."
+- Methods you performed
+ - "Participants completed questionnaires at baseline."
+
+**Present perfect** for:
+- Recent developments with current relevance
+ - "Recent studies have demonstrated..."
+- Research area background
+ - "Several approaches have been proposed..."
+
+### Section-Specific Tense
+
+| Section | Primary Tense | Examples |
+|---------|---------------|----------|
+| **Abstract - Background** | Present or present perfect | "Depression affects millions" / "Research has shown..." |
+| **Abstract - Methods** | Past | "We recruited 100 participants" |
+| **Abstract - Results** | Past | "The intervention reduced symptoms" |
+| **Abstract - Conclusions** | Present | "These findings suggest..." |
+| **Introduction - Background** | Present (facts), present perfect (research) | "Exercise is beneficial" / "Studies have shown..." |
+| **Introduction - Gap** | Present or present perfect | "However, little is known..." |
+| **Introduction - This study** | Past or present | "We investigated..." / "This study investigates..." |
+| **Methods** | Past | "We collected samples..." |
+| **Results** | Past | "Mean age was 45 years" |
+| **Discussion - Your findings** | Past | "We found that..." |
+| **Discussion - Interpretation** | Present | "This suggests..." |
+| **Discussion - Prior work** | Past or present | "Smith found..." / "Previous work demonstrates..." |
+
+## Common Writing Pitfalls
+
+### 1. Jargon Overload
+
+**Problem:** Excessive use of technical terms without definition
+
+**Example:**
+```
+Poor: "We utilized qRT-PCR to quantify mRNA expression via SYBR-Green-based
+fluorescence detection following cDNA synthesis from total RNA using oligo-dT primers."
+
+Better: "We quantified mRNA expression using quantitative reverse transcription PCR
+(qRT-PCR). Total RNA was reverse transcribed to complementary DNA (cDNA) using
+oligo-dT primers, then amplified with SYBR Green fluorescent detection."
+```
+
+### 2. Nominalization
+
+**Problem:** Turning verbs into nouns, making writing heavy and indirect
+
+**Examples:**
+
+| Nominalized | Direct |
+|-------------|--------|
+| "give consideration to" | "consider" |
+| "make an assumption" | "assume" |
+| "perform an investigation" | "investigate" |
+| "conduct an examination" | "examine" |
+| "achieve a reduction" | "reduce" |
+
+### 3. Hedging Excessively or Insufficiently
+
+**Excessive hedging** (sounds uncertain):
+```
+"It could perhaps be possible that the intervention might possibly have some effect
+on symptoms under certain conditions."
+```
+
+**Insufficient hedging** (overstates conclusions):
+```
+"The intervention cures depression."
+```
+
+**Appropriate hedging:**
+```
+"The intervention significantly reduced depressive symptoms in this sample,
+suggesting it may be effective for treating mild to moderate depression."
+```
+
+**Hedging words to use appropriately:**
+- Suggests, indicates, implies (not proves, demonstrates for correlational data)
+- May, might, could (possibilities)
+- Appears to, seems to (observations needing confirmation)
+- Likely, probably, possibly (degrees of certainty)
+
+### 4. Anthropomorphism
+
+**Problem:** Attributing human characteristics to non-human entities
+
+**Examples:**
+
+| Anthropomorphic | Scientific |
+|----------------|-----------|
+| "The study wanted to examine..." | "We aimed to examine..." or "The study examined..." |
+| "The data suggest they want..." | "The data suggest that..." |
+| "This paper will prove..." | "This paper demonstrates..." |
+| "Table 1 tells us..." | "Table 1 shows..." |
+
+### 5. Abbreviation Abuse
+
+**Problems:**
+- Too many abbreviations burden the reader
+- Abbreviating terms used only once or twice
+- Not defining abbreviations at first use
+
+**Guidelines:**
+- Only abbreviate terms used ≥3-4 times
+- Define at first use in abstract (if used in abstract)
+- Define at first use in main text
+- Don't abbreviate in title
+- Limit to 3-4 new abbreviations per paper when possible
+- Use standard abbreviations (DNA, RNA, HIV, etc.) without definition
+
+**Example:**
+```
+Poor: "We measured Brain-Derived Neurotrophic Factor (BDNF) at baseline. BDNF
+levels were elevated."
+(Only used twice, abbreviation unnecessary)
+
+Better: "We measured brain-derived neurotrophic factor at baseline. Levels were
+elevated."
+```
+
+## Specific Sentence-Level Issues
+
+### Dangling Modifiers
+
+**Problem:**
+```
+"After incubating for 2 hours, we measured absorbance."
+(The sentence suggests "we" were incubated)
+
+Better: "After incubating samples for 2 hours, we measured absorbance."
+Or: "After 2-hour incubation, we measured absorbance."
+```
+
+### Misplaced Commas
+
+**Common errors:**
+
+**Between subject and verb:**
+```
+Wrong: "The participants in the intervention group, showed improvement."
+Right: "The participants in the intervention group showed improvement."
+```
+
+**In compound predicates:**
+```
+Wrong: "We measured blood pressure, and recorded symptoms."
+Right: "We measured blood pressure and recorded symptoms."
+(No comma before "and" when it doesn't join independent clauses)
+```
+
+### Pronoun Agreement
+
+```
+Wrong: "Each participant completed their questionnaire."
+Right: "Each participant completed his or her questionnaire."
+Or better: "Participants completed their questionnaires."
+```
+
+### Subject-Verb Agreement
+
+```
+Wrong: "The group of participants were heterogeneous."
+Right: "The group of participants was heterogeneous."
+(Subject is "group" [singular], not "participants")
+
+But: "The participants were heterogeneous." (Plural subject)
+```
+
+## Word Choice
+
+### Commonly Confused Words in Scientific Writing
+
+| Often Misused | Correct Usage |
+|---------------|---------------|
+| **affect / effect** | Affect (verb): influence; Effect (noun): result; Effect (verb): bring about |
+| **among / between** | Among: three or more; Between: two |
+| **continual / continuous** | Continual: repeated; Continuous: uninterrupted |
+| **data is / data are** | Data are (plural); datum is (singular) |
+| **fewer / less** | Fewer: countable items; Less: continuous quantities |
+| **i.e. / e.g.** | i.e. (that is): restatement; e.g. (for example): examples |
+| **imply / infer** | Imply: suggest; Infer: deduce |
+| **parameter / variable** | Parameter: population value; Variable: measured characteristic |
+| **principal / principle** | Principal: main; Principle: rule or concept |
+| **significant** | Reserve for statistical significance, not importance |
+| **that / which** | That: restrictive clause; Which: nonrestrictive clause |
+
+### Words to Avoid or Use Carefully
+
+**Avoid informal language:**
+- "a lot of" → "many" or "substantial"
+- "got" → "obtained" or "became"
+- "showed up" → "appeared" or "was evident"
+
+**Avoid vague quantifiers:**
+- "some" → specify how many
+- "often" → specify frequency
+- "recently" → specify timeframe
+
+**Avoid unnecessary modifiers:**
+- "very significant" → "significant" (p-value shows degree)
+- "quite large" → "large" or specify size
+- "rather interesting" → delete or explain why
+
+## Numbers and Units
+
+### When to Use Numerals vs. Words
+
+**Use numerals for:**
+- All numbers ≥10
+- Numbers with units (5 mg, 3 mL)
+- Statistical values (p=0.03, t=2.14)
+- Ages, dates, times
+- Scores and scales
+- Percentages (15%)
+
+**Use words for:**
+- Numbers <10 when not connected to units (five participants)
+- Numbers beginning a sentence (spell out or restructure)
+
+**Examples:**
+```
+"Five participants withdrew" OR "There were 5 withdrawals"
+(NOT: "5 participants withdrew")
+
+"We tested 15 samples at 3 time points"
+"Mean age was 45 years"
+```
+
+### Units and Formatting
+
+**Guidelines:**
+- Space between number and unit (5 mg, not 5mg)
+- No period after units (mg not mg.)
+- Use SI units unless field convention differs
+- Be consistent in decimal places
+- Use commas for thousands in text (12,500 not 12500)
+
+**Ranges:**
+- Use en-dash (–) for ranges: 15–20 mg
+- Include unit only after second number: 15–20 mg (not 15 mg–20 mg)
+
+## Paragraph Structure
+
+### Ideal Paragraph Length
+
+**Guidelines:**
+- 3-7 sentences typically
+- One main idea per paragraph
+- Too short (<2 sentences): may indicate idea needs development or combining
+- Too long (>10 sentences): may need splitting
+
+### Paragraph Coherence
+
+**Techniques:**
+
+**1. Topic sentence:**
+```
+"Exercise training improves cardiovascular function through multiple mechanisms.
+[Following sentences explain these mechanisms]"
+```
+
+**2. Transitional phrases:**
+- First, second, third, finally
+- Furthermore, moreover, in addition
+- However, nevertheless, conversely
+- Therefore, thus, consequently
+- For example, specifically, particularly
+
+**3. Repetition of key terms:**
+```
+"...this mechanism of action. This mechanism may explain..."
+(Not: "...this mechanism. This process may explain...")
+```
+
+**4. Parallel structure:**
+```
+"Group A received the drug. Group B received placebo. Group C received no treatment."
+(Not: "Group A received the drug. Placebo was given to Group B. No treatment was
+provided to the third group.")
+```
+
+## Revision Checklist
+
+### Content Level
+
+- [ ] Does every sentence add value?
+- [ ] Are claims supported by data?
+- [ ] Is the logic clear and sound?
+- [ ] Are interpretations warranted by results?
+
+### Paragraph Level
+
+- [ ] Does each paragraph have one main idea?
+- [ ] Are paragraphs in logical order?
+- [ ] Are transitions smooth?
+- [ ] Is there a clear "red thread"?
+
+### Sentence Level
+
+- [ ] Are sentences clear and concise?
+- [ ] Is sentence structure varied?
+- [ ] Are there no dangling modifiers?
+- [ ] Do subjects and verbs agree?
+
+### Word Level
+
+- [ ] Is word choice precise?
+- [ ] Are technical terms defined?
+- [ ] Is terminology consistent?
+- [ ] Are abbreviations necessary and defined?
+- [ ] Are numbers formatted correctly?
+
+### Grammar and Mechanics
+
+- [ ] Is verb tense correct and consistent?
+- [ ] Are commas used correctly?
+- [ ] Do pronouns agree with antecedents?
+- [ ] Is punctuation correct?
+- [ ] Is spelling correct (including technical terms)?
+
+## Tools for Improving Writing
+
+### Grammar and Style Checkers
+
+- **Grammarly**: Grammar, style, clarity
+- **ProWritingAid**: In-depth writing analysis
+- **Hemingway Editor**: Readability, simplification
+- **LanguageTool**: Open-source grammar checker
+
+**Caution:** These tools don't understand scientific writing conventions. Use them as a starting point, not final arbiter.
+
+### Readability Metrics
+
+**Flesch Reading Ease:**
+- 60-70: acceptable for scientific papers
+- <60: may be too complex
+
+**Caution:** Don't sacrifice precision for readability scores designed for general audiences.
+
+### Peer Review
+
+**Most valuable tool:**
+- Ask colleagues to read and provide feedback
+- Identify unclear passages
+- Check logical flow
+- Verify interpretations are warranted
+
+## Additional Resources
+
+### Books on Scientific Writing
+
+- *The Elements of Style* by Strunk & White (classic on clear writing)
+- *On Writing Well* by William Zinsser
+- *Scientific Writing: A Reader and Writer's Guide* by Jean-Luc Lebrun
+- *How to Write a Scientific Paper* by George M. Whitesides
+- *Style: Lessons in Clarity and Grace* by Joseph Williams
+
+### Online Resources
+
+- **Academic Phrasebank** (University of Manchester): Common academic phrases
+- **Purdue OWL**: Grammar, punctuation, style
+- **Nature Masterclasses**: Scientific writing courses
+- **WritingCenters**: Many universities provide free online resources
+
+### University Writing Centers
+
+Most research universities offer:
+- Individual consultations
+- Workshops on scientific writing
+- Online resources and handouts
+- Support for non-native English speakers
+
+## Venue-Specific Writing Styles
+
+### Four Major Writing Style Categories
+
+1. **Broad-audience accessible** (Nature, Science, PNAS)
+2. **Clinical-professional** (NEJM, Lancet, JAMA)
+3. **Technical-specialist** (field-specific journals)
+4. **ML conference** (NeurIPS, ICML, ICLR, CVPR)
+
+### Writing Style Comparison
+
+| Aspect | Nature/Science | Medical | Specialized | ML Conference |
+|--------|---------------|---------|-------------|---------------|
+| **Sentence length** | 15-20 words | 12-18 words | 18-25 words | 12-20 words |
+| **Vocabulary** | Minimal jargon | Clinical terms | Field-specific | Technical + math |
+| **Tone** | Engaging, significant | Conservative | Formal | Direct, contribution-focused |
+| **Key phrases** | "Here we show" | "We conducted" | "To elucidate" | "We propose", "Our contributions" |
+
+**ML Conference Style:**
+
+**Characteristics:**
+- Direct, technical language with mathematical notation
+- Contribution-focused (numbered lists common)
+- Assumes ML expertise (CNNs, transformers, SGD, etc.)
+- Emphasizes novelty and performance gains
+- Pseudocode and equations expected
+
+**Example opening (NeurIPS style):**
+```
+Vision transformers have achieved state-of-the-art performance on image classification,
+but their quadratic complexity limits applicability to high-resolution images. We propose
+Efficient-ViT, which reduces complexity to O(n log n) while maintaining accuracy. Our
+contributions are: (1) a novel sparse attention mechanism, (2) theoretical analysis
+showing preserved expressive power, and (3) empirical validation on ImageNet showing
+15% speedup with comparable accuracy.
+```
+- Problem stated with technical context
+- Solution previewed
+- Numbered contributions
+- Quantitative claims
+
+### Key Writing Differences
+
+| Aspect | Nature/Science | Medical | Specialized | ML Conference |
+|--------|---------------|---------|-------------|---------------|
+| **Paragraph length** | 3-5 sentences | 5-7 sentences | 6-10 sentences | 4-6 sentences |
+| **Math/equations** | Minimize | Rare | Moderate | Essential |
+| **Active voice** | Preferred | Mixed | Passive OK | Preferred |
+| **Hedging** | Moderate | Conservative | Detailed | Minimal (claim gains) |
+| **Figure integration** | Tight | Systematic | Detailed | Dense, in-page |
+
+### Evaluation Focus by Venue
+
+| Venue | Key Evaluation Criteria |
+|-------|------------------------|
+| **Nature/Science** | Accessible to non-specialists? Broad significance clear? Compelling story? |
+| **Medical** | Clinical relevance apparent? Professional tone? Methods adequate? |
+| **Specialized** | Technical precision? Field expertise shown? Methods detailed? |
+| **ML conferences** | Clear contributions? Claims supported by experiments? Reproducible? |
+
+**Common rejection reasons:**
+- Poor writing quality/unclear prose
+- Inappropriate style for venue
+- Overstated claims
+- Methods insufficient for reproduction
+- Missing key details (baselines, ablations for ML; statistics for journals)
+
+### Quick Style Adaptation Guide
+
+| From → To | Key Changes |
+|-----------|-------------|
+| **Journal → ML conference** | Add numbered contributions; include equations/pseudocode; emphasize quantitative gains; condense prose |
+| **ML conference → Journal** | Remove contribution numbering; expand motivation; separate Results/Discussion; reduce equations in main text |
+| **Specialist → Broad** | Simplify language; emphasize broad implications; explain technical concepts; add context for non-experts |
+| **Broad → Specialist** | Add technical detail; use field terminology freely; expand mechanistic discussion; cite field literature |
+| **Basic science → Clinical** | Add patient/clinical context; use clinical language; emphasize outcomes/implications; cite clinical evidence |
+
+### Pre-Submission Style Checklist
+
+**All venues:**
+- [ ] Writing style matches 3-5 recent papers from venue
+- [ ] Sentence length appropriate
+- [ ] Technical vocabulary level correct
+- [ ] Tone consistent with venue
+- [ ] No overstated claims
+
+**ML conferences add:**
+- [ ] Contributions clearly numbered in intro
+- [ ] Mathematical notation correct and consistent
+- [ ] Pseudocode/algorithms included where appropriate
+- [ ] Claims quantified (e.g., "15% faster", "2.3% accuracy gain")
+- [ ] Limitations acknowledged
+
+## Final Thoughts
+
+Effective scientific writing is a skill developed through practice. Key principles:
+
+1. **Clarity** trumps complexity
+2. **Conciseness** respects readers' time
+3. **Accuracy** builds credibility
+4. **Objectivity** maintains scientific integrity
+5. **Consistency** aids comprehension
+6. **Logical organization** guides readers
+7. **Journal-specific adaptation** maximizes publication success
+
+**Remember:** The goal is not to impress readers with vocabulary or complexity, but to communicate your science clearly and precisely so readers can understand, evaluate, and build upon your work. Adapt your writing style to match your target journal's expectations and audience.
diff --git a/scientific-skills/treatment-plans/README.md b/scientific-skills/treatment-plans/README.md
new file mode 100644
index 0000000..9cf0ff5
--- /dev/null
+++ b/scientific-skills/treatment-plans/README.md
@@ -0,0 +1,488 @@
+# Treatment Plans Skill
+
+## Overview
+
+Skill for generating **concise, clinician-focused** medical treatment plans across all clinical specialties. Provides LaTeX/PDF templates with SMART goal frameworks, evidence-based interventions, regulatory compliance, and validation tools for patient-centered care planning.
+
+**Default to 1-page format** for most cases - think "quick reference card" not "comprehensive textbook".
+
+## What's Included
+
+### 📋 Seven Treatment Plan Types
+
+1. **One-Page Treatment Plan** (PREFERRED) - Concise, quick-reference format for most clinical scenarios
+2. **General Medical Treatment Plans** - Primary care, chronic diseases (diabetes, hypertension, heart failure)
+3. **Rehabilitation Treatment Plans** - Physical therapy, occupational therapy, cardiac/pulmonary rehab
+4. **Mental Health Treatment Plans** - Psychiatric care, depression, anxiety, PTSD, substance use
+5. **Chronic Disease Management Plans** - Complex multimorbidity, long-term care coordination
+6. **Perioperative Care Plans** - Preoperative optimization, ERAS protocols, postoperative recovery
+7. **Pain Management Plans** - Acute and chronic pain, multimodal analgesia, opioid-sparing strategies
+
+### 📚 Reference Files (5 comprehensive guides)
+
+- `treatment_plan_standards.md` - Professional standards, documentation requirements, legal considerations
+- `goal_setting_frameworks.md` - SMART goals, patient-centered outcomes, shared decision-making
+- `intervention_guidelines.md` - Evidence-based treatments, pharmacological and non-pharmacological
+- `regulatory_compliance.md` - HIPAA compliance, billing documentation, quality measures
+- `specialty_specific_guidelines.md` - Detailed guidelines for each treatment plan type
+
+### 📄 LaTeX Templates (7 professional templates)
+
+- `one_page_treatment_plan.tex` - **FIRST CHOICE** - Dense, scannable 1-page format (like precision oncology reports)
+- `general_medical_treatment_plan.tex` - Comprehensive medical care planning
+- `rehabilitation_treatment_plan.tex` - Functional restoration and therapy
+- `mental_health_treatment_plan.tex` - Psychiatric and behavioral health
+- `chronic_disease_management_plan.tex` - Long-term disease management
+- `perioperative_care_plan.tex` - Surgical and procedural care
+- `pain_management_plan.tex` - Multimodal pain treatment
+
+### 🔧 Validation Scripts (4 automation tools)
+
+- `generate_template.py` - Interactive template selection and generation
+- `validate_treatment_plan.py` - Comprehensive quality and compliance checking
+- `check_completeness.py` - Verify all required sections present
+- `timeline_generator.py` - Create visual treatment timelines and schedules
+
+## Quick Start
+
+### Generate a Treatment Plan Template
+
+```bash
+cd .claude/skills/treatment-plans/scripts
+python generate_template.py
+
+# Or specify type directly
+python generate_template.py --type general_medical --output diabetes_plan.tex
+```
+
+Available template types:
+- `one_page` (PREFERRED - use for most cases)
+- `general_medical`
+- `rehabilitation`
+- `mental_health`
+- `chronic_disease`
+- `perioperative`
+- `pain_management`
+
+### Compile to PDF
+
+```bash
+cd /path/to/your/treatment/plan
+pdflatex my_treatment_plan.tex
+```
+
+### Validate Your Treatment Plan
+
+```bash
+# Check for completeness
+python check_completeness.py my_treatment_plan.tex
+
+# Comprehensive validation
+python validate_treatment_plan.py my_treatment_plan.tex
+```
+
+### Generate Treatment Timeline
+
+```bash
+python timeline_generator.py --plan my_treatment_plan.tex --output timeline.pdf
+```
+
+## Standard Treatment Plan Components
+
+All templates include these essential sections:
+
+### 1. Patient Information (De-identified)
+- Demographics and relevant medical background
+- Active conditions and comorbidities
+- Current medications and allergies
+- Functional status baseline
+- HIPAA-compliant de-identification
+
+### 2. Diagnosis and Assessment Summary
+- Primary diagnosis (ICD-10 coded)
+- Secondary diagnoses
+- Severity classification
+- Functional limitations
+- Risk stratification
+
+### 3. Treatment Goals (SMART Format)
+
+**Short-term goals** (1-3 months):
+- Specific, measurable outcomes
+- Realistic targets with defined timeframes
+- Patient-centered priorities
+
+**Long-term goals** (6-12 months):
+- Disease control targets
+- Functional improvement objectives
+- Quality of life enhancement
+- Complication prevention
+
+### 4. Interventions
+
+- **Pharmacological**: Medications with dosages, frequencies, monitoring
+- **Non-pharmacological**: Lifestyle modifications, behavioral interventions, education
+- **Procedural**: Planned procedures, specialist referrals, diagnostic testing
+
+### 5. Timeline and Schedule
+- Treatment phases with timeframes
+- Appointment frequency
+- Milestone assessments
+- Expected treatment duration
+
+### 6. Monitoring Parameters
+- Clinical outcomes to track
+- Assessment tools and scales
+- Monitoring frequency
+- Intervention thresholds
+
+### 7. Expected Outcomes
+- Primary outcome measures
+- Success criteria
+- Timeline for improvement
+- Long-term prognosis
+
+### 8. Follow-up Plan
+- Scheduled appointments
+- Communication protocols
+- Emergency procedures
+- Transition planning
+
+### 9. Patient Education
+- Condition understanding
+- Self-management skills
+- Warning signs
+- Resources and support
+
+### 10. Risk Mitigation
+- Adverse effect management
+- Safety monitoring
+- Emergency action plans
+- Fall/infection prevention
+
+## Common Use Cases
+
+### 1. Type 2 Diabetes Management
+
+```
+Goal: Create comprehensive treatment plan for newly diagnosed diabetes
+
+Template: general_medical_treatment_plan.tex
+
+Key Components:
+- SMART goals: HbA1c <7% in 3 months, weight loss 10 lbs in 6 months
+- Medications: Metformin titration schedule
+- Lifestyle: Diet, exercise, glucose monitoring
+- Monitoring: HbA1c every 3 months, quarterly visits
+- Education: Diabetes self-management education
+```
+
+### 2. Post-Stroke Rehabilitation
+
+```
+Goal: Develop rehab plan for stroke patient with hemiparesis
+
+Template: rehabilitation_treatment_plan.tex
+
+Key Components:
+- Functional assessment: FIM scores, ROM, strength testing
+- PT goals: Ambulation 150 feet with cane in 12 weeks
+- OT goals: Independent ADLs, upper extremity function
+- Treatment schedule: PT/OT/SLP 3x week each
+- Home exercise program
+```
+
+### 3. Major Depressive Disorder
+
+```
+Goal: Create integrated treatment plan for depression
+
+Template: mental_health_treatment_plan.tex
+
+Key Components:
+- Assessment: PHQ-9 score 16 (moderate depression)
+- Goals: Reduce PHQ-9 to <5, return to work in 12 weeks
+- Psychotherapy: CBT weekly sessions
+- Medication: SSRI with titration schedule
+- Safety planning: Crisis contacts, warning signs
+```
+
+### 4. Total Knee Replacement
+
+```
+Goal: Perioperative care plan for elective TKA
+
+Template: perioperative_care_plan.tex
+
+Key Components:
+- Preop optimization: Medical clearance, medication management
+- ERAS protocol implementation
+- Postop milestones: Ambulation POD 1, discharge POD 2-3
+- Pain management: Multimodal analgesia
+- Rehab plan: PT starting POD 0
+```
+
+### 5. Chronic Low Back Pain
+
+```
+Goal: Multimodal pain management plan
+
+Template: pain_management_plan.tex
+
+Key Components:
+- Pain assessment: Location, intensity, functional impact
+- Goals: Reduce pain 7/10 to 3/10, return to work
+- Medications: Non-opioid analgesics, adjuvants
+- PT: Core strengthening, McKenzie exercises
+- Behavioral: CBT for pain, mindfulness
+- Interventional: Consider ESI if inadequate response
+```
+
+## SMART Goals Framework
+
+All treatment plans use SMART criteria for goal-setting:
+
+- **Specific**: Clear, well-defined outcome (not vague)
+- **Measurable**: Quantifiable metrics or observable behaviors
+- **Achievable**: Realistic given patient capabilities and resources
+- **Relevant**: Aligned with patient priorities and values
+- **Time-bound**: Specific timeframe for achievement
+
+### Examples
+
+**Good SMART Goals**:
+- Reduce HbA1c from 8.5% to <7% within 3 months
+- Walk independently 150 feet with assistive device by 8 weeks
+- Decrease PHQ-9 depression score from 18 to <10 in 8 weeks
+- Achieve knee flexion >90 degrees by postoperative day 14
+- Reduce pain from 7/10 to ≤4/10 within 6 weeks
+
+**Poor Goals** (not SMART):
+- "Feel better" (not specific or measurable)
+- "Improve diabetes" (not specific or time-bound)
+- "Get stronger" (not measurable)
+- "Return to normal" (vague, not specific)
+
+## Workflow Examples
+
+### Standard Treatment Plan Workflow
+
+1. **Assess patient** - Complete history, physical, diagnostic testing
+2. **Select template** - Choose appropriate template for clinical context
+3. **Generate template** - `python generate_template.py --type [type]`
+4. **Customize plan** - Fill in patient-specific information (de-identified)
+5. **Set SMART goals** - Define measurable short and long-term goals
+6. **Specify interventions** - Evidence-based pharmacological and non-pharmacological
+7. **Create timeline** - Schedule appointments, milestones, reassessments
+8. **Define monitoring** - Outcome measures, assessment frequency
+9. **Validate completeness** - `python check_completeness.py plan.tex`
+10. **Quality check** - `python validate_treatment_plan.py plan.tex`
+11. **Review quality checklist** - Compare to `quality_checklist.md`
+12. **Generate PDF** - `pdflatex plan.tex`
+13. **Review with patient** - Shared decision-making, confirm understanding
+14. **Implement and document** - Execute plan, track progress in clinical notes
+15. **Reassess and modify** - Adjust plan based on outcomes
+
+### Multidisciplinary Care Plan Workflow
+
+1. **Identify team members** - PCP, specialists, therapists, case manager
+2. **Create base plan** - Generate template for primary condition
+3. **Add specialty sections** - Integrate consultant recommendations
+4. **Coordinate goals** - Ensure alignment across disciplines
+5. **Define communication** - Team meeting schedule, documentation sharing
+6. **Assign responsibilities** - Clarify who manages each intervention
+7. **Create care timeline** - Coordinate appointments across providers
+8. **Share plan** - Distribute to all team members and patient
+9. **Track collectively** - Shared monitoring and outcome tracking
+10. **Regular team review** - Adjust plan collaboratively
+
+## Best Practices
+
+### Patient-Centered Care
+✓ Involve patients in goal-setting and decision-making
+✓ Respect cultural beliefs and language preferences
+✓ Address health literacy with appropriate language
+✓ Align plan with patient values and life circumstances
+✓ Support patient activation and self-management
+
+### Evidence-Based Practice
+✓ Follow current clinical practice guidelines
+✓ Use interventions with proven efficacy
+✓ Incorporate quality measures (HEDIS, CMS)
+✓ Avoid low-value or ineffective interventions
+✓ Update plans based on emerging evidence
+
+### Regulatory Compliance
+✓ De-identify per HIPAA Safe Harbor method (18 identifiers)
+✓ Document medical necessity for billing support
+✓ Include informed consent documentation
+✓ Sign and date all treatment plans
+✓ Maintain professional documentation standards
+
+### Quality Documentation
+✓ Complete all required sections
+✓ Use clear, professional medical language
+✓ Include specific, measurable goals
+✓ Specify exact medications (dose, route, frequency)
+✓ Define monitoring parameters and frequency
+✓ Address safety and risk mitigation
+
+### Care Coordination
+✓ Communicate plan to entire care team
+✓ Define roles and responsibilities
+✓ Coordinate across care settings
+✓ Integrate specialist recommendations
+✓ Plan for care transitions
+
+## Integration with Other Skills
+
+### Clinical Reports
+- **SOAP Notes**: Document treatment plan implementation and progress
+- **H&P Documents**: Initial assessment informs treatment planning
+- **Discharge Summaries**: Summarize treatment plan execution
+- **Progress Notes**: Track goal achievement and plan modifications
+
+### Scientific Writing
+- **Citation Management**: Reference clinical practice guidelines
+- **Literature Review**: Understand evidence base for interventions
+- **Research Lookup**: Find current treatment recommendations
+
+### Research
+- **Research Grants**: Treatment protocols for clinical trials
+- **Clinical Trial Reports**: Document trial interventions
+
+## Clinical Practice Guidelines
+
+Treatment plans should align with evidence-based guidelines:
+
+### General Medicine
+- American Diabetes Association (ADA) Standards of Care
+- ACC/AHA Cardiovascular Guidelines
+- GOLD COPD Guidelines
+- JNC-8 Hypertension Guidelines
+- KDIGO Chronic Kidney Disease Guidelines
+
+### Rehabilitation
+- APTA Physical Therapy Clinical Practice Guidelines
+- AOTA Occupational Therapy Practice Guidelines
+- AHA/AACVPR Cardiac Rehabilitation Guidelines
+- Stroke Rehabilitation Best Practices
+
+### Mental Health
+- APA (American Psychiatric Association) Practice Guidelines
+- VA/DoD Clinical Practice Guidelines for Mental Health
+- NICE Guidelines (UK)
+- Evidence-based psychotherapy protocols (CBT, DBT, ACT)
+
+### Pain Management
+- CDC Opioid Prescribing Guidelines
+- AAPM (American Academy of Pain Medicine) Guidelines
+- WHO Analgesic Ladder
+- Multimodal Analgesia Best Practices
+
+### Perioperative Care
+- ERAS (Enhanced Recovery After Surgery) Society Guidelines
+- ASA Perioperative Guidelines
+- SCIP (Surgical Care Improvement Project) Measures
+
+## Professional Standards
+
+### Documentation Requirements
+- Complete and accurate patient information
+- Clear diagnosis with appropriate ICD-10 coding
+- Evidence-based interventions
+- Measurable goals and outcomes
+- Defined monitoring and follow-up
+- Provider signature, credentials, and date
+
+### Medical Necessity
+Treatment plans must demonstrate:
+- Medical appropriateness of interventions
+- Alignment with diagnosis and severity
+- Evidence supporting treatment choices
+- Expected outcomes and benefit
+- Frequency and duration justification
+
+### Legal Considerations
+- Informed consent documentation
+- Patient understanding and agreement
+- Risk disclosure and mitigation
+- Professional liability protection
+- Compliance with state/federal regulations
+
+## Support and Resources
+
+### Getting Help
+
+1. **Check reference files** - Comprehensive guidance in `references/` directory
+2. **Review templates** - See example structures in `assets/` directory
+3. **Run validation scripts** - Identify issues with automated tools
+4. **Consult SKILL.md** - Detailed documentation and best practices
+5. **Review quality checklist** - Ensure all quality criteria met
+
+### External Resources
+
+- Clinical practice guidelines from specialty societies
+- UpToDate and DynaMed for treatment recommendations
+- AHRQ Effective Health Care Program
+- Cochrane Library for intervention evidence
+- CMS Quality Measures and HEDIS specifications
+- HEDIS (Healthcare Effectiveness Data and Information Set)
+
+### Professional Organizations
+
+- American Medical Association (AMA)
+- American Academy of Family Physicians (AAFP)
+- Specialty society guidelines (ADA, ACC, AHA, APA, etc.)
+- Joint Commission standards
+- Centers for Medicare & Medicaid Services (CMS)
+
+## Frequently Asked Questions
+
+### How do I choose the right template?
+
+Match the template to your primary clinical focus:
+- **Chronic medical conditions** → general_medical or chronic_disease
+- **Post-surgery or injury** → rehabilitation or perioperative
+- **Psychiatric conditions** → mental_health
+- **Pain as primary issue** → pain_management
+
+### What if my patient has multiple conditions?
+
+Use the `chronic_disease_management_plan.tex` template for complex multimorbidity, or choose the template for the primary condition and add sections for comorbidities.
+
+### How often should treatment plans be updated?
+
+- **Initial creation**: At diagnosis or treatment initiation
+- **Regular updates**: Every 3-6 months for chronic conditions
+- **Significant changes**: When goals are met or treatment is modified
+- **Annual review**: Minimum for all chronic disease plans
+
+### Can I modify the LaTeX templates?
+
+Yes! Templates are designed to be customized. Modify sections, add specialty-specific content, or adjust formatting to meet your needs.
+
+### How do I ensure HIPAA compliance?
+
+- Remove all 18 HIPAA identifiers (see Safe Harbor method)
+- Use age ranges instead of exact ages (e.g., "60-65" not "63")
+- Remove specific dates, use relative timelines
+- Omit geographic identifiers smaller than state
+- Use `check_deidentification.py` script from clinical-reports skill
+
+### What if validation scripts find issues?
+
+Review the specific issues identified, consult reference files for guidance, and revise the plan accordingly. Common issues include:
+- Missing required sections
+- Goals not meeting SMART criteria
+- Insufficient monitoring parameters
+- Incomplete medication information
+
+## License
+
+Part of the Claude Scientific Writer project. See main LICENSE file.
+
+---
+
+For detailed documentation, see `SKILL.md`. For issues or questions, consult the comprehensive reference files in the `references/` directory.
+
diff --git a/scientific-skills/treatment-plans/SKILL.md b/scientific-skills/treatment-plans/SKILL.md
new file mode 100644
index 0000000..24b4f49
--- /dev/null
+++ b/scientific-skills/treatment-plans/SKILL.md
@@ -0,0 +1,1576 @@
+---
+name: treatment-plans
+description: "Generate concise (3-4 page), focused medical treatment plans in LaTeX/PDF format for all clinical specialties. Supports general medical treatment, rehabilitation therapy, mental health care, chronic disease management, perioperative care, and pain management. Includes SMART goal frameworks, evidence-based interventions with minimal text citations, regulatory compliance (HIPAA), and professional formatting. Prioritizes brevity and clinical actionability."
+allowed-tools: [Read, Write, Edit, Bash]
+---
+
+# Treatment Plan Writing
+
+## Overview
+
+Treatment plan writing is the systematic documentation of clinical care strategies designed to address patient health conditions through evidence-based interventions, measurable goals, and structured follow-up. This skill provides comprehensive LaTeX templates and validation tools for creating **concise, focused** treatment plans (3-4 pages standard) across all medical specialties with full regulatory compliance.
+
+**Critical Principles:**
+1. **CONCISE & ACTIONABLE**: Treatment plans default to 3-4 pages maximum, focusing only on clinically essential information that impacts care decisions
+2. **Patient-Centered**: Plans must be evidence-based, measurable, and compliant with healthcare regulations (HIPAA, documentation standards)
+3. **Minimal Citations**: Use brief in-text citations only when needed to support clinical recommendations; avoid extensive bibliographies
+
+Every treatment plan should include clear goals, specific interventions, defined timelines, monitoring parameters, and expected outcomes that align with patient preferences and current clinical guidelines - all presented as efficiently as possible.
+
+## When to Use This Skill
+
+This skill should be used when:
+- Creating individualized treatment plans for patient care
+- Documenting therapeutic interventions for chronic disease management
+- Developing rehabilitation programs (physical therapy, occupational therapy, cardiac rehab)
+- Writing mental health and psychiatric treatment plans
+- Planning perioperative and surgical care pathways
+- Establishing pain management protocols
+- Setting patient-centered goals using SMART criteria
+- Coordinating multidisciplinary care across specialties
+- Ensuring regulatory compliance in treatment documentation
+- Generating professional treatment plans for medical records
+
+## Visual Enhancement with Scientific Schematics
+
+**⚠️ MANDATORY: Every treatment plan MUST include at least 1 AI-generated figure using the scientific-schematics skill.**
+
+This is not optional. Treatment plans benefit greatly from visual elements. Before finalizing any document:
+1. Generate at minimum ONE schematic or diagram (e.g., treatment pathway flowchart, care coordination diagram, or therapy timeline)
+2. For complex plans: include decision algorithm flowchart
+3. For rehabilitation plans: include milestone progression diagram
+
+**How to generate figures:**
+- Use the **scientific-schematics** skill to generate AI-powered publication-quality diagrams
+- Simply describe your desired diagram in natural language
+- Nano Banana Pro will automatically generate, review, and refine the schematic
+
+**How to generate schematics:**
+```bash
+python scripts/generate_schematic.py "your diagram description" -o figures/output.png
+```
+
+The AI will automatically:
+- Create publication-quality images with proper formatting
+- Review and refine through multiple iterations
+- Ensure accessibility (colorblind-friendly, high contrast)
+- Save outputs in the figures/ directory
+
+**When to add schematics:**
+- Treatment pathway flowcharts
+- Care coordination diagrams
+- Therapy progression timelines
+- Multidisciplinary team interaction diagrams
+- Medication management flowcharts
+- Rehabilitation protocol visualizations
+- Clinical decision algorithm diagrams
+- Any complex concept that benefits from visualization
+
+For detailed guidance on creating schematics, refer to the scientific-schematics skill documentation.
+
+---
+
+## Document Format and Best Practices
+
+### Document Length Options
+
+Treatment plans come in three format options based on clinical complexity and use case:
+
+#### Option 1: One-Page Treatment Plan (PREFERRED for most cases)
+
+**When to use**: Straightforward clinical scenarios, standard protocols, busy clinical settings
+
+**Format**: Single page containing all essential treatment information in scannable sections
+- No table of contents needed
+- No extensive narratives
+- Focused on actionable items only
+- Similar to precision oncology reports or treatment recommendation cards
+
+**Required sections** (all on one page):
+1. **Header Box**: Patient info, diagnosis, date, molecular/risk profile if applicable
+2. **Treatment Regimen**: Numbered list of specific interventions
+3. **Supportive Care**: Brief bullet points
+4. **Rationale**: 1-2 sentence justification (optional for standard protocols)
+5. **Monitoring**: Key parameters and frequency
+6. **Evidence Level**: Guideline reference or evidence grade (e.g., "Level 1, FDA approved")
+7. **Expected Outcome**: Timeline and success metrics
+
+**Design principles**:
+- Use small boxes/tables for organization (like the clinical treatment recommendation card format)
+- Eliminate all non-essential text
+- Use abbreviations familiar to clinicians
+- Dense information layout - maximize information per square inch
+- Think "quick reference card" not "comprehensive documentation"
+
+**Example structure**:
+```latex
+[Patient ID/Diagnosis Box at top]
+
+TARGET PATIENT POPULATION
+ Number of patients, demographics, key features
+
+PRIMARY TREATMENT REGIMEN
+ • Medication 1: dose, frequency, duration
+ • Procedure: specific details
+ • Monitoring: what and when
+
+SUPPORTIVE CARE
+ • Key supportive medications
+
+RATIONALE
+ Brief clinical justification
+
+MOLECULAR TARGETS / RISK FACTORS
+ Relevant biomarkers or risk stratification
+
+EVIDENCE LEVEL
+ Guideline reference, trial data
+
+MONITORING REQUIREMENTS
+ Key labs/vitals, frequency
+
+EXPECTED CLINICAL BENEFIT
+ Primary endpoint, timeline
+```
+
+#### Option 2: Standard 3-4 Page Format
+
+**When to use**: Moderate complexity, need for patient education materials, multidisciplinary coordination
+
+Uses the Foundation Medicine first-page summary model with 2-3 additional pages of details.
+
+#### Option 3: Extended 5-6 Page Format
+
+**When to use**: Complex comorbidities, research protocols, extensive safety monitoring required
+
+### First Page Summary (Foundation Medicine Model)
+
+**CRITICAL REQUIREMENT: All treatment plans MUST have a complete executive summary on the first page ONLY, before any table of contents or detailed sections.**
+
+Following the Foundation Medicine model for precision medicine reporting and clinical summary documents, treatment plans begin with a one-page executive summary that provides immediate access to key actionable information. This entire summary must fit on the first page.
+
+**Required First Page Structure (in order):**
+
+1. **Title and Subtitle**
+ - Main title: Treatment plan type (e.g., "Comprehensive Treatment Plan")
+ - Subtitle: Specific condition or focus (e.g., "Type 2 Diabetes Mellitus - Young Adult Patient")
+
+2. **Report Information Box** (using `\begin{infobox}` or `\begin{patientinfo}`)
+ - Report type/document purpose
+ - Date of plan creation
+ - Patient demographics (age, sex, de-identified)
+ - Primary diagnosis with ICD-10 code
+ - Report author/clinic (if applicable)
+ - Analysis approach or framework used
+
+3. **Key Findings or Treatment Highlights** (2-4 colored boxes using appropriate box types)
+ - **Primary Treatment Goals** (using `\begin{goalbox}`)
+ - 2-3 SMART goals in bullet format
+ - **Main Interventions** (using `\begin{keybox}` or `\begin{infobox}`)
+ - 2-3 key interventions (pharmacological, non-pharmacological, monitoring)
+ - **Critical Decision Points** (using `\begin{warningbox}` if urgent)
+ - Important monitoring thresholds or safety considerations
+ - **Timeline Overview** (using `\begin{infobox}`)
+ - Brief treatment duration/phases
+ - Key milestone dates
+
+**Visual Format Requirements:**
+- Use `\thispagestyle{empty}` to remove page numbers from first page
+- All content must fit on page 1 (before `\newpage`)
+- Use colored boxes (tcolorbox package) with different colors for different information types
+- Boxes should be visually prominent and easy to scan
+- Use concise, bullet-point format
+- Table of contents (if included) starts on page 2
+- Detailed sections start on page 3
+
+**Example First Page Structure:**
+```latex
+\maketitle
+\thispagestyle{empty}
+
+% Report Information Box
+\begin{patientinfo}
+ Report Type, Date, Patient Info, Diagnosis, etc.
+\end{patientinfo}
+
+% Key Finding #1: Treatment Goals
+\begin{goalbox}[Primary Treatment Goals]
+ • Goal 1
+ • Goal 2
+ • Goal 3
+\end{goalbox}
+
+% Key Finding #2: Main Interventions
+\begin{keybox}[Core Interventions]
+ • Intervention 1
+ • Intervention 2
+ • Intervention 3
+\end{keybox}
+
+% Key Finding #3: Critical Monitoring (if applicable)
+\begin{warningbox}[Critical Decision Points]
+ • Decision point 1
+ • Decision point 2
+\end{warningbox}
+
+\newpage
+\tableofcontents % TOC on page 2
+\newpage % Detailed content starts page 3
+```
+
+### Concise Documentation
+
+**CRITICAL: Treatment plans MUST prioritize brevity and clinical relevance. Default to 3-4 pages maximum unless clinical complexity absolutely demands more detail.**
+
+Treatment plans should prioritize **clarity and actionability** over exhaustive detail:
+
+- **Focused**: Include only clinically essential information that impacts care decisions
+- **Actionable**: Emphasize what needs to be done, when, and why
+- **Efficient**: Facilitate quick decision-making without sacrificing clinical quality
+- **Target length options**:
+ - **1-page format** (preferred for straightforward cases): Quick-reference card with all essential information
+ - **3-4 pages standard**: Standard format with first-page summary + supporting details
+ - **5-6 pages** (rare): Only for highly complex cases with multiple comorbidities or multidisciplinary interventions
+
+**Streamlining Guidelines:**
+- **First Page Summary**: Use individual colored boxes to consolidate key information (goals, interventions, decision points) - this alone can often convey the essential treatment plan
+- **Eliminate Redundancy**: If information is in the first-page summary, don't repeat it verbatim in detailed sections
+- **Patient Education section**: 3-5 key bullet points on critical topics and warning signs only
+- **Risk Mitigation section**: Highlight only critical medication safety concerns and emergency actions (not exhaustive lists)
+- **Expected Outcomes section**: 2-3 concise statements on anticipated responses and timelines
+- **Interventions**: Focus on primary interventions; secondary/supportive measures in brief bullet format
+- **Use tables and bullet points** extensively for efficient presentation
+- **Avoid narrative prose** where structured lists suffice
+- **Combine related sections** when appropriate to reduce page count
+
+### Quality Over Quantity
+
+The goal is professional, clinically complete documentation that respects clinicians' time while ensuring comprehensive patient care. Every section should add value; remove or condense sections that don't directly inform treatment decisions.
+
+### Citations and Evidence Support
+
+**Use minimal, targeted citations to support clinical recommendations:**
+
+- **Text Citations Preferred**: Use brief in-text citations (Author Year) or simple references rather than extensive bibliographies unless specifically requested
+- **When to Cite**:
+ - Clinical practice guideline recommendations (e.g., "per ADA 2024 guidelines")
+ - Specific medication dosing or protocols (e.g., "ACC/AHA recommendations")
+ - Novel or controversial interventions requiring evidence support
+ - Risk stratification tools or validated assessment scales
+- **When NOT to Cite**:
+ - Standard-of-care interventions widely accepted in the field
+ - Basic medical facts and routine clinical practices
+ - General patient education content
+- **Citation Format**:
+ - Inline: "Initiate metformin as first-line therapy (ADA Standards of Care 2024)"
+ - Minimal: "Treatment follows ACC/AHA heart failure guidelines"
+ - Avoid formal numbered references and extensive bibliography sections unless document is for academic/research purposes
+- **Keep it Brief**: A 3-4 page treatment plan should have 0-3 citations maximum, only where essential for clinical credibility or novel recommendations
+
+## Core Capabilities
+
+### 1. General Medical Treatment Plans
+
+General medical treatment plans address common chronic conditions and acute medical issues requiring structured therapeutic interventions.
+
+#### Standard Components
+
+**Patient Information (De-identified)**
+- Demographics (age, sex, relevant medical background)
+- Active medical conditions and comorbidities
+- Current medications and allergies
+- Relevant social and family history
+- Functional status and baseline assessments
+- **HIPAA Compliance**: Remove all 18 identifiers per Safe Harbor method
+
+**Diagnosis and Assessment Summary**
+- Primary diagnosis with ICD-10 code
+- Secondary diagnoses and comorbidities
+- Severity classification and staging
+- Functional limitations and quality of life impact
+- Risk stratification (e.g., cardiovascular risk, fall risk)
+- Prognostic indicators
+
+**Treatment Goals (SMART Format)**
+
+Short-term goals (1-3 months):
+- **Specific**: Clearly defined outcome (e.g., "Reduce HbA1c to <7%")
+- **Measurable**: Quantifiable metrics (e.g., "Decrease systolic BP by 10 mmHg")
+- **Achievable**: Realistic given patient capabilities
+- **Relevant**: Aligned with patient priorities and values
+- **Time-bound**: Specific timeframe (e.g., "within 8 weeks")
+
+Long-term goals (6-12 months):
+- Disease control or remission targets
+- Functional improvement objectives
+- Quality of life enhancement
+- Prevention of complications
+- Maintenance of independence
+
+**Interventions**
+
+*Pharmacological*:
+- Medications with specific dosages, routes, frequencies
+- Titration schedules and target doses
+- Drug-drug interaction considerations
+- Monitoring for adverse effects
+- Medication reconciliation
+
+*Non-pharmacological*:
+- Lifestyle modifications (diet, exercise, smoking cessation)
+- Behavioral interventions
+- Patient education and self-management
+- Monitoring and self-tracking (glucose, blood pressure, weight)
+- Assistive devices or adaptive equipment
+
+*Procedural*:
+- Planned procedures or interventions
+- Referrals to specialists
+- Diagnostic testing schedule
+- Preventive care (vaccinations, screenings)
+
+**Timeline and Schedule**
+- Treatment phases with specific timeframes
+- Appointment frequency (weekly, monthly, quarterly)
+- Milestone assessments and goal evaluations
+- Medication adjustments schedule
+- Expected duration of treatment
+
+**Monitoring Parameters**
+- Clinical outcomes to track (vital signs, lab values, symptoms)
+- Assessment tools and scales (e.g., PHQ-9, pain scales)
+- Frequency of monitoring
+- Thresholds for intervention or escalation
+- Patient-reported outcomes
+
+**Expected Outcomes**
+- Primary outcome measures
+- Success criteria and benchmarks
+- Expected timeline for improvement
+- Criteria for treatment modification
+- Long-term prognosis
+
+**Follow-up Plan**
+- Scheduled appointments and reassessments
+- Communication plan (phone calls, secure messaging)
+- Emergency contact procedures
+- Criteria for urgent evaluation
+- Transition or discharge planning
+
+**Patient Education**
+- Understanding of condition and treatment rationale
+- Self-management skills training
+- Medication administration and adherence
+- Warning signs and when to seek help
+- Resources and support services
+
+**Risk Mitigation**
+- Potential adverse effects and management
+- Drug interactions and contraindications
+- Fall prevention, infection prevention
+- Emergency action plans
+- Safety monitoring
+
+#### Common Applications
+
+- Diabetes mellitus management
+- Hypertension control
+- Heart failure treatment
+- COPD management
+- Asthma care plans
+- Hyperlipidemia treatment
+- Osteoarthritis management
+- Chronic kidney disease
+
+### 2. Rehabilitation Treatment Plans
+
+Rehabilitation plans focus on restoring function, improving mobility, and enhancing quality of life through structured therapeutic programs.
+
+#### Core Components
+
+**Functional Assessment**
+- Baseline functional status (ADLs, IADLs)
+- Range of motion, strength, balance, endurance
+- Gait analysis and mobility assessment
+- Standardized measures (FIM, Barthel Index, Berg Balance Scale)
+- Environmental assessment (home safety, accessibility)
+
+**Rehabilitation Goals**
+
+*Impairment-level goals*:
+- Improve shoulder flexion to 140 degrees
+- Increase quadriceps strength by 2/5 MMT grades
+- Enhance balance (Berg Score >45/56)
+
+*Activity-level goals*:
+- Independent ambulation 150 feet with assistive device
+- Climb 12 stairs with handrail supervision
+- Transfer bed-to-chair independently
+
+*Participation-level goals*:
+- Return to work with modifications
+- Resume recreational activities
+- Independent community mobility
+
+**Therapeutic Interventions**
+
+*Physical Therapy*:
+- Therapeutic exercises (strengthening, stretching, endurance)
+- Manual therapy techniques
+- Gait training and balance activities
+- Modalities (heat, ice, electrical stimulation, ultrasound)
+- Assistive device training
+
+*Occupational Therapy*:
+- ADL training (bathing, dressing, grooming, feeding)
+- Upper extremity strengthening and coordination
+- Adaptive equipment and modifications
+- Energy conservation techniques
+- Cognitive rehabilitation
+
+*Speech-Language Pathology*:
+- Swallowing therapy and dysphagia management
+- Communication strategies and augmentative devices
+- Cognitive-linguistic therapy
+- Voice therapy
+
+*Other Services*:
+- Recreational therapy
+- Aquatic therapy
+- Cardiac rehabilitation
+- Pulmonary rehabilitation
+- Vestibular rehabilitation
+
+**Treatment Schedule**
+- Frequency: 3x/week PT, 2x/week OT (example)
+- Session duration: 45-60 minutes
+- Treatment phase durations (acute, subacute, maintenance)
+- Expected total duration: 8-12 weeks
+- Reassessment intervals
+
+**Progress Monitoring**
+- Weekly functional assessments
+- Standardized outcome measures
+- Goal attainment scaling
+- Pain and symptom tracking
+- Patient satisfaction
+
+**Home Exercise Program**
+- Specific exercises with repetitions/sets/frequency
+- Precautions and safety instructions
+- Progression criteria
+- Self-monitoring strategies
+
+#### Specialty Rehabilitation
+
+- Post-stroke rehabilitation
+- Orthopedic rehabilitation (joint replacement, fracture)
+- Cardiac rehabilitation (post-MI, post-surgery)
+- Pulmonary rehabilitation
+- Vestibular rehabilitation
+- Neurological rehabilitation
+- Sports injury rehabilitation
+
+### 3. Mental Health Treatment Plans
+
+Mental health treatment plans address psychiatric conditions through integrated psychotherapeutic, pharmacological, and psychosocial interventions.
+
+#### Essential Components
+
+**Psychiatric Assessment**
+- Primary psychiatric diagnosis (DSM-5 criteria)
+- Symptom severity and functional impairment
+- Co-occurring mental health conditions
+- Substance use assessment
+- Suicide/homicide risk assessment
+- Trauma history and PTSD screening
+- Social determinants of mental health
+
+**Treatment Goals**
+
+*Symptom reduction*:
+- Decrease depression severity (PHQ-9 score from 18 to <10)
+- Reduce anxiety symptoms (GAD-7 score <5)
+- Improve sleep quality (Pittsburgh Sleep Quality Index)
+- Stabilize mood (reduced mood episodes)
+
+*Functional improvement*:
+- Return to work or school
+- Improve social relationships and support
+- Enhance coping skills and emotional regulation
+- Increase engagement in meaningful activities
+
+*Recovery-oriented goals*:
+- Build resilience and self-efficacy
+- Develop crisis management skills
+- Establish sustainable wellness routines
+- Achieve personal recovery goals
+
+**Therapeutic Interventions**
+
+*Psychotherapy*:
+- Evidence-based modality (CBT, DBT, ACT, psychodynamic, IPT)
+- Session frequency (weekly, biweekly)
+- Treatment duration (12-16 weeks, ongoing)
+- Specific techniques and targets
+- Group therapy participation
+
+*Psychopharmacology*:
+- Medication class and rationale
+- Starting dose and titration schedule
+- Target symptoms
+- Expected response timeline (2-4 weeks for antidepressants)
+- Side effect monitoring
+- Combination therapy considerations
+
+*Psychosocial Interventions*:
+- Case management services
+- Peer support programs
+- Family therapy or psychoeducation
+- Vocational rehabilitation
+- Supported housing or community integration
+- Substance abuse treatment
+
+**Safety Planning**
+- Crisis contacts and emergency services
+- Warning signs and triggers
+- Coping strategies and self-soothing techniques
+- Safe environment modifications
+- Means restriction (firearms, medications)
+- Support system activation
+
+**Monitoring and Assessment**
+- Symptom rating scales (weekly or biweekly)
+- Medication adherence and side effects
+- Suicidal ideation screening
+- Functional status assessments
+- Treatment engagement and therapeutic alliance
+
+**Patient and Family Education**
+- Psychoeducation about diagnosis
+- Treatment rationale and expectations
+- Medication information
+- Relapse prevention strategies
+- Community resources
+
+#### Mental Health Conditions
+
+- Major depressive disorder
+- Anxiety disorders (GAD, panic, social anxiety)
+- Bipolar disorder
+- Schizophrenia and psychotic disorders
+- PTSD and trauma-related disorders
+- Eating disorders
+- Substance use disorders
+- Personality disorders
+
+### 4. Chronic Disease Management Plans
+
+Comprehensive long-term care plans for chronic conditions requiring ongoing monitoring, treatment adjustments, and multidisciplinary coordination.
+
+#### Key Features
+
+**Disease-Specific Targets**
+- Evidence-based treatment goals per guidelines
+- Stage-appropriate interventions
+- Complication prevention strategies
+- Disease progression monitoring
+
+**Self-Management Support**
+- Patient activation and engagement
+- Shared decision-making
+- Action plans for symptom changes
+- Technology-enabled monitoring (apps, remote monitoring)
+
+**Care Coordination**
+- Primary care physician oversight
+- Specialist consultations and co-management
+- Care transitions (hospital to home)
+- Medication management across providers
+- Communication protocols
+
+**Population Health Integration**
+- Registry tracking and outreach
+- Preventive care and screening schedules
+- Quality measure reporting
+- Care gaps identification
+
+#### Applicable Conditions
+
+- Type 1 and Type 2 diabetes
+- Cardiovascular disease (CHF, CAD)
+- Chronic respiratory diseases (COPD, asthma)
+- Chronic kidney disease
+- Inflammatory bowel disease
+- Rheumatoid arthritis and autoimmune conditions
+- HIV/AIDS
+- Cancer survivorship care
+
+### 5. Perioperative Care Plans
+
+Structured plans for surgical and procedural patients covering preoperative preparation, intraoperative management, and postoperative recovery.
+
+#### Components
+
+**Preoperative Assessment**
+- Surgical indication and planned procedure
+- Preoperative risk stratification (ASA class, cardiac risk)
+- Optimization of medical conditions
+- Medication management (continuation, discontinuation)
+- Preoperative testing and clearances
+- Informed consent and patient education
+
+**Perioperative Interventions**
+- Enhanced recovery after surgery (ERAS) protocols
+- Venous thromboembolism prophylaxis
+- Antibiotic prophylaxis
+- Glycemic control strategies
+- Pain management plan (multimodal analgesia)
+
+**Postoperative Care**
+- Immediate recovery goals (24-48 hours)
+- Early mobilization protocols
+- Diet advancement
+- Wound care and drain management
+- Pain control regimen
+- Complication monitoring
+
+**Discharge Planning**
+- Activity restrictions and progression
+- Medication reconciliation
+- Follow-up appointments
+- Home health or rehabilitation services
+- Return-to-work timeline
+
+### 6. Pain Management Plans
+
+Multimodal approaches to acute and chronic pain using evidence-based interventions and opioid-sparing strategies.
+
+#### Comprehensive Components
+
+**Pain Assessment**
+- Pain location, quality, intensity (0-10 scale)
+- Temporal pattern (constant, intermittent, breakthrough)
+- Aggravating and alleviating factors
+- Functional impact (sleep, activities, mood)
+- Previous treatments and responses
+- Psychosocial contributors
+
+**Multimodal Interventions**
+
+*Pharmacological*:
+- Non-opioid analgesics (acetaminophen, NSAIDs)
+- Adjuvant medications (antidepressants, anticonvulsants, muscle relaxants)
+- Topical agents (lidocaine, capsaicin, diclofenac)
+- Opioid therapy (when appropriate, with risk mitigation)
+- Titration and rotation strategies
+
+*Interventional Procedures*:
+- Nerve blocks and injections
+- Radiofrequency ablation
+- Spinal cord stimulation
+- Intrathecal drug delivery
+
+*Non-pharmacological*:
+- Physical therapy and exercise
+- Cognitive-behavioral therapy for pain
+- Mindfulness and relaxation techniques
+- Acupuncture
+- TENS units
+
+**Opioid Safety (when prescribed)**
+- Indication and planned duration
+- Prescription drug monitoring program (PDMP) check
+- Opioid risk assessment tools
+- Naloxone prescription
+- Treatment agreements
+- Random urine drug screening
+- Frequent follow-up and reassessment
+
+**Functional Goals**
+- Specific activity improvements
+- Sleep quality enhancement
+- Reduced pain interference
+- Improved quality of life
+- Return to work or meaningful activities
+
+## Best Practices
+
+### Brevity and Focus (HIGHEST PRIORITY)
+
+**Treatment plans MUST be concise and focused on actionable clinical information:**
+
+- **1-page format is PREFERRED**: For most clinical scenarios, a single-page treatment plan (like precision oncology reports) provides all necessary information
+- **Default to shortest format possible**: Start with 1-page; only expand if clinical complexity genuinely requires it
+- **Every sentence must add value**: If a section doesn't change clinical decision-making, omit it entirely
+- **Think "quick reference card" not "comprehensive textbook"**: Busy clinicians need scannable, dense information
+- **Avoid academic verbosity**: This is clinical documentation, not a literature review or teaching document
+- **Maximum lengths by complexity**:
+ - Simple/standard cases: 1 page
+ - Moderate complexity: 3-4 pages (first-page summary + details)
+ - High complexity (rare): 5-6 pages maximum
+
+### First Page Summary (Most Important)
+
+**ALWAYS create a one-page executive summary as the first page:**
+- The first page must contain ONLY: Title, Report Info Box, and Key Findings boxes
+- This provides an at-a-glance overview similar to precision medicine reports
+- Table of contents and detailed sections start on page 2 or later
+- Think of it as a "clinical highlights" page that a busy clinician can scan in 30 seconds
+- Use 2-4 colored boxes for different key findings (goals, interventions, decision points)
+- **A strong first page can often stand alone** - subsequent pages are for details, not repetition
+
+### SMART Goal Setting
+
+All treatment goals should meet SMART criteria:
+
+- **Specific**: "Improve HbA1c to <7%" not "Better diabetes control"
+- **Measurable**: Use quantifiable metrics, validated scales, objective measures
+- **Achievable**: Consider patient capabilities, resources, social support
+- **Relevant**: Align with patient values, priorities, and life circumstances
+- **Time-bound**: Define clear timeframes for goal achievement and reassessment
+
+### Patient-Centered Care
+
+✓ **Shared Decision-Making**: Involve patients in goal-setting and treatment choices
+✓ **Cultural Competence**: Respect cultural beliefs, language preferences, health literacy
+✓ **Patient Preferences**: Honor treatment preferences and personal values
+✓ **Individualization**: Tailor plans to patient's unique circumstances
+✓ **Empowerment**: Support patient activation and self-management
+
+### Evidence-Based Practice
+
+✓ **Clinical Guidelines**: Follow current specialty society recommendations
+✓ **Quality Measures**: Incorporate HEDIS, CMS quality measures
+✓ **Comparative Effectiveness**: Use treatments with proven efficacy
+✓ **Avoid Low-Value Care**: Eliminate unnecessary tests and interventions
+✓ **Stay Current**: Update plans based on emerging evidence
+
+### Documentation Standards
+
+✓ **Completeness**: Include all required elements
+✓ **Clarity**: Use clear, professional medical language
+✓ **Accuracy**: Ensure factual correctness and current information
+✓ **Timeliness**: Document plans promptly
+✓ **Legibility**: Professional formatting and organization
+✓ **Signature and Date**: Authenticate all treatment plans
+
+### Regulatory Compliance
+
+✓ **HIPAA Privacy**: De-identify all protected health information
+✓ **Informed Consent**: Document patient understanding and agreement
+✓ **Billing Support**: Include documentation to support medical necessity
+✓ **Quality Reporting**: Enable extraction of quality metrics
+✓ **Legal Protection**: Maintain defensible clinical documentation
+
+### Multidisciplinary Coordination
+
+✓ **Team Communication**: Share plans across care team
+✓ **Role Clarity**: Define responsibilities for each team member
+✓ **Care Transitions**: Ensure continuity across settings
+✓ **Specialist Integration**: Coordinate with subspecialty care
+✓ **Patient-Centered Medical Home**: Align with PCMH principles
+
+## LaTeX Template Usage
+
+### Template Selection
+
+Choose the appropriate template based on clinical context and desired length:
+
+#### Concise Templates (PREFERRED)
+
+1. **one_page_treatment_plan.tex** - **FIRST CHOICE** for most cases
+ - All clinical specialties
+ - Standard protocols and straightforward cases
+ - Quick-reference format similar to precision oncology reports
+ - Dense, scannable, clinician-focused
+ - Use this unless complexity demands more detail
+
+#### Standard Templates (3-4 pages)
+
+Use only when one-page format is insufficient due to complexity:
+
+2. **general_medical_treatment_plan.tex** - Primary care, chronic disease, general medicine
+3. **rehabilitation_treatment_plan.tex** - PT/OT, post-surgery, injury recovery
+4. **mental_health_treatment_plan.tex** - Psychiatric conditions, behavioral health
+5. **chronic_disease_management_plan.tex** - Complex chronic diseases, multiple conditions
+6. **perioperative_care_plan.tex** - Surgical patients, procedural care
+7. **pain_management_plan.tex** - Acute or chronic pain conditions
+
+**Note**: Even when using standard templates, adapt them to be concise (3-4 pages max) by removing non-essential sections.
+
+### Template Structure
+
+All LaTeX templates include:
+- Professional formatting with appropriate margins and fonts
+- Structured sections for all required components
+- Tables for medications, interventions, timelines
+- Goal-tracking sections with SMART criteria
+- Space for provider signatures and dates
+- HIPAA-compliant de-identification guidance
+- Comments with detailed instructions
+
+### Generating PDFs
+
+```bash
+# Compile LaTeX template to PDF
+pdflatex general_medical_treatment_plan.tex
+
+# For templates with references
+pdflatex treatment_plan.tex
+bibtex treatment_plan
+pdflatex treatment_plan.tex
+pdflatex treatment_plan.tex
+```
+
+## Validation and Quality Assurance
+
+### Completeness Checking
+
+Use validation scripts to ensure all required sections are present:
+
+```bash
+python check_completeness.py my_treatment_plan.tex
+```
+
+The script checks for:
+- Patient information section
+- Diagnosis and assessment
+- SMART goals (short-term and long-term)
+- Interventions (pharmacological, non-pharmacological)
+- Timeline and schedule
+- Monitoring parameters
+- Expected outcomes
+- Follow-up plan
+- Patient education
+- Risk mitigation
+
+### Treatment Plan Validation
+
+Comprehensive validation of treatment plan quality:
+
+```bash
+python validate_treatment_plan.py my_treatment_plan.tex
+```
+
+Validation includes:
+- SMART goal criteria assessment
+- Evidence-based intervention verification
+- Timeline feasibility check
+- Monitoring parameter adequacy
+- Safety and risk mitigation review
+- Regulatory compliance check
+
+### Quality Checklist
+
+Review treatment plans against the quality checklist (`quality_checklist.md`):
+
+**Clinical Quality**
+- [ ] Diagnosis is accurate and properly coded (ICD-10)
+- [ ] Goals are SMART and patient-centered
+- [ ] Interventions are evidence-based and guideline-concordant
+- [ ] Timeline is realistic and clearly defined
+- [ ] Monitoring plan is comprehensive
+- [ ] Safety considerations are addressed
+
+**Patient-Centered Care**
+- [ ] Patient preferences and values incorporated
+- [ ] Shared decision-making documented
+- [ ] Health literacy appropriate language
+- [ ] Cultural considerations addressed
+- [ ] Patient education plan included
+
+**Regulatory Compliance**
+- [ ] HIPAA-compliant de-identification
+- [ ] Medical necessity documented
+- [ ] Informed consent noted
+- [ ] Provider signature and credentials
+- [ ] Date of plan creation/revision
+
+**Coordination and Communication**
+- [ ] Specialist referrals documented
+- [ ] Care team roles defined
+- [ ] Follow-up schedule clear
+- [ ] Emergency contacts provided
+- [ ] Transition planning addressed
+
+## Integration with Other Skills
+
+### Clinical Reports Integration
+
+Treatment plans often accompany other clinical documentation:
+
+- **SOAP Notes** (`clinical-reports` skill): Document ongoing implementation
+- **H&P** (`clinical-reports` skill): Initial assessment informs treatment plan
+- **Discharge Summaries** (`clinical-reports` skill): Summarize treatment plan execution
+- **Progress Notes**: Track goal achievement and plan modifications
+
+### Scientific Writing Integration
+
+Evidence-based treatment planning requires literature support:
+
+- **Citation Management** (`citation-management` skill): Reference clinical guidelines
+- **Literature Review** (`literature-review` skill): Understand treatment evidence base
+- **Research Lookup** (`research-lookup` skill): Find current best practices
+
+### Research Integration
+
+Treatment plans may be developed for clinical trials or research studies:
+
+- **Research Grants** (`research-grants` skill): Treatment protocols for funded studies
+- **Clinical Trial Reports** (`clinical-reports` skill): Intervention documentation
+
+## Common Use Cases
+
+### Example 1: Type 2 Diabetes Management
+
+**Scenario**: 58-year-old patient with newly diagnosed Type 2 diabetes, HbA1c 8.5%, BMI 32
+
+**Template**: `general_medical_treatment_plan.tex`
+
+**Goals**:
+- Short-term: Reduce HbA1c to <7.5% in 3 months
+- Long-term: Achieve HbA1c <7%, lose 15 pounds in 6 months
+
+**Interventions**:
+- Pharmacological: Metformin 500mg BID, titrate to 1000mg BID
+- Lifestyle: Mediterranean diet, 150 min/week moderate exercise
+- Education: Diabetes self-management education, glucose monitoring
+
+### Example 2: Post-Stroke Rehabilitation
+
+**Scenario**: 70-year-old patient s/p left MCA stroke with right hemiparesis
+
+**Template**: `rehabilitation_treatment_plan.tex`
+
+**Goals**:
+- Short-term: Improve right arm strength 2/5 to 3/5 in 4 weeks
+- Long-term: Independent ambulation 150 feet with cane in 12 weeks
+
+**Interventions**:
+- PT 3x/week: Gait training, balance, strengthening
+- OT 3x/week: ADL training, upper extremity function
+- SLP 2x/week: Dysphagia therapy
+
+### Example 3: Major Depressive Disorder
+
+**Scenario**: 35-year-old with moderate depression, PHQ-9 score 16
+
+**Template**: `mental_health_treatment_plan.tex`
+
+**Goals**:
+- Short-term: Reduce PHQ-9 to <10 in 8 weeks
+- Long-term: Achieve remission (PHQ-9 <5), return to work
+
+**Interventions**:
+- Psychotherapy: CBT weekly sessions
+- Medication: Sertraline 50mg daily, titrate to 100mg
+- Lifestyle: Sleep hygiene, exercise 30 min 5x/week
+
+### Example 4: Total Knee Arthroplasty
+
+**Scenario**: 68-year-old scheduled for right TKA for osteoarthritis
+
+**Template**: `perioperative_care_plan.tex`
+
+**Preoperative Goals**:
+- Optimize diabetes control (glucose <180)
+- Discontinue anticoagulation per protocol
+- Complete medical clearance
+
+**Postoperative Goals**:
+- Ambulate 50 feet by POD 1
+- 90-degree knee flexion by POD 3
+- Discharge home with PT services by POD 2-3
+
+### Example 5: Chronic Low Back Pain
+
+**Scenario**: 45-year-old with chronic non-specific low back pain, pain 7/10
+
+**Template**: `pain_management_plan.tex`
+
+**Goals**:
+- Short-term: Reduce pain to 4/10 in 6 weeks
+- Long-term: Return to work full-time, pain 2-3/10
+
+**Interventions**:
+- Pharmacological: Gabapentin 300mg TID, duloxetine 60mg daily
+- PT: Core strengthening, McKenzie exercises 2x/week x 8 weeks
+- Behavioral: CBT for pain, mindfulness meditation
+- Interventional: Consider lumbar ESI if inadequate response
+
+## Professional Standards and Guidelines
+
+Treatment plans should align with:
+
+### General Medicine
+- American Diabetes Association (ADA) Standards of Care
+- ACC/AHA Cardiovascular Guidelines
+- GOLD COPD Guidelines
+- JNC-8 Hypertension Guidelines
+- KDIGO Chronic Kidney Disease Guidelines
+
+### Rehabilitation
+- APTA Clinical Practice Guidelines
+- AOTA Practice Guidelines
+- Cardiac Rehabilitation Guidelines (AHA/AACVPR)
+- Stroke Rehabilitation Guidelines
+
+### Mental Health
+- APA Practice Guidelines
+- VA/DoD Clinical Practice Guidelines
+- NICE Guidelines (National Institute for Health and Care Excellence)
+- Cochrane Reviews for psychiatric interventions
+
+### Pain Management
+- CDC Opioid Prescribing Guidelines
+- AAPM/APS Chronic Pain Guidelines
+- WHO Pain Ladder
+- Multimodal Analgesia Best Practices
+
+## Timeline Generation
+
+Use the timeline generator script to create visual treatment timelines:
+
+```bash
+python timeline_generator.py --plan my_treatment_plan.tex --output timeline.pdf
+```
+
+Generates:
+- Gantt chart of treatment phases
+- Milestone markers for goal assessments
+- Medication titration schedules
+- Follow-up appointment calendar
+- Intervention intensity over time
+
+## Support and Resources
+
+### Template Generation
+
+Interactive template selection:
+
+```bash
+cd .claude/skills/treatment-plans/scripts
+python generate_template.py
+
+# Or specify type directly
+python generate_template.py --type mental_health --output depression_treatment_plan.tex
+```
+
+### Validation Workflow
+
+1. **Create treatment plan** using appropriate LaTeX template
+2. **Check completeness**: `python check_completeness.py plan.tex`
+3. **Validate quality**: `python validate_treatment_plan.py plan.tex`
+4. **Review checklist**: Compare against `quality_checklist.md`
+5. **Generate PDF**: `pdflatex plan.tex`
+6. **Review with patient**: Ensure understanding and agreement
+7. **Implement and document**: Track progress in clinical notes
+
+### Additional Resources
+
+- Clinical practice guidelines from specialty societies
+- AHRQ Effective Health Care Program
+- Cochrane Library for intervention evidence
+- UpToDate and DynaMed for treatment recommendations
+- CMS Quality Measures and HEDIS specifications
+
+## Professional Document Styling
+
+### Overview
+
+Treatment plans can be enhanced with professional medical document styling using the `medical_treatment_plan.sty` LaTeX package. This custom style transforms plain academic documents into visually appealing, color-coded clinical documents that maintain scientific rigor while improving readability and usability.
+
+### Medical Treatment Plan Style Package
+
+The `medical_treatment_plan.sty` package (located in `assets/medical_treatment_plan.sty`) provides:
+
+**Professional Color Scheme**
+- **Primary Blue** (RGB: 0, 102, 153): Headers, section titles, primary accents
+- **Secondary Blue** (RGB: 102, 178, 204): Light backgrounds, subtle accents
+- **Accent Blue** (RGB: 0, 153, 204): Hyperlinks, key highlights
+- **Success Green** (RGB: 0, 153, 76): Goals, positive outcomes
+- **Warning Red** (RGB: 204, 0, 0): Warnings, critical information
+- **Dark Gray** (RGB: 64, 64, 64): Body text
+- **Light Gray** (RGB: 245, 245, 245): Background fills
+
+**Styled Elements**
+- Custom colored headers and footers with professional rules
+- Blue section titles with underlines for clear hierarchy
+- Enhanced table formatting with colored headers and alternating rows
+- Optimized list spacing with colored bullets and numbering
+- Professional page layout with appropriate margins
+
+### Custom Information Boxes
+
+The style package includes five specialized box environments for organizing clinical information:
+
+#### 1. Info Box (Blue Border, Light Gray Background)
+
+For general information, clinical assessments, and testing schedules:
+
+```latex
+\begin{infobox}[Title]
+ \textbf{Key Information:}
+ \begin{itemize}
+ \item Clinical assessment details
+ \item Testing schedules
+ \item General guidance
+ \end{itemize}
+\end{infobox}
+```
+
+**Use cases**: Metabolic status, baseline assessments, monitoring schedules, titration protocols
+
+#### 2. Warning Box (Red Border, Yellow Background)
+
+For critical decision points, safety protocols, and alerts:
+
+```latex
+\begin{warningbox}[Alert Title]
+ \textbf{Important Safety Information:}
+ \begin{itemize}
+ \item Critical drug interactions
+ \item Safety monitoring requirements
+ \item Red flag symptoms requiring immediate action
+ \end{itemize}
+\end{warningbox}
+```
+
+**Use cases**: Medication safety, decision points, contraindications, emergency protocols
+
+#### 3. Goal Box (Green Border, Green-Tinted Background)
+
+For treatment goals, targets, and success criteria:
+
+```latex
+\begin{goalbox}[Treatment Goals]
+ \textbf{Primary Objectives:}
+ \begin{itemize}
+ \item Reduce HbA1c to <7\% within 3 months
+ \item Achieve 5-7\% weight loss in 12 weeks
+ \item Complete diabetes education program
+ \end{itemize}
+\end{goalbox}
+```
+
+**Use cases**: SMART goals, target outcomes, success metrics, CGM goals
+
+#### 4. Key Points Box (Blue Background)
+
+For executive summaries, key takeaways, and important recommendations:
+
+```latex
+\begin{keybox}[Key Highlights]
+ \textbf{Essential Points:}
+ \begin{itemize}
+ \item Main therapeutic approach
+ \item Critical patient instructions
+ \item Priority interventions
+ \end{itemize}
+\end{keybox}
+```
+
+**Use cases**: Plan overview, plate method instructions, important dietary guidelines
+
+#### 5. Emergency Box (Large Red Design)
+
+For emergency contacts and urgent protocols:
+
+```latex
+\begin{emergencybox}
+ \begin{itemize}
+ \item \textbf{Emergency Services:} 911
+ \item \textbf{Endocrinology Office:} [Phone] (business hours)
+ \item \textbf{After-Hours Hotline:} [Phone] (nights/weekends)
+ \item \textbf{Pharmacy:} [Phone and location]
+ \end{itemize}
+\end{emergencybox}
+```
+
+**Use cases**: Emergency contacts, critical hotlines, urgent resource information
+
+#### 6. Patient Info Box (White with Blue Border)
+
+For patient demographics and baseline information:
+
+```latex
+\begin{patientinfo}
+ \begin{tabular}{ll}
+ \textbf{Age:} & 23 years \\
+ \textbf{Sex:} & Male \\
+ \textbf{Diagnosis:} & Type 2 Diabetes Mellitus \\
+ \textbf{Plan Start Date:} & \today \\
+ \end{tabular}
+\end{patientinfo}
+```
+
+**Use cases**: Patient information sections, demographic data
+
+### Professional Table Formatting
+
+Enhanced table environment with medical styling:
+
+```latex
+\begin{medtable}{Caption Text}
+\begin{tabular}{|p{5cm}|p{4cm}|p{4.5cm}|}
+\hline
+\tableheadercolor % Blue header with white text
+\textcolor{white}{\textbf{Column 1}} &
+\textcolor{white}{\textbf{Column 2}} &
+\textcolor{white}{\textbf{Column 3}} \\
+\hline
+Data row 1 content & Value 1 & Details 1 \\
+\hline
+\tablerowcolor % Alternating light gray row
+Data row 2 content & Value 2 & Details 2 \\
+\hline
+Data row 3 content & Value 3 & Details 3 \\
+\hline
+\end{tabular}
+\caption{Table caption}
+\end{medtable}
+```
+
+**Features:**
+- Blue headers with white text for visual prominence
+- Alternating row colors (`\tablerowcolor`) for improved readability
+- Automatic centering and spacing
+- Professional borders and padding
+
+### Using the Style Package
+
+#### Basic Setup
+
+1. **Add to document preamble:**
+
+```latex
+% !TEX program = xelatex
+\documentclass[11pt,letterpaper]{article}
+
+% Use custom medical treatment plan style
+\usepackage{medical_treatment_plan}
+\usepackage{natbib}
+
+\begin{document}
+\maketitle
+% Your content here
+\end{document}
+```
+
+2. **Ensure style file is in same directory** as your `.tex` file, or install to LaTeX path
+
+3. **Compile with XeLaTeX** (recommended for best results):
+
+```bash
+xelatex treatment_plan.tex
+bibtex treatment_plan
+xelatex treatment_plan.tex
+xelatex treatment_plan.tex
+```
+
+#### Custom Title Page
+
+The package automatically formats the title with a professional blue header:
+
+```latex
+\title{\textbf{Individualized Diabetes Treatment Plan}\\
+\large{23-Year-Old Male Patient with Type 2 Diabetes}}
+\author{Comprehensive Care Plan}
+\date{\today}
+
+\begin{document}
+\maketitle
+```
+
+This creates an eye-catching blue box with white text and clear hierarchy.
+
+### Compilation Requirements
+
+**Required LaTeX Packages** (automatically loaded by the style):
+- `geometry` - Page layout and margins
+- `xcolor` - Color support
+- `tcolorbox` with `[most]` library - Custom colored boxes
+- `tikz` - Graphics and drawing
+- `fontspec` - Font management (XeLaTeX/LuaLaTeX)
+- `fancyhdr` - Custom headers and footers
+- `titlesec` - Section styling
+- `enumitem` - Enhanced list formatting
+- `booktabs` - Professional table rules
+- `longtable` - Multi-page tables
+- `array` - Enhanced table features
+- `colortbl` - Colored table cells
+- `hyperref` - Hyperlinks and PDF metadata
+- `natbib` - Bibliography management
+
+**Recommended Compilation:**
+
+```bash
+# Using XeLaTeX (best font support)
+xelatex document.tex
+bibtex document
+xelatex document.tex
+xelatex document.tex
+
+# Using PDFLaTeX (alternative)
+pdflatex document.tex
+bibtex document
+pdflatex document.tex
+pdflatex document.tex
+```
+
+### Customization Options
+
+#### Changing Colors
+
+Edit the style file to modify the color scheme:
+
+```latex
+% In medical_treatment_plan.sty
+\definecolor{primaryblue}{RGB}{0, 102, 153} % Modify these
+\definecolor{secondaryblue}{RGB}{102, 178, 204}
+\definecolor{accentblue}{RGB}{0, 153, 204}
+\definecolor{successgreen}{RGB}{0, 153, 76}
+\definecolor{warningred}{RGB}{204, 0, 0}
+```
+
+#### Adjusting Page Layout
+
+Modify geometry settings in the style file:
+
+```latex
+\RequirePackage[margin=1in, top=1.2in, bottom=1.2in]{geometry}
+```
+
+#### Custom Fonts (XeLaTeX only)
+
+Uncomment and modify in the style file:
+
+```latex
+\setmainfont{Your Preferred Font}
+\setsansfont{Your Sans-Serif Font}
+```
+
+#### Header/Footer Customization
+
+Modify in the style file:
+
+```latex
+\fancyhead[L]{\color{primaryblue}\sffamily\small\textbf{Treatment Plan Title}}
+\fancyhead[R]{\color{darkgray}\sffamily\small Patient Info}
+```
+
+### Style Package Download and Installation
+
+#### Option 1: Copy to Project Directory
+
+Copy `assets/medical_treatment_plan.sty` to the same directory as your `.tex` file.
+
+#### Option 2: Install to User TeX Directory
+
+```bash
+# Find your local texmf directory
+kpsewhich -var-value TEXMFHOME
+
+# Copy to appropriate location (usually ~/texmf/tex/latex/)
+mkdir -p ~/texmf/tex/latex/medical_treatment_plan
+cp assets/medical_treatment_plan.sty ~/texmf/tex/latex/medical_treatment_plan/
+
+# Update TeX file database
+texhash ~/texmf
+```
+
+#### Option 3: System-Wide Installation
+
+```bash
+# Copy to system texmf directory (requires sudo)
+sudo cp assets/medical_treatment_plan.sty /usr/local/texlive/texmf-local/tex/latex/
+sudo texhash
+```
+
+### Additional Professional Styles (Optional)
+
+Other medical/clinical document styles available from CTAN:
+
+**Journal Styles:**
+```bash
+# Install via TeX Live Manager
+tlmgr install nejm # New England Journal of Medicine
+tlmgr install jama # JAMA style
+tlmgr install bmj # British Medical Journal
+```
+
+**General Professional Styles:**
+```bash
+tlmgr install apa7 # APA 7th edition (health sciences)
+tlmgr install IEEEtran # IEEE (medical devices/engineering)
+tlmgr install springer # Springer journals
+```
+
+**Download from CTAN:**
+- Visit: https://ctan.org/
+- Search for medical document classes
+- Download and install per package instructions
+
+### Troubleshooting
+
+**Issue: Package not found**
+```bash
+# Install missing packages via TeX Live Manager
+sudo tlmgr update --self
+sudo tlmgr install tcolorbox tikz pgf
+```
+
+**Issue: Missing characters (✓, ≥, etc.)**
+- Use XeLaTeX instead of PDFLaTeX
+- Or replace with LaTeX commands: `$\checkmark$`, `$\geq$`
+- Requires `amssymb` package for math symbols
+
+**Issue: Header height warnings**
+- Style file sets `\setlength{\headheight}{22pt}`
+- Adjust if needed for your content
+
+**Issue: Boxes not rendering**
+```bash
+# Ensure complete tcolorbox installation
+sudo tlmgr install tcolorbox tikz pgf
+```
+
+**Issue: Font not found (XeLaTeX)**
+- Comment out custom font lines in .sty file
+- Or install specified fonts on your system
+
+### Best Practices for Styled Documents
+
+1. **Appropriate Box Usage**
+ - Match box type to content purpose (goals→green, warnings→yellow/red)
+ - Don't overuse boxes; reserve for truly important information
+ - Keep box content concise and focused
+
+2. **Visual Hierarchy**
+ - Use section styling for structure
+ - Boxes for emphasis and organization
+ - Tables for comparative data
+ - Lists for sequential or grouped items
+
+3. **Color Consistency**
+ - Stick to defined color scheme
+ - Use `\textcolor{primaryblue}{\textbf{Text}}` for emphasis
+ - Maintain consistent meaning (red=warning, green=goals)
+
+4. **White Space**
+ - Don't overcrowd pages with boxes
+ - Use `\vspace{0.5cm}` between major sections
+ - Allow breathing room around colored elements
+
+5. **Professional Appearance**
+ - Maintain readability as top priority
+ - Ensure sufficient contrast for accessibility
+ - Test print output in grayscale
+ - Keep styling consistent throughout document
+
+6. **Table Formatting**
+ - Use `\tableheadercolor` for all header rows
+ - Apply `\tablerowcolor` to alternating rows in tables >3 rows
+ - Keep column widths balanced
+ - Use `\small\sffamily` for large tables
+
+### Example: Styled Treatment Plan Structure
+
+```latex
+% !TEX program = xelatex
+\documentclass[11pt,letterpaper]{article}
+\usepackage{medical_treatment_plan}
+\usepackage{natbib}
+
+\title{\textbf{Comprehensive Treatment Plan}\\
+\large{Patient-Centered Care Strategy}}
+\author{Multidisciplinary Care Team}
+\date{\today}
+
+\begin{document}
+\maketitle
+
+\section*{Patient Information}
+\begin{patientinfo}
+ % Demographics table
+\end{patientinfo}
+
+\section{Executive Summary}
+\begin{keybox}[Plan Overview]
+ % Key highlights
+\end{keybox}
+
+\section{Treatment Goals}
+\begin{goalbox}[SMART Goals - 3 Months]
+ \begin{medtable}{Primary Treatment Targets}
+ % Goals table with colored headers
+ \end{medtable}
+\end{goalbox}
+
+\section{Medication Plan}
+\begin{infobox}[Titration Schedule]
+ % Medication instructions
+\end{infobox}
+
+\begin{warningbox}[Critical Decision Point]
+ % Important safety information
+\end{warningbox}
+
+\section{Emergency Protocols}
+\begin{emergencybox}
+ % Emergency contacts
+\end{emergencybox}
+
+\bibliographystyle{plainnat}
+\bibliography{references}
+\end{document}
+```
+
+### Benefits of Professional Styling
+
+**Clinical Practice:**
+- Faster information scanning during patient encounters
+- Clear visual hierarchy for critical vs. routine information
+- Professional appearance suitable for patient-facing documents
+- Color-coded sections reduce cognitive load
+
+**Educational Use:**
+- Enhanced readability for teaching materials
+- Visual differentiation of concept types (goals, warnings, procedures)
+- Professional presentation for case discussions
+- Print and digital-ready formats
+
+**Documentation Quality:**
+- Modern, polished appearance
+- Maintains clinical accuracy while improving aesthetics
+- Standardized formatting across treatment plans
+- Easy to customize for institutional branding
+
+**Patient Engagement:**
+- More approachable than dense text documents
+- Color coding helps patients identify key sections
+- Professional appearance builds trust
+- Clear organization facilitates understanding
+
+## Ethical Considerations
+
+### Informed Consent
+All treatment plans should involve patient understanding and voluntary agreement to proposed interventions.
+
+### Cultural Sensitivity
+Treatment plans must respect diverse cultural beliefs, health practices, and communication styles.
+
+### Health Equity
+Consider social determinants of health, access barriers, and health disparities when developing plans.
+
+### Privacy Protection
+Maintain strict HIPAA compliance; de-identify all protected health information in shared documents.
+
+### Autonomy and Beneficence
+Balance medical recommendations with patient autonomy and values while promoting patient welfare.
+
+## License
+
+Part of the Claude Scientific Writer project. See main LICENSE file.
+
diff --git a/scientific-skills/treatment-plans/assets/STYLING_QUICK_REFERENCE.md b/scientific-skills/treatment-plans/assets/STYLING_QUICK_REFERENCE.md
new file mode 100644
index 0000000..c52583e
--- /dev/null
+++ b/scientific-skills/treatment-plans/assets/STYLING_QUICK_REFERENCE.md
@@ -0,0 +1,185 @@
+# Professional Treatment Plan Styling - Quick Reference
+
+## File Location
+`medical_treatment_plan.sty` - Available in the assets directory
+
+## Quick Start
+
+```latex
+% !TEX program = xelatex
+\documentclass[11pt,letterpaper]{article}
+\usepackage{medical_treatment_plan}
+\usepackage{natbib}
+
+\begin{document}
+\maketitle
+% Your content
+\end{document}
+```
+
+## Custom Box Environments
+
+### 1. Info Box (Blue) - General Information
+```latex
+\begin{infobox}[Title]
+ Content
+\end{infobox}
+```
+**Use for:** Clinical assessments, monitoring schedules, titration protocols
+
+### 2. Warning Box (Yellow/Red) - Critical Alerts
+```latex
+\begin{warningbox}[Title]
+ Critical information
+\end{warningbox}
+```
+**Use for:** Safety protocols, decision points, contraindications
+
+### 3. Goal Box (Green) - Treatment Goals
+```latex
+\begin{goalbox}[Title]
+ Goals and targets
+\end{goalbox}
+```
+**Use for:** SMART goals, target outcomes, success metrics
+
+### 4. Key Points Box (Light Blue) - Highlights
+```latex
+\begin{keybox}[Title]
+ Important highlights
+\end{keybox}
+```
+**Use for:** Executive summaries, key takeaways, essential recommendations
+
+### 5. Emergency Box (Red) - Emergency Info
+```latex
+\begin{emergencybox}
+ Emergency contacts
+\end{emergencybox}
+```
+**Use for:** Emergency contacts, urgent protocols
+
+### 6. Patient Info Box (White/Blue) - Demographics
+```latex
+\begin{patientinfo}
+ Patient information
+\end{patientinfo}
+```
+**Use for:** Patient demographics and baseline data
+
+## Professional Tables
+
+```latex
+\begin{medtable}{Caption}
+\begin{tabular}{|l|l|l|}
+\hline
+\tableheadercolor
+\textcolor{white}{\textbf{Header 1}} & \textcolor{white}{\textbf{Header 2}} \\
+\hline
+Data row 1 \\
+\hline
+\tablerowcolor % Alternating gray
+Data row 2 \\
+\hline
+\end{tabular}
+\caption{Table caption}
+\end{medtable}
+```
+
+## Color Scheme
+
+- **Primary Blue** (0, 102, 153): Headers, titles
+- **Secondary Blue** (102, 178, 204): Light backgrounds
+- **Accent Blue** (0, 153, 204): Links, highlights
+- **Success Green** (0, 153, 76): Goals
+- **Warning Red** (204, 0, 0): Warnings
+
+## Compilation
+
+```bash
+xelatex document.tex
+bibtex document
+xelatex document.tex
+xelatex document.tex
+```
+
+## Best Practices
+
+1. **Match box type to purpose:** Green for goals, red/yellow for warnings
+2. **Don't overuse boxes:** Reserve for important information only
+3. **Maintain color consistency:** Stick to the defined scheme
+4. **Use white space:** Add `\vspace{0.5cm}` between major sections
+5. **Table alternating rows:** Use `\tablerowcolor` for readability
+
+## Installation
+
+**Option 1:** Copy `assets/medical_treatment_plan.sty` to your document directory
+
+**Option 2:** Install to user TeX directory
+```bash
+mkdir -p ~/texmf/tex/latex/medical_treatment_plan
+cp assets/medical_treatment_plan.sty ~/texmf/tex/latex/medical_treatment_plan/
+texhash ~/texmf
+```
+
+## Required Packages
+All automatically loaded by the style:
+- tcolorbox, tikz, xcolor
+- fancyhdr, titlesec, enumitem
+- booktabs, longtable, array, colortbl
+- hyperref, natbib, fontspec
+
+## Example Structure
+
+```latex
+\maketitle
+
+\section*{Patient Information}
+\begin{patientinfo}
+ Demographics
+\end{patientinfo}
+
+\section{Executive Summary}
+\begin{keybox}[Plan Overview]
+ Key highlights
+\end{keybox}
+
+\section{Treatment Goals}
+\begin{goalbox}[SMART Goals]
+ Goals list
+\end{goalbox}
+
+\section{Medication Plan}
+\begin{infobox}[Dosing]
+ Instructions
+\end{infobox}
+
+\begin{warningbox}[Safety]
+ Warnings
+\end{warningbox}
+
+\section{Emergency}
+\begin{emergencybox}
+ Contacts
+\end{emergencybox}
+```
+
+## Troubleshooting
+
+**Missing packages:**
+```bash
+sudo tlmgr install tcolorbox tikz pgf
+```
+
+**Special characters not showing:**
+- Use XeLaTeX instead of PDFLaTeX
+- Or use LaTeX commands: `$\checkmark$`, `$\geq$`
+
+**Header warnings:**
+- Already set to 22pt in style file
+- Adjust if needed
+
+---
+
+For complete documentation, see the "Professional Document Styling" section in SKILL.md
+
diff --git a/scientific-skills/treatment-plans/assets/chronic_disease_management_plan.tex b/scientific-skills/treatment-plans/assets/chronic_disease_management_plan.tex
new file mode 100644
index 0000000..73160af
--- /dev/null
+++ b/scientific-skills/treatment-plans/assets/chronic_disease_management_plan.tex
@@ -0,0 +1,665 @@
+% Chronic Disease Management Plan Template
+% For long-term management of multiple chronic conditions
+% Last updated: 2025
+
+\documentclass[11pt,letterpaper]{article}
+
+% Packages
+\usepackage[top=1in,bottom=1in,left=1in,right=1in]{geometry}
+\usepackage{amsmath,amssymb}
+\usepackage[utf8]{inputenc}
+\usepackage{graphicx}
+\usepackage{array}
+\usepackage{longtable}
+\usepackage{booktabs}
+\usepackage{enumitem}
+\usepackage{xcolor}
+\usepackage{fancyhdr}
+\usepackage{lastpage}
+\usepackage{tabularx}
+\usepackage[most]{tcolorbox}
+
+% Header and footer
+\pagestyle{fancy}
+\fancyhf{}
+\lhead{Chronic Disease Management Plan}
+\rhead{Page \thepage\ of \pageref{LastPage}}
+\lfoot{Date Created: \today}
+\rfoot{Confidential Patient Information}
+
+% Title formatting
+\usepackage{titlesec}
+\titleformat{\section}{\large\bfseries}{\thesection}{1em}{}
+\titleformat{\subsection}{\normalsize\bfseries}{\thesubsection}{1em}{}
+
+\begin{document}
+
+% Title
+\begin{center}
+{\Large\bfseries CHRONIC DISEASE MANAGEMENT PLAN}\\[0.5em]
+{\large Comprehensive Long-Term Care Coordination}\\[0.5em]
+\rule{\textwidth}{1pt}
+\end{center}
+
+\vspace{1em}
+
+% ===== TREATMENT PLAN HIGHLIGHTS (Foundation Medicine Model) =====
+\begin{tcolorbox}[colback=orange!5!white,colframe=orange!75!black,title=\textbf{TREATMENT PLAN HIGHLIGHTS},fonttitle=\bfseries\large]
+
+\textbf{Key Diagnoses:} [Primary chronic conditions - e.g., Type 2 Diabetes, CHF (NYHA II), CKD Stage 3]
+
+\vspace{0.3em}
+\textbf{Primary Treatment Goals:}
+\begin{itemize}[leftmargin=*,itemsep=0pt]
+ \item [Goal 1 - e.g., Maintain HbA1c $<$7.5\% and prevent diabetic complications]
+ \item [Goal 2 - e.g., Optimize heart failure management, prevent hospitalizations]
+ \item [Goal 3 - e.g., Slow CKD progression, maintain eGFR $>$45 mL/min]
+\end{itemize}
+
+\vspace{0.3em}
+\textbf{Main Interventions:}
+\begin{itemize}[leftmargin=*,itemsep=0pt]
+ \item \textit{Medications:} [Core regimen - e.g., Metformin, Lisinopril, Furosemide, statin therapy]
+ \item \textit{Lifestyle:} [Key modifications - e.g., Low-sodium diet, fluid restriction, regular exercise]
+ \item \textit{Monitoring:} [Essential tracking - e.g., Daily weights, BP, glucose; quarterly labs]
+\end{itemize}
+
+\vspace{0.3em}
+\textbf{Timeline:} [Care model - e.g., Monthly visits initially, then quarterly; annual comprehensive review]
+
+\end{tcolorbox}
+
+\vspace{1em}
+
+% ===== SECTION 1: PATIENT INFORMATION =====
+\section*{1. Patient Information and Problem List}
+
+\textbf{HIPAA Notice}: De-identify all protected health information before sharing.
+
+\vspace{0.5em}
+
+\begin{tabularx}{\textwidth}{|l|X|}
+\hline
+\textbf{Patient ID} & [De-identified code, e.g., CDM-001] \\ \hline
+\textbf{Age Range} & [e.g., 60-65 years] \\ \hline
+\textbf{Sex} & [Male/Female/Other] \\ \hline
+\textbf{Date of Plan} & [Month/Year only] \\ \hline
+\textbf{Primary Care Provider} & [Name, MD/DO, Credentials] \\ \hline
+\textbf{Care Coordinator} & [Name, RN/NP/PA, if applicable] \\ \hline
+\textbf{Facility/System} & [Healthcare organization] \\ \hline
+\end{tabularx}
+
+\vspace{1em}
+
+\subsection*{Active Problem List (Prioritized)}
+
+\begin{longtable}{|c|p{4cm}|c|p{3cm}|p{3.5cm}|}
+\hline
+\textbf{\#} & \textbf{Condition} & \textbf{ICD-10} & \textbf{Status} & \textbf{Specialists} \\ \hline
+\endfirsthead
+\hline
+\textbf{\#} & \textbf{Condition} & \textbf{ICD-10} & \textbf{Status} & \textbf{Specialists} \\ \hline
+\endhead
+1 & Type 2 Diabetes Mellitus & E11.65 & Suboptimal control (HbA1c 8.2\%) & Endocrinology \\ \hline
+2 & Chronic Heart Failure (HFrEF) & I50.22 & Stable, NYHA Class II & Cardiology \\ \hline
+3 & Chronic Kidney Disease Stage 3b & N18.31 & Stable, eGFR 38 & Nephrology (as needed) \\ \hline
+4 & Hypertension & I10 & Well-controlled on meds & PCP \\ \hline
+5 & Hyperlipidemia & E78.5 & On statin, LDL at goal & PCP \\ \hline
+6 & Obstructive Sleep Apnea & G47.33 & On CPAP, adherent & Sleep Medicine \\ \hline
+7 & Obesity & E66.9 & BMI 34, stable weight & PCP, Nutrition \\ \hline
+8 & Osteoarthritis, bilateral knees & M17.0 & Managed conservatively & Ortho (prn) \\ \hline
+[Add rows] & & & & \\ \hline
+\end{longtable}
+
+\subsection*{Current Medication List}
+
+\textit{Reconciled as of [Date]. Total: [X] medications}
+
+\begin{longtable}{|p{3cm}|p{2cm}|p{1.8cm}|p{3cm}|p{3.5cm}|}
+\hline
+\textbf{Medication} & \textbf{Dose} & \textbf{Frequency} & \textbf{Indication} & \textbf{Prescriber} \\ \hline
+\endfirsthead
+\hline
+\textbf{Medication} & \textbf{Dose} & \textbf{Frequency} & \textbf{Indication} & \textbf{Prescriber} \\ \hline
+\endhead
+Metformin ER & 1000mg & BID & Diabetes & PCP \\ \hline
+Insulin glargine & 24 units & QHS & Diabetes & Endocrinology \\ \hline
+Carvedilol & 12.5mg & BID & Heart failure, HTN & Cardiology \\ \hline
+Lisinopril & 40mg & Daily & Heart failure, HTN, CKD protection & Cardiology \\ \hline
+Furosemide & 40mg & Daily & Heart failure (diuresis) & Cardiology \\ \hline
+Atorvastatin & 40mg & QHS & Hyperlipidemia, ASCVD prevention & PCP \\ \hline
+Aspirin & 81mg & Daily & ASCVD prevention & PCP \\ \hline
+[Continue list] & & & & \\ \hline
+\end{longtable}
+
+\subsection*{Care Team and Specialists}
+
+\begin{itemize}[leftmargin=*]
+ \item \textbf{Primary Care Provider}: [Name, practice] - Coordinates overall care
+ \item \textbf{Cardiology}: [Name] - Heart failure management
+ \item \textbf{Endocrinology}: [Name] - Diabetes optimization
+ \item \textbf{Nephrology}: [Name if engaged] - CKD monitoring
+ \item \textbf{Care Coordinator/Navigator}: [Name] - Appointment coordination, patient education
+ \item \textbf{Pharmacist}: [Clinical pharmacist if available] - Medication reconciliation, optimization
+ \item \textbf{Registered Dietitian}: [Name] - Medical nutrition therapy
+ \item \textbf{Social Worker}: [Name if engaged] - Psychosocial support, resources
+\end{itemize}
+
+% ===== SECTION 2: DISEASE-SPECIFIC ASSESSMENTS =====
+\section*{2. Disease-Specific Assessments and Status}
+
+\subsection*{2.1 Type 2 Diabetes Mellitus}
+
+\textbf{Current Status}: Suboptimal control
+\begin{itemize}[leftmargin=*]
+ \item \textbf{HbA1c}: 8.2\% (target $<$7\%)
+ \item \textbf{Fasting Glucose}: Average 165 mg/dL (target 80-130)
+ \item \textbf{Time in Range}: Approximately 55\% (target $>$70\%)
+ \item \textbf{Hypoglycemia}: Infrequent, 1-2 episodes/month (BG 65-70)
+ \item \textbf{Duration}: 12 years
+ \item \textbf{Complications Screening}:
+ \begin{itemize}
+ \item Retinopathy: Mild NPDR, followed by ophthalmology
+ \item Nephropathy: CKD stage 3b, urine ACR 180 mg/g (albuminuria)
+ \item Neuropathy: Mild peripheral neuropathy, no foot ulcers
+ \item Cardiovascular: History of heart failure
+ \end{itemize}
+\end{itemize}
+
+\subsection*{2.2 Chronic Heart Failure (HFrEF)}
+
+\textbf{Current Status}: Stable, NYHA Class II
+\begin{itemize}[leftmargin=*]
+ \item \textbf{Ejection Fraction}: 35\% (reduced, HFrEF)
+ \item \textbf{Etiology}: Ischemic cardiomyopathy (prior MI 5 years ago)
+ \item \textbf{NYHA Class}: II - Slight limitation, comfortable at rest, symptoms with ordinary activity
+ \item \textbf{Symptoms}: Mild dyspnea on exertion, no orthopnea/PND, occasional LE edema
+ \item \textbf{Weight}: Stable, patient monitors daily
+ \item \textbf{GDMT Status}:
+ \begin{itemize}
+ \item ACE inhibitor: Lisinopril 40mg daily (at target dose)
+ \item Beta-blocker: Carvedilol 12.5mg BID (target 25mg BID - limited by fatigue)
+ \item Diuretic: Furosemide 40mg daily
+ \item Need to consider: SGLT2 inhibitor (also beneficial for diabetes), ARNI
+ \end{itemize}
+ \item \textbf{Device Therapy}: No ICD/CRT currently, discussed with cardiology
+\end{itemize}
+
+\subsection*{2.3 Chronic Kidney Disease Stage 3b}
+
+\textbf{Current Status}: Stable
+\begin{itemize}[leftmargin=*]
+ \item \textbf{eGFR}: 38 mL/min/1.73m² (Stage 3b, moderate-severe decrease)
+ \item \textbf{Creatinine}: 1.8 mg/dL (stable)
+ \item \textbf{Urine Albumin}: ACR 180 mg/g (albuminuria, from diabetes)
+ \item \textbf{Etiology}: Diabetic nephropathy, hypertensive nephropathy
+ \item \textbf{Progression Risk}: Moderate-high (diabetes, albuminuria)
+ \item \textbf{Complications}: Anemia (Hgb 11.2), managed with iron supplementation
+ \item \textbf{Renal Protection}: ACE inhibitor, BP control, glucose control, limit nephrotoxins
+\end{itemize}
+
+\subsection*{2.4 Additional Conditions Summary}
+
+\begin{itemize}[leftmargin=*]
+ \item \textbf{Hypertension}: Well-controlled, average home BP 128/78 mmHg
+ \item \textbf{Hyperlipidemia}: LDL 65 mg/dL (at goal $<$70 for ASCVD), on statin
+ \item \textbf{Obstructive Sleep Apnea}: On CPAP nightly, AHI reduced from 32 to 4, good adherence
+ \item \textbf{Obesity}: BMI 34, weight stable, difficulty with weight loss due to HF exercise limitations
+ \item \textbf{Osteoarthritis}: Bilateral knee pain, managed with acetaminophen, PT, avoid NSAIDs (CKD)
+\end{itemize}
+
+% ===== SECTION 3: INTEGRATED GOALS =====
+\section*{3. Integrated Treatment Goals (SMART Format)}
+
+\subsection*{3.1 Short-Term Goals (3-6 months)}
+
+\textbf{Diabetes Goals}:
+\begin{enumerate}[leftmargin=*]
+ \item Reduce HbA1c from 8.2\% to $<$7.5\% within 3 months by optimizing insulin dosing and medication adherence.
+ \item Improve fasting glucose to 100-140 mg/dL range through medication adjustment and dietary changes within 3 months.
+ \item Complete annual diabetic eye exam and foot exam within 1 month.
+\end{enumerate}
+
+\textbf{Heart Failure Goals}:
+\begin{enumerate}[leftmargin=*]
+ \item Maintain NYHA Class II status (no worsening) with daily weight monitoring and adherence to fluid/sodium restrictions.
+ \item Add SGLT2 inhibitor for dual diabetes and heart failure benefit within 1 month.
+ \item Improve exercise tolerance: Walk 15 minutes daily without dyspnea within 3 months.
+\end{enumerate}
+
+\textbf{CKD Goals}:
+\begin{enumerate}[leftmargin=*]
+ \item Maintain eGFR stability ($\pm$5 mL/min from baseline 38) over 6 months.
+ \item Reduce urine albumin-to-creatinine ratio from 180 to $<$100 mg/g with BP and glucose control.
+ \item Avoid nephrotoxic agents (NSAIDs, contrast without prophylaxis).
+\end{enumerate}
+
+\textbf{Cross-Cutting Goals}:
+\begin{enumerate}[leftmargin=*]
+ \item Medication adherence $>$90\% measured by refill rates and pill counts within 3 months.
+ \item Weight loss of 5\% body weight (10 lbs) through diet modification within 6 months.
+ \item Blood pressure maintenance at $<$130/80 mmHg (home average).
+\end{enumerate}
+
+\subsection*{3.2 Long-Term Goals (6-12 months)}
+
+\begin{enumerate}[leftmargin=*]
+ \item \textbf{Diabetes}: Achieve HbA1c $<$7\% and prevent progression of microvascular complications.
+ \item \textbf{Heart Failure}: Optimize GDMT, prevent hospitalizations, maintain functional status.
+ \item \textbf{CKD}: Slow progression (goal: $<$2 mL/min/year eGFR decline), delay need for dialysis.
+ \item \textbf{Quality of Life}: Maintain independence in ADLs, engage in meaningful activities (gardening, grandchildren visits).
+ \item \textbf{Prevention}: Up-to-date with all preventive care (vaccinations, cancer screenings).
+ \item \textbf{Coordination}: Seamless care transitions, all providers aware of care plan, no conflicting treatments.
+\end{enumerate}
+
+\subsection*{3.3 Patient-Centered Priorities}
+
+\begin{itemize}[leftmargin=*]
+ \item \textbf{Priority 1}: "I don't want to end up on dialysis like my brother"
+ \item \textbf{Priority 2}: "I want to keep up with my grandkids"
+ \item \textbf{Priority 3}: "I want to reduce my medications if possible" (pill burden concern)
+ \item \textbf{Priority 4}: "I want to avoid being hospitalized again"
+\end{itemize}
+
+% ===== SECTION 4: COMPREHENSIVE INTERVENTIONS =====
+\section*{4. Comprehensive Interventions}
+
+\subsection*{4.1 Medication Management and Optimization}
+
+\textbf{Current Regimen Optimization}:
+
+\begin{enumerate}[leftmargin=*]
+ \item \textbf{ADD: Empagliflozin (Jardiance) 10mg daily}
+ \begin{itemize}
+ \item \textit{Rationale}: SGLT2 inhibitor provides dual benefit - improves diabetes control AND reduces HF hospitalizations/mortality (EMPEROR-Reduced trial). Also slows CKD progression.
+ \item \textit{Monitoring}: eGFR (hold if $<$20), volume status, UTI symptoms, DKA risk (low in T2DM)
+ \item \textit{Expected benefit}: HbA1c reduction 0.5-0.8\%, reduced HF events 25-30\%
+ \end{itemize}
+
+ \item \textbf{TITRATE: Insulin glargine}
+ \begin{itemize}
+ \item \textit{Current}: 24 units QHS, fasting BG averaging 165
+ \item \textit{Plan}: Increase by 2 units every 3 days until fasting BG 100-130, patient to self-titrate with daily phone/portal check-ins
+ \item \textit{Expected dose}: Likely 30-36 units
+ \end{itemize}
+
+ \item \textbf{OPTIMIZE: Beta-blocker (carvedilol)}
+ \begin{itemize}
+ \item \textit{Current}: 12.5mg BID (patient reports fatigue at higher doses)
+ \item \textit{Plan}: Trial slow up-titration to 18.75mg BID, monitor for tolerance
+ \item \textit{Goal}: Target dose 25mg BID for HFrEF mortality benefit
+ \item \textit{Alternative}: Consider switching to different beta-blocker if intolerable
+ \end{itemize}
+
+ \item \textbf{CONTINUE}: ACE inhibitor (lisinopril 40mg) - at target dose
+
+ \item \textbf{CONSIDER FUTURE}: Sacubitril/valsartan (Entresto) to replace lisinopril if HF symptoms progress
+\end{enumerate}
+
+\textbf{Medication Safety}:
+\begin{itemize}[leftmargin=*]
+ \item \textbf{Polypharmacy Review}: Current medication count [X], review quarterly for deprescribing opportunities
+ \item \textbf{Renal Dosing}: All medications reviewed for CKD Stage 3b, adjust as needed
+ \item \textbf{Drug Interactions}: Monitor K+ with ACE + diuretic, avoid NSAIDs (CKD, HF)
+ \item \textbf{Adherence Support}: Pill organizer, medication list wallet card, automatic refills, pharmacy synchronization
+\end{itemize}
+
+\subsection*{4.2 Lifestyle and Self-Management Interventions}
+
+\textbf{Dietary Management}:
+\begin{itemize}[leftmargin=*]
+ \item \textbf{Diabetes}:
+ \begin{itemize}
+ \item Carbohydrate consistency: 45-60g per meal
+ \item Mediterranean diet pattern
+ \item Limit refined sugars and processed carbohydrates
+ \end{itemize}
+ \item \textbf{Heart Failure}:
+ \begin{itemize}
+ \item Sodium restriction: $<$2000mg daily (low-sodium products, avoid processed foods)
+ \item Fluid restriction: 1.5-2L daily if needed for volume management
+ \end{itemize}
+ \item \textbf{CKD}:
+ \begin{itemize}
+ \item Moderate protein intake: 0.8-1.0 g/kg/day
+ \item Phosphorus and potassium awareness (but not severely restricted at Stage 3b)
+ \end{itemize}
+ \item \textbf{Weight Loss}: 500 kcal/day deficit for gradual weight loss
+ \item \textbf{Referral}: Registered dietitian for medical nutrition therapy
+\end{itemize}
+
+\textbf{Physical Activity}:
+\begin{itemize}[leftmargin=*]
+ \item \textbf{Goal}: 150 min/week moderate activity (walking, swimming)
+ \item \textbf{Heart Failure Considerations}: Start with 10-15 min sessions, gradually increase, monitor symptoms
+ \item \textbf{Diabetes Benefits}: Improves insulin sensitivity, glucose control
+ \item \textbf{Cardiac Rehabilitation}: Consider referral if not previously completed
+ \item \textbf{Progression}: Track with pedometer/activity tracker, goal 7000-10,000 steps daily
+\end{itemize}
+
+\textbf{Self-Monitoring}:
+\begin{itemize}[leftmargin=*]
+ \item \textbf{Daily}:
+ \begin{itemize}
+ \item Weight (same time, same scale) - report gain $>$2-3 lbs in 2 days
+ \item Blood glucose: Fasting and pre-dinner
+ \item Blood pressure: Morning and evening
+ \end{itemize}
+ \item \textbf{Weekly}:
+ \begin{itemize}
+ \item Symptom check (dyspnea, edema, chest pain, hypoglycemia frequency)
+ \item Medication adherence review
+ \end{itemize}
+ \item \textbf{Recording}: Use logbook or smartphone app (MyChart, Apple Health)
+\end{itemize}
+
+\textbf{Other Lifestyle Factors}:
+\begin{itemize}[leftmargin=*]
+ \item \textbf{CPAP Adherence}: Continue nightly use, download compliance data quarterly
+ \item \textbf{Smoking}: [If applicable - cessation interventions]
+ \item \textbf{Alcohol}: Limit to $\leq$1 drink/day (heart failure, diabetes management)
+ \item \textbf{Stress Management}: Mindfulness, adequate sleep, social engagement
+\end{itemize}
+
+\subsection*{4.3 Disease-Specific Monitoring and Screening}
+
+\textbf{Diabetes Monitoring}:
+\begin{itemize}[leftmargin=*]
+ \item HbA1c every 3 months until at goal, then every 6 months
+ \item Lipid panel annually
+ \item Urine albumin-to-creatinine ratio annually
+ \item Comprehensive foot exam every visit, monofilament testing annually
+ \item Dilated eye exam annually (ophthalmology)
+ \item Dental exam every 6 months (periodontal disease link)
+\end{itemize}
+
+\textbf{Heart Failure Monitoring}:
+\begin{itemize}[leftmargin=*]
+ \item Daily weights, report significant changes
+ \item BNP or NT-proBNP when symptoms change
+ \item Echocardiogram annually or if clinical change
+ \item EKG annually
+ \item Functional assessment (6-minute walk test) periodically
+\end{itemize}
+
+\textbf{CKD Monitoring}:
+\begin{itemize}[leftmargin=*]
+ \item eGFR and creatinine every 3-6 months
+ \item Urine ACR annually
+ \item CBC (anemia), CMP (electrolytes, calcium, phosphorus) every 6 months
+ \item Vitamin D, PTH if indicated
+ \item Bone density scan (increased fracture risk)
+\end{itemize}
+
+\textbf{Preventive Care}:
+\begin{itemize}[leftmargin=*]
+ \item Influenza vaccine annually
+ \item Pneumococcal vaccines (PCV20 or PCV15+PPSV23) per ACIP guidelines
+ \item COVID-19 vaccination per current recommendations
+ \item Zoster vaccine (Shingrix)
+ \item Colorectal cancer screening per age guidelines
+ \item [Other age/sex-appropriate screenings]
+\end{itemize}
+
+% ===== SECTION 5: CARE COORDINATION =====
+\section*{5. Care Coordination and Communication}
+
+\subsection*{Provider Communication Plan}
+
+\begin{tabularx}{\textwidth}{|l|X|X|}
+\hline
+\textbf{Provider} & \textbf{Visit Frequency} & \textbf{Communication/Coordination} \\ \hline
+Primary Care & Every 3 months & Care plan coordinator, medication reconciliation, preventive care \\ \hline
+Cardiology & Every 4-6 months & HF medication optimization, EF monitoring, device consideration \\ \hline
+Endocrinology & Every 3-4 months & Diabetes management, insulin titration, complications screening \\ \hline
+Nephrology & As needed (if eGFR $<$30 or rapid decline) & CKD management, dialysis planning if needed \\ \hline
+Dietitian & Monthly x3, then quarterly & Nutrition counseling, meal planning \\ \hline
+Pharmacist & Quarterly & Medication review, adherence counseling, cost optimization \\ \hline
+Care Coordinator & Monthly phone check-in & Appointment scheduling, barrier identification, education \\ \hline
+\end{tabularx}
+
+\subsection*{Information Sharing}
+
+\begin{itemize}[leftmargin=*]
+ \item Shared EHR access for all providers in health system
+ \item Medication reconciliation after each specialist visit
+ \item Lab results shared via patient portal and provider notifications
+ \item Care plan accessible to all team members
+ \item Patient carries medication list and problem list
+\end{itemize}
+
+\subsection*{Care Transitions Management}
+
+\textbf{Hospital Discharge Protocol}:
+\begin{itemize}[leftmargin=*]
+ \item PCP notified within 24 hours of admission and discharge
+ \item Follow-up appointment within 7 days of discharge
+ \item Medication reconciliation at discharge and first follow-up
+ \item Red flags review: HF exacerbation signs, hyperglycemia, AKI
+\end{itemize}
+
+\textbf{Specialty Referral Coordination}:
+\begin{itemize}[leftmargin=*]
+ \item Care coordinator ensures specialist appointments scheduled
+ \item Specialist notes reviewed by PCP within 1 week
+ \item Treatment recommendations integrated into care plan
+ \item Conflicting recommendations discussed among providers
+\end{itemize}
+
+% ===== SECTION 6: MONITORING AND OUTCOMES =====
+\section*{6. Monitoring Parameters and Quality Measures}
+
+\subsection*{Clinical Outcomes Dashboard}
+
+\begin{longtable}{|p{3.5cm}|p{2.5cm}|p{2cm}|p{2cm}|p{3cm}|}
+\hline
+\textbf{Parameter} & \textbf{Baseline} & \textbf{Target} & \textbf{Current} & \textbf{Frequency} \\ \hline
+\endfirsthead
+\hline
+\textbf{Parameter} & \textbf{Baseline} & \textbf{Target} & \textbf{Current} & \textbf{Frequency} \\ \hline
+\endhead
+HbA1c & 8.2\% & $<$7\% & [update] & Q3-6 months \\ \hline
+Fasting Glucose & 165 mg/dL & 100-130 & [update] & Daily (patient), labs Q3mo \\ \hline
+Blood Pressure & 142/86 & $<$130/80 & [update] & Daily (patient), each visit \\ \hline
+LDL Cholesterol & 65 mg/dL & $<$70 & At goal & Annually \\ \hline
+eGFR & 38 mL/min & Stable ($\pm$5) & [update] & Every 3-6 months \\ \hline
+Urine ACR & 180 mg/g & $<$100 & [update] & Annually \\ \hline
+Weight & [baseline] lbs & -10 lbs (5\%) & [update] & Daily (patient), each visit \\ \hline
+BNP/NT-proBNP & [if available] & Stable & [update] & When symptomatic \\ \hline
+Ejection Fraction & 35\% & Monitor & [date of last echo] & Annually or if change \\ \hline
+\end{longtable}
+
+\subsection*{Quality Measure Tracking (HEDIS/CMS)}
+
+\begin{itemize}[leftmargin=*]
+ \item ✓ Diabetes HbA1c testing (every 6 months)
+ \item ☐ Diabetes HbA1c control ($<$8\%) - \textit{Target: achieve}
+ \item ✓ Diabetes eye exam (annual dilated)
+ \item ☐ Diabetes medical attention for nephropathy (urine ACR) - \textit{Due [month]}
+ \item ✓ Blood pressure control ($<$140/90 for diabetes)
+ \item ✓ Statin therapy for ASCVD
+ \item ✓ ACE/ARB therapy for diabetes with hypertension
+ \item ✓ Beta-blocker for HFrEF
+ \item ☐ Flu vaccine current year - \textit{Due [month]}
+ \item ✓ Pneumococcal vaccine
+\end{itemize}
+
+% ===== SECTION 7: PATIENT EDUCATION AND ACTIVATION =====
+\section*{7. Patient Education and Self-Management Support}
+
+\subsection*{Disease Education Completed}
+
+\begin{itemize}[leftmargin=*]
+ \item \textbf{Diabetes}: Pathophysiology, complications, importance of glucose control, hypoglycemia recognition
+ \item \textbf{Heart Failure}: How heart failure affects body, medication importance, fluid/sodium restrictions, warning signs
+ \item \textbf{CKD}: Kidney function, progression risk, renal protection strategies, medication precautions
+ \item \textbf{Medication Purposes}: Why each medication is prescribed, expected benefits
+ \item \textbf{Lifestyle Impact}: How diet, exercise, weight loss benefit all conditions
+\end{itemize}
+
+\subsection*{Self-Management Skills Training}
+
+\begin{itemize}[leftmargin=*]
+ \item ✓ Blood glucose monitoring technique
+ \item ✓ Insulin injection technique and storage
+ \item ✓ Home blood pressure monitoring
+ \item ✓ Daily weight tracking and interpretation
+ \item ✓ Symptom recognition (HF exacerbation, hypoglycemia, hyperglycemia)
+ \item ✓ Medication organization (pill box use)
+ \item ☐ Dietary skills: Carb counting, label reading, low-sodium food selection
+ \item ☐ Sick day management (when to call, medication adjustments)
+\end{itemize}
+
+\subsection*{Warning Signs - When to Call Provider}
+
+\textbf{Call office same day or go to ED if}:
+\begin{itemize}[leftmargin=*]
+ \item Weight gain $>$2-3 lbs in 2 days or 5 lbs in 1 week (heart failure)
+ \item Increased shortness of breath, cannot lie flat, new leg swelling
+ \item Chest pain or pressure
+ \item Blood glucose consistently $>$300 or $<$60 mg/dL
+ \item Decreased urine output, dark urine, swelling
+ \item Dizziness, lightheadedness, syncope
+\end{itemize}
+
+\subsection*{Resources and Support}
+
+\begin{itemize}[leftmargin=*]
+ \item Diabetes self-management education program (DSMES)
+ \item Cardiac rehabilitation program
+ \item Patient portal for lab results, messaging, educational materials
+ \item American Diabetes Association (diabetes.org) resources
+ \item American Heart Association (heart.org) HF information
+ \item National Kidney Foundation (kidney.org) CKD education
+ \item Local support groups [if available]
+\end{itemize}
+
+% ===== SECTION 8: CONTINGENCY PLANNING =====
+\section*{8. Contingency Planning and Risk Mitigation}
+
+\subsection*{Hospital Readmission Prevention}
+
+\textbf{High-Risk Period}: 30 days post-discharge
+
+\textbf{Prevention Strategies}:
+\begin{itemize}[leftmargin=*]
+ \item Early follow-up appointment (within 7 days)
+ \item Medication reconciliation and adherence check
+ \item Symptom monitoring escalation
+ \item Care coordinator phone call within 48 hours of discharge
+ \item Access to nurse advice line 24/7
+\end{itemize}
+
+\subsection*{Disease Progression Planning}
+
+\textbf{If CKD progresses to Stage 4-5}:
+\begin{itemize}[leftmargin=*]
+ \item Nephrology referral for CKD education and dialysis planning
+ \item Vascular access planning if eGFR $<$20
+ \item Medication adjustments for reduced renal clearance
+ \item Anemia management optimization (ESA if needed)
+ \item Advance care planning discussions
+\end{itemize}
+
+\textbf{If HF worsens to NYHA Class III-IV}:
+\begin{itemize}[leftmargin=*]
+ \item Consider ICD/CRT device evaluation
+ \item Advanced therapies discussion (LVAD, transplant evaluation if appropriate)
+ \item Palliative care consultation for symptom management
+ \item Home health nursing for weight/symptom monitoring
+\end{itemize}
+
+\subsection*{Advance Care Planning}
+
+\begin{itemize}[leftmargin=*]
+ \item Goals of care discussion: [Patient preferences documented]
+ \item Healthcare proxy: [Name, relationship] designated
+ \item Advance directive: ☐ Completed / ☐ To complete
+ \item CPR preferences: [Discussed, documented in chart]
+ \item Dialysis preferences: Patient expresses desire to avoid if possible
+\end{itemize}
+
+% ===== SECTION 9: FOLLOW-UP SCHEDULE =====
+\section*{9. Follow-Up and Reassessment Schedule}
+
+\subsection*{Appointment Calendar}
+
+\begin{longtable}{|l|l|p{7cm}|}
+\hline
+\textbf{Timeframe} & \textbf{Provider} & \textbf{Purpose} \\ \hline
+\endfirsthead
+\hline
+\textbf{Timeframe} & \textbf{Provider} & \textbf{Purpose} \\ \hline
+\endhead
+Week 2 & Care Coordinator (phone) & Check medication tolerability, answer questions, reinforce education \\ \hline
+Month 1 & PCP & Add empagliflozin, assess insulin titration, review home monitoring logs \\ \hline
+Month 2 & Dietitian & Nutrition counseling, meal planning, sodium/carb education \\ \hline
+Month 3 & PCP & HbA1c check, labs (CMP, lipids), medication review, preventive care update \\ \hline
+Month 3-4 & Cardiology & HF assessment, beta-blocker titration, consider ARNI \\ \hline
+Month 3-4 & Endocrinology & Diabetes management review, complications screening \\ \hline
+Month 6 & PCP & Comprehensive reassessment, all labs, update care plan, goal review \\ \hline
+Ongoing & Quarterly PCP & Chronic disease management visits \\ \hline
+\end{longtable}
+
+\subsection*{Plan Reassessment}
+
+This care plan will be formally reassessed and updated:
+\begin{itemize}[leftmargin=*]
+ \item Every 6 months (routine)
+ \item After hospitalization or ED visit
+ \item With significant change in clinical status
+ \item When new diagnoses are added
+ \item When treatment goals are achieved or modified
+ \item At patient or provider request
+\end{itemize}
+
+% ===== SECTION 10: SIGNATURES =====
+\vspace{2em}
+
+\section*{10. Provider Signature and Attestation}
+
+This comprehensive chronic disease management plan has been reviewed with the patient. The patient demonstrates understanding of all chronic conditions, treatment goals, medications, lifestyle recommendations, self-monitoring requirements, warning signs, and when to seek care. Patient's values and preferences have been incorporated through shared decision-making.
+
+\vspace{1em}
+
+\begin{tabular}{ll}
+Provider Signature: & \rule{7cm}{0.5pt} \\[1em]
+Provider Name/Credentials: & \rule{7cm}{0.5pt} \\[1em]
+Date: & \rule{4cm}{0.5pt} \\[2em]
+\end{tabular}
+
+\subsection*{Care Team Acknowledgment (Optional)}
+
+Care team members have reviewed this integrated care plan and will coordinate care accordingly.
+
+\vspace{0.5em}
+
+\textit{[Additional signature lines for cardiologist, endocrinologist, care coordinator as appropriate]}
+
+\vspace{2em}
+\begin{center}
+\rule{\textwidth}{1pt}\\
+\textbf{End of Chronic Disease Management Plan}\\
+This document contains confidential patient information protected by HIPAA.
+\end{center}
+
+\end{document}
+
+% ========== NOTES FOR USERS ==========
+%
+% KEY FEATURES:
+% - Integrates multiple chronic conditions into unified plan
+% - Addresses medication interactions and contraindications across conditions
+% - Coordinates care across multiple specialistsUtilizes shared goals when conditions overlap (e.g., SGLT2i for DM + HF + CKD)
+% - Emphasizes patient self-management and activation
+% - Tracks quality measures and outcomes
+%
+% CUSTOMIZATION:
+% - Adjust problem list based on patient's specific conditions
+% - Modify goals for disease severity and patient capabilities
+% - Adapt medication regimen to formulary and patient tolerance
+% - Coordinate specialist involvement based on availability and need
+%
+% COMPILATION:
+% pdflatex chronic_disease_management_plan.tex
+
diff --git a/scientific-skills/treatment-plans/assets/general_medical_treatment_plan.tex b/scientific-skills/treatment-plans/assets/general_medical_treatment_plan.tex
new file mode 100644
index 0000000..dc4d0ce
--- /dev/null
+++ b/scientific-skills/treatment-plans/assets/general_medical_treatment_plan.tex
@@ -0,0 +1,547 @@
+% General Medical Treatment Plan Template
+% For primary care and chronic disease management
+% Last updated: 2025
+
+\documentclass[11pt,letterpaper]{article}
+
+% Packages
+\usepackage[top=1in,bottom=1in,left=1in,right=1in]{geometry}
+\usepackage{amsmath,amssymb}
+\usepackage[utf8]{inputenc}
+\usepackage{graphicx}
+\usepackage{array}
+\usepackage{longtable}
+\usepackage{booktabs}
+\usepackage{enumitem}
+\usepackage{xcolor}
+\usepackage{fancyhdr}
+\usepackage{lastpage}
+\usepackage{tabularx}
+\usepackage[most]{tcolorbox}
+
+% Header and footer
+\pagestyle{fancy}
+\fancyhf{}
+\lhead{General Medical Treatment Plan}
+\rhead{Page \thepage\ of \pageref{LastPage}}
+\lfoot{Date Created: \today}
+\rfoot{Confidential Patient Information}
+
+% Title formatting
+\usepackage{titlesec}
+\titleformat{\section}{\large\bfseries}{\thesection}{1em}{}
+\titleformat{\subsection}{\normalsize\bfseries}{\thesubsection}{1em}{}
+
+\begin{document}
+
+% Title
+\begin{center}
+{\Large\bfseries MEDICAL TREATMENT PLAN}\\[0.5em]
+{\large General Medicine \& Chronic Disease Management}\\[0.5em]
+\rule{\textwidth}{1pt}
+\end{center}
+
+\vspace{1em}
+
+% ===== TREATMENT PLAN HIGHLIGHTS (Foundation Medicine Model) =====
+\begin{tcolorbox}[colback=blue!5!white,colframe=blue!75!black,title=\textbf{TREATMENT PLAN HIGHLIGHTS},fonttitle=\bfseries\large]
+
+\textbf{Key Diagnosis:} [Primary diagnosis with ICD-10 code, severity/stage]
+
+\vspace{0.3em}
+\textbf{Primary Treatment Goals:}
+\begin{itemize}[leftmargin=*,itemsep=0pt]
+ \item [Goal 1 - e.g., Reduce HbA1c from 8.5\% to $<$7\% within 3 months]
+ \item [Goal 2 - e.g., Achieve blood pressure $<$130/80 mmHg within 8 weeks]
+ \item [Goal 3 - e.g., Weight loss of 7-10\% body weight over 6 months]
+\end{itemize}
+
+\vspace{0.3em}
+\textbf{Main Interventions:}
+\begin{itemize}[leftmargin=*,itemsep=0pt]
+ \item \textit{Pharmacological:} [Key medications - e.g., Metformin 1000mg BID, Lisinopril 10mg daily]
+ \item \textit{Non-pharmacological:} [Lifestyle modifications - e.g., Mediterranean diet, 150 min/week exercise]
+ \item \textit{Monitoring:} [Key parameters - e.g., HbA1c every 3 months, home BP daily]
+\end{itemize}
+
+\vspace{0.3em}
+\textbf{Timeline:} [Duration - e.g., Intensive initiation (4 weeks), Adjustment phase (8 weeks), Maintenance (ongoing)]
+
+\end{tcolorbox}
+
+\vspace{1em}
+
+% ===== SECTION 1: PATIENT INFORMATION =====
+\section*{1. Patient Information}
+
+\textbf{HIPAA Notice}: All identifiable information must be removed or de-identified per Safe Harbor method before sharing this document. Remove: name, dates (except year), addresses, phone/fax, email, SSN, medical record numbers, account numbers, photos, and other unique identifiers.
+
+\vspace{0.5em}
+
+\begin{tabularx}{\textwidth}{|l|X|}
+\hline
+\textbf{Patient ID} & [De-identified code, e.g., PT-001] \\ \hline
+\textbf{Age Range} & [e.g., 55-60 years] \\ \hline
+\textbf{Sex} & [Male/Female/Other] \\ \hline
+\textbf{Race/Ethnicity} & [If relevant to treatment] \\ \hline
+\textbf{Date of Plan} & [Month/Year only] \\ \hline
+\textbf{Provider} & [Name, MD/DO/NP/PA, Credentials] \\ \hline
+\textbf{Facility} & [Healthcare facility name] \\ \hline
+\end{tabularx}
+
+\vspace{1em}
+
+\subsection*{Active Medical Conditions}
+\begin{itemize}[leftmargin=*]
+ \item \textbf{Primary Diagnosis}: [Condition with ICD-10 code]
+ \item \textbf{Secondary Diagnoses}:
+ \begin{itemize}
+ \item [Comorbidity 1 with ICD-10 code]
+ \item [Comorbidity 2 with ICD-10 code]
+ \item [Additional conditions as needed]
+ \end{itemize}
+\end{itemize}
+
+\subsection*{Current Medications}
+\begin{longtable}{|p{3.5cm}|p{2cm}|p{2cm}|p{5cm}|}
+\hline
+\textbf{Medication} & \textbf{Dose} & \textbf{Frequency} & \textbf{Indication} \\ \hline
+\endfirsthead
+\hline
+\textbf{Medication} & \textbf{Dose} & \textbf{Frequency} & \textbf{Indication} \\ \hline
+\endhead
+Medication 1 & [e.g., 10mg] & [e.g., daily] & [Indication] \\ \hline
+Medication 2 & [e.g., 50mg] & [e.g., BID] & [Indication] \\ \hline
+[Add rows as needed] & & & \\ \hline
+\end{longtable}
+
+\subsection*{Allergies}
+\begin{itemize}[leftmargin=*]
+ \item \textbf{Drug Allergies}: [List medications and reactions, or NKDA]
+ \item \textbf{Food/Environmental}: [If relevant to treatment]
+\end{itemize}
+
+\subsection*{Baseline Assessment}
+\begin{itemize}[leftmargin=*]
+ \item \textbf{Functional Status}: [Independent/requires assistance/dependent for ADLs]
+ \item \textbf{Cognitive Status}: [Alert and oriented/impairment if present]
+ \item \textbf{Social Support}: [Lives alone/with family, support system]
+ \item \textbf{Key Baseline Values}: [e.g., HbA1c 8.5\%, BP 145/90, BMI 32, eGFR 55]
+\end{itemize}
+
+% ===== SECTION 2: DIAGNOSIS AND ASSESSMENT =====
+\section*{2. Diagnosis and Assessment Summary}
+
+\subsection*{Primary Diagnosis}
+\textbf{Diagnosis}: [Full diagnosis name]\\
+\textbf{ICD-10 Code}: [e.g., E11.9 for Type 2 Diabetes Mellitus without complications]\\
+\textbf{Severity}: [Mild/Moderate/Severe or stage classification]\\
+\textbf{Duration}: [Time since diagnosis]
+
+\subsection*{Clinical Presentation}
+[Describe current symptoms, functional limitations, and impact on quality of life. Include relevant exam findings and diagnostic test results.]
+
+\subsection*{Risk Stratification}
+\begin{itemize}[leftmargin=*]
+ \item \textbf{Cardiovascular Risk}: [e.g., ASCVD 10-year risk 15\%]
+ \item \textbf{Complications Risk}: [e.g., high risk for diabetic nephropathy]
+ \item \textbf{Other Risk Factors}: [e.g., fall risk, frailty, polypharmacy]
+\end{itemize}
+
+\subsection*{Prognostic Considerations}
+[Discuss expected disease course, factors affecting prognosis, and rationale for treatment intensity.]
+
+% ===== SECTION 3: TREATMENT GOALS =====
+\section*{3. Treatment Goals (SMART Format)}
+
+\textbf{SMART Criteria}: All goals should be \textbf{S}pecific, \textbf{M}easurable, \textbf{A}chievable, \textbf{R}elevant, and \textbf{T}ime-bound.
+
+\subsection*{Short-Term Goals (1-3 months)}
+
+\begin{enumerate}[leftmargin=*]
+ \item \textbf{Goal 1}: [e.g., Reduce HbA1c from 8.5\% to $<$7.5\%]
+ \begin{itemize}
+ \item \textit{Specific}: Reduce HbA1c by at least 1 percentage point
+ \item \textit{Measurable}: HbA1c lab value
+ \item \textit{Achievable}: With medication initiation and lifestyle changes
+ \item \textit{Relevant}: Reduce microvascular complication risk
+ \item \textit{Time-bound}: Achieve within 3 months (next follow-up)
+ \end{itemize}
+
+ \item \textbf{Goal 2}: [e.g., Decrease systolic blood pressure to $<$130 mmHg]
+ \begin{itemize}
+ \item \textit{Specific}: Achieve BP $<$130/80 mmHg
+ \item \textit{Measurable}: Office and home BP measurements
+ \item \textit{Achievable}: With medication optimization
+ \item \textit{Relevant}: Reduce cardiovascular event risk
+ \item \textit{Time-bound}: Within 8 weeks
+ \end{itemize}
+
+ \item \textbf{Goal 3}: [Additional short-term goal]
+\end{enumerate}
+
+\subsection*{Long-Term Goals (6-12 months)}
+
+\begin{enumerate}[leftmargin=*]
+ \item \textbf{Goal 1}: [e.g., Maintain HbA1c $<$7\% and prevent diabetic complications]
+ \begin{itemize}
+ \item \textit{Success criteria}: HbA1c $<$7\%, no new retinopathy/nephropathy/neuropathy
+ \item \textit{Timeline}: Ongoing, assessed every 3-6 months
+ \end{itemize}
+
+ \item \textbf{Goal 2}: [e.g., Weight loss of 15 pounds (7\% body weight)]
+ \begin{itemize}
+ \item \textit{Success criteria}: BMI reduction from 32 to $<$30
+ \item \textit{Timeline}: 6-12 months at 1-2 lbs/week
+ \end{itemize}
+
+ \item \textbf{Goal 3}: [e.g., Achieve LDL cholesterol $<$70 mg/dL]
+
+ \item \textbf{Goal 4}: [Additional long-term goal as needed]
+\end{enumerate}
+
+\subsection*{Patient-Centered Goals}
+\begin{itemize}[leftmargin=*]
+ \item \textbf{Patient Priority 1}: [e.g., "Feel more energetic throughout the day"]
+ \item \textbf{Patient Priority 2}: [e.g., "Avoid insulin injections if possible"]
+ \item \textbf{Patient Priority 3}: [e.g., "Continue working full-time"]
+\end{itemize}
+
+% ===== SECTION 4: INTERVENTIONS =====
+\section*{4. Interventions}
+
+\subsection*{4.1 Pharmacological Interventions}
+
+\begin{longtable}{|p{3cm}|p{2cm}|p{2cm}|p{6.5cm}|}
+\hline
+\textbf{Medication} & \textbf{Dose} & \textbf{Frequency} & \textbf{Instructions \& Rationale} \\ \hline
+\endfirsthead
+\hline
+\textbf{Medication} & \textbf{Dose} & \textbf{Frequency} & \textbf{Instructions \& Rationale} \\ \hline
+\endhead
+
+[e.g., Metformin] & 500mg & BID & \textbf{Start:} Take with meals to reduce GI upset. \textbf{Titration:} Increase to 1000mg BID after 2 weeks if tolerated. \textbf{Target:} 2000mg daily. \textbf{Rationale:} First-line for T2DM, reduces hepatic glucose production. \\ \hline
+
+[e.g., Lisinopril] & 10mg & Daily & \textbf{Instructions:} Take in morning. Monitor BP at home. \textbf{Titration:} May increase to 20mg if BP not at goal in 4 weeks. \textbf{Rationale:} ACE inhibitor for HTN and renal protection in diabetes. \\ \hline
+
+[Additional medications] & & & \\ \hline
+\end{longtable}
+
+\textbf{Medication Safety Considerations}:
+\begin{itemize}[leftmargin=*]
+ \item \textbf{Drug Interactions}: [List relevant interactions to monitor]
+ \item \textbf{Adverse Effects to Monitor}: [e.g., metformin - GI upset, lactic acidosis; lisinopril - cough, hyperkalemia, angioedema]
+ \item \textbf{Contraindications}: [e.g., metformin if eGFR $<$30]
+ \item \textbf{Pregnancy Category}: [If relevant to patient]
+\end{itemize}
+
+\subsection*{4.2 Non-Pharmacological Interventions}
+
+\textbf{Lifestyle Modifications}:
+\begin{itemize}[leftmargin=*]
+ \item \textbf{Diet}:
+ \begin{itemize}
+ \item Mediterranean or DASH diet pattern
+ \item Carbohydrate counting: 45-60g per meal
+ \item Reduce saturated fat $<$7\% of calories
+ \item Sodium restriction $<$2300mg daily
+ \item Referral to registered dietitian
+ \end{itemize}
+
+ \item \textbf{Exercise}:
+ \begin{itemize}
+ \item Aerobic exercise: 150 minutes/week moderate intensity (e.g., brisk walking 30 min 5x/week)
+ \item Resistance training: 2-3 sessions/week
+ \item Reduce sedentary time, stand/move every 30 minutes
+ \end{itemize}
+
+ \item \textbf{Smoking Cessation}: [If applicable]
+ \begin{itemize}
+ \item Nicotine replacement therapy (patch, gum, lozenge)
+ \item Consider varenicline or bupropion
+ \item Behavioral counseling: 1-800-QUIT-NOW
+ \item Target quit date: [specific date within 1 month]
+ \end{itemize}
+
+ \item \textbf{Weight Management}:
+ \begin{itemize}
+ \item Target: 7-10\% body weight loss over 6 months
+ \item Caloric deficit: 500-750 kcal/day
+ \item Weekly self-weighing and food diary
+ \item Consider weight loss program or app
+ \end{itemize}
+
+ \item \textbf{Sleep Hygiene}:
+ \begin{itemize}
+ \item Target 7-9 hours nightly
+ \item Consistent sleep schedule
+ \item Screen for sleep apnea if indicated
+ \end{itemize}
+
+ \item \textbf{Stress Management}:
+ \begin{itemize}
+ \item Mindfulness or meditation practice
+ \item Stress reduction techniques
+ \item Adequate social support
+ \end{itemize}
+\end{itemize}
+
+\textbf{Self-Management and Monitoring}:
+\begin{itemize}[leftmargin=*]
+ \item \textbf{Blood Glucose Monitoring}: [Frequency, e.g., fasting and 2hr post-prandial 3x/week]
+ \item \textbf{Home Blood Pressure}: [Frequency, e.g., daily in AM, record in log]
+ \item \textbf{Weight Tracking}: [e.g., weekly on same day/time]
+ \item \textbf{Symptom Diary}: [Track relevant symptoms]
+ \item \textbf{Medication Adherence}: [Pill box, reminder app]
+\end{itemize}
+
+\subsection*{4.3 Procedural and Referral Interventions}
+
+\begin{itemize}[leftmargin=*]
+ \item \textbf{Specialist Referrals}:
+ \begin{itemize}
+ \item [e.g., Endocrinology consultation for diabetes management]
+ \item [e.g., Ophthalmology for annual dilated eye exam]
+ \item [e.g., Podiatry for diabetic foot exam]
+ \item [e.g., Nephrology if eGFR $<$30 or proteinuria]
+ \end{itemize}
+
+ \item \textbf{Diagnostic Testing Schedule}:
+ \begin{itemize}
+ \item [e.g., HbA1c every 3 months until at goal, then every 6 months]
+ \item [e.g., Lipid panel annually]
+ \item [e.g., Urine albumin-to-creatinine ratio annually]
+ \item [e.g., Comprehensive metabolic panel every 6 months]
+ \end{itemize}
+
+ \item \textbf{Preventive Care}:
+ \begin{itemize}
+ \item Influenza vaccine annually
+ \item Pneumococcal vaccines (PCV20 or PCV15+PPSV23)
+ \item COVID-19 vaccination per current guidelines
+ \item Age-appropriate cancer screenings
+ \item [Other preventive measures as indicated]
+ \end{itemize}
+\end{itemize}
+
+% ===== SECTION 5: TIMELINE AND SCHEDULE =====
+\section*{5. Timeline and Schedule}
+
+\subsection*{Treatment Phases}
+
+\begin{tabularx}{\textwidth}{|l|X|X|}
+\hline
+\textbf{Phase} & \textbf{Timeframe} & \textbf{Focus} \\ \hline
+Intensive Initiation & Weeks 1-4 & Medication titration, lifestyle education, baseline monitoring \\ \hline
+Adjustment & Weeks 5-12 & Optimize medications, reinforce lifestyle changes, assess goal progress \\ \hline
+Maintenance & Months 4-12 & Sustain improvements, prevent complications, long-term adherence \\ \hline
+Ongoing & $>$12 months & Chronic disease management, annual assessments, update goals \\ \hline
+\end{tabularx}
+
+\subsection*{Appointment Schedule}
+
+\begin{tabularx}{\textwidth}{|l|X|X|}
+\hline
+\textbf{Timepoint} & \textbf{Visit Type} & \textbf{Key Activities} \\ \hline
+Week 2 & Phone/telehealth & Check medication tolerance, answer questions \\ \hline
+Week 4 & Office visit & Medication adjustment, BP check, labs, review monitoring \\ \hline
+Week 8 & Office visit & Assess progress toward goals, reinforce lifestyle \\ \hline
+Month 3 & Office visit & HbA1c, comprehensive assessment, goal evaluation \\ \hline
+Month 6 & Office visit & Reassess all goals, update plan, labs \\ \hline
+Month 12 & Annual exam & Comprehensive evaluation, preventive care, specialty referrals \\ \hline
+Ongoing & Every 3-6 months & Per chronic disease management protocol \\ \hline
+\end{tabularx}
+
+\subsection*{Milestone Assessments}
+
+\begin{itemize}[leftmargin=*]
+ \item \textbf{Month 1}: Medication tolerance, lifestyle initiation, home monitoring established
+ \item \textbf{Month 3}: HbA1c $<$7.5\%, BP $<$130/80, 3-5 lb weight loss
+ \item \textbf{Month 6}: HbA1c $<$7\%, sustained BP control, 8-10 lb weight loss
+ \item \textbf{Month 12}: All long-term goals achieved or revised, complication screening complete
+\end{itemize}
+
+% ===== SECTION 6: MONITORING PARAMETERS =====
+\section*{6. Monitoring Parameters}
+
+\subsection*{Clinical Outcomes to Track}
+
+\begin{longtable}{|p{4cm}|p{3cm}|p{3cm}|p{4cm}|}
+\hline
+\textbf{Parameter} & \textbf{Baseline} & \textbf{Target} & \textbf{Frequency} \\ \hline
+\endfirsthead
+\hline
+\textbf{Parameter} & \textbf{Baseline} & \textbf{Target} & \textbf{Frequency} \\ \hline
+\endhead
+
+HbA1c & [e.g., 8.5\%] & $<$7\% & Every 3 months until stable, then every 6 months \\ \hline
+Fasting Glucose & [e.g., 165 mg/dL] & 80-130 mg/dL & Home monitoring per schedule \\ \hline
+Blood Pressure & [e.g., 145/90] & $<$130/80 mmHg & Daily home, every office visit \\ \hline
+Weight/BMI & [e.g., 210 lb, BMI 32] & 195 lb, BMI $<$30 & Weekly at home, every visit \\ \hline
+LDL Cholesterol & [e.g., 135 mg/dL] & $<$70 mg/dL & Every 6-12 months \\ \hline
+eGFR & [e.g., 55 mL/min] & Stable, $>$45 & Every 6 months \\ \hline
+Urine ACR & [e.g., normal] & $<$30 mg/g & Annually \\ \hline
+[Add additional parameters] & & & \\ \hline
+\end{longtable}
+
+\subsection*{Assessment Tools and Scales}
+
+\begin{itemize}[leftmargin=*]
+ \item \textbf{Diabetes Distress Scale}: [Assess emotional burden of diabetes management]
+ \item \textbf{SF-12 or PROMIS}: [Quality of life assessment]
+ \item \textbf{Medication Adherence}: [Morisky scale or refill tracking]
+ \item \textbf{[Other relevant scales]}: [e.g., PHQ-2 for depression screening]
+\end{itemize}
+
+\subsection*{Safety Monitoring}
+
+\begin{itemize}[leftmargin=*]
+ \item \textbf{Hypoglycemia}: Frequency of blood glucose $<$70 mg/dL, symptoms
+ \item \textbf{Medication Adverse Effects}: GI upset, cough, dizziness, other symptoms
+ \item \textbf{Hyperkalemia}: Potassium level if on ACE inhibitor/ARB
+ \item \textbf{Renal Function}: Monitor eGFR for metformin safety, ACE/ARB effects
+\end{itemize}
+
+\subsection*{Thresholds for Intervention}
+
+\begin{itemize}[leftmargin=*]
+ \item \textbf{Urgent}: Blood glucose $>$300 or $<$50, BP $>$180/110, chest pain, severe symptoms
+ \item \textbf{Escalate Treatment}: No improvement in HbA1c after 3 months, BP above goal after 8 weeks
+ \item \textbf{Modify Plan}: Intolerable side effects, patient preference change, new comorbidities
+\end{itemize}
+
+% ===== SECTION 7: EXPECTED OUTCOMES =====
+\section*{7. Expected Outcomes and Prognosis}
+
+\textbf{Anticipated Treatment Response}: With adherence, expect HbA1c reduction of 1-1.5\%, BP reduction of 10-15 mmHg, and 5-10\% weight loss over 6 months. Improvements visible at 4-8 weeks (BP, glucose), with HbA1c changes by 3 months.
+
+\vspace{0.5em}
+\textbf{Long-Term Benefits}: Reduced complication risk (cardiovascular events, retinopathy, nephropathy), improved quality of life, maintained independence and functional status.
+
+% ===== SECTION 8: FOLLOW-UP PLAN =====
+\section*{8. Follow-Up Plan}
+
+\subsection*{Scheduled Appointments}
+
+\begin{itemize}[leftmargin=*]
+ \item \textbf{Next Visit}: [Date/timeframe - e.g., 4 weeks from today]
+ \item \textbf{Visit Purpose}: [Medication adjustment, lab review, goal assessment]
+ \item \textbf{Ongoing Schedule}: See Appointment Schedule in Section 5
+\end{itemize}
+
+\subsection*{Communication Plan}
+
+\begin{itemize}[leftmargin=*]
+ \item \textbf{Between-Visit Contact}: Phone call at 2 weeks to assess medication tolerance
+ \item \textbf{Lab Results}: Will call with results within 3-5 business days
+ \item \textbf{Questions}: Call office at [phone], patient portal messaging
+ \item \textbf{Prescription Refills}: Via patient portal or pharmacy automated refill
+\end{itemize}
+
+\subsection*{Emergency Procedures}
+
+\textbf{Call 911 immediately for}:
+\begin{itemize}[leftmargin=*]
+ \item Chest pain, shortness of breath, or stroke symptoms
+ \item Severe hypoglycemia with confusion or loss of consciousness
+ \item Severe allergic reaction (angioedema, anaphylaxis)
+\end{itemize}
+
+\textbf{Call office same day for}:
+\begin{itemize}[leftmargin=*]
+ \item Blood glucose consistently $>$300 or $<$60 mg/dL
+ \item Blood pressure $>$180/110 mmHg
+ \item Persistent severe medication side effects
+ \item Fever, infection, or acute illness (may need medication adjustment)
+\end{itemize}
+
+\subsection*{Transition Planning}
+
+\begin{itemize}[leftmargin=*]
+ \item \textbf{If Hospitalized}: Provide this treatment plan to hospital team, resume medications on discharge
+ \item \textbf{Specialist Co-Management}: Share plan with all specialists, coordinate medication changes
+ \item \textbf{Future Considerations}: [e.g., may need insulin if oral medications insufficient]
+\end{itemize}
+
+% ===== SECTION 9: PATIENT EDUCATION =====
+\section*{9. Patient Education and Self-Management}
+
+\textbf{Key Education Topics}: Disease understanding, complication risks, treatment rationale, self-monitoring techniques (glucose, BP), medication administration, diet/nutrition basics, exercise safety, sick day management.
+
+\vspace{0.5em}
+\textbf{Critical Warning Signs}:
+\begin{itemize}[leftmargin=*,itemsep=0pt]
+ \item \textit{Emergency (call 911)}: Chest pain, severe hypoglycemia with confusion, stroke symptoms
+ \item \textit{Call office same day}: Glucose $>$300 or $<$60 mg/dL, BP $>$180/110, severe medication side effects
+ \item \textit{Urgent evaluation}: Diabetic foot wounds, severe hyperglycemia with symptoms
+\end{itemize}
+
+\vspace{0.5em}
+\textbf{Support Resources}: DSMES referral, registered dietitian, educational materials, support groups, tracking technology, financial assistance programs as needed.
+
+% ===== SECTION 10: RISK MITIGATION AND SAFETY =====
+\section*{10. Risk Mitigation and Safety}
+
+\textbf{Key Medication Safety Concerns}:
+\begin{itemize}[leftmargin=*,itemsep=0pt]
+ \item \textit{Metformin}: Monitor eGFR every 6 months; hold if eGFR $<$30, during acute illness, or 48 hours before contrast
+ \item \textit{ACE inhibitor}: Check K+ and creatinine at 1-2 weeks, then every 6 months; hold during dehydration/AKI
+ \item \textit{Hypoglycemia}: Low risk without insulin/sulfonylureas; educate on recognition and 15-15 rule
+\end{itemize}
+
+\vspace{0.5em}
+\textbf{Complication Prevention}: Annual eye exam, foot exam, and urine ACR; aspirin if ASCVD risk $>$10\%; BP and glucose control reduces cardiovascular, retinopathy, nephropathy, and neuropathy risks.
+
+\vspace{0.5em}
+\textbf{Emergency Actions}: Severe hypoglycemia ($<$50, confusion) - glucagon then 911; chest pain/stroke - call 911; hyperglycemia $>$300 with symptoms - hydrate and call office; severe medication side effects - stop medication, call same day.
+
+% ===== SECTION 11: PROVIDER SIGNATURE =====
+\vspace{2em}
+
+\section*{11. Provider Signature and Attestation}
+
+I have reviewed this treatment plan with the patient. The patient demonstrates understanding of the diagnosis, treatment rationale, goals, interventions, self-management requirements, warning signs, and when to seek emergency care. The patient agrees to this treatment plan and has had the opportunity to ask questions. Shared decision-making was employed, and patient preferences were incorporated.
+
+\vspace{1em}
+
+\begin{tabular}{ll}
+Provider Signature: & \rule{7cm}{0.5pt} \\[1em]
+Provider Name/Credentials: & \rule{7cm}{0.5pt} \\[1em]
+Date: & \rule{4cm}{0.5pt} \\[2em]
+\end{tabular}
+
+\subsection*{Patient Acknowledgment (Optional)}
+
+I have reviewed this treatment plan with my healthcare provider. I understand my diagnosis, treatment goals, medications, lifestyle recommendations, self-monitoring requirements, and when to seek medical attention. I agree to follow this plan and contact my provider with questions or concerns.
+
+\vspace{1em}
+
+\begin{tabular}{ll}
+Patient/Representative Signature: & \rule{7cm}{0.5pt} \\[1em]
+Date: & \rule{4cm}{0.5pt} \\
+\end{tabular}
+
+\vspace{2em}
+\begin{center}
+\rule{\textwidth}{1pt}\\
+\textbf{End of Treatment Plan}\\
+This document contains confidential patient information protected by HIPAA.
+\end{center}
+
+\end{document}
+
+% ========== NOTES FOR USERS ==========
+%
+% CUSTOMIZATION INSTRUCTIONS:
+% 1. Replace all bracketed placeholders [like this] with patient-specific information
+% 2. Remove or add sections as appropriate for the clinical condition
+% 3. Ensure all SMART goals meet criteria (Specific, Measurable, Achievable, Relevant, Time-bound)
+% 4. Include evidence-based interventions per current clinical guidelines
+% 5. De-identify all protected health information before sharing
+%
+% COMPILATION:
+% pdflatex general_medical_treatment_plan.tex
+%
+% VALIDATION:
+% Run check_completeness.py and validate_treatment_plan.py before finalizing
+
diff --git a/scientific-skills/treatment-plans/assets/medical_treatment_plan.sty b/scientific-skills/treatment-plans/assets/medical_treatment_plan.sty
new file mode 100644
index 0000000..8cb1ca6
--- /dev/null
+++ b/scientific-skills/treatment-plans/assets/medical_treatment_plan.sty
@@ -0,0 +1,222 @@
+% medical_treatment_plan.sty
+% Professional Medical Treatment Plan Style
+% Provides modern, clean styling for clinical treatment plans
+
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{medical_treatment_plan}[2025/11/05 Medical Treatment Plan Style]
+
+% Required packages
+\RequirePackage[margin=1in, top=1.2in, bottom=1.2in]{geometry}
+\RequirePackage{graphicx}
+\RequirePackage{xcolor}
+\RequirePackage[most]{tcolorbox}
+\RequirePackage{tikz}
+\RequirePackage{fontspec}
+\RequirePackage{fancyhdr}
+\RequirePackage{titlesec}
+\RequirePackage{enumitem}
+\RequirePackage{booktabs}
+\RequirePackage{longtable}
+\RequirePackage{array}
+\RequirePackage{colortbl}
+\RequirePackage{hyperref}
+\RequirePackage{natbib}
+
+% Color scheme - Professional medical blues and grays
+\definecolor{primaryblue}{RGB}{0, 102, 153} % Deep medical blue
+\definecolor{secondaryblue}{RGB}{102, 178, 204} % Light blue
+\definecolor{accentblue}{RGB}{0, 153, 204} % Bright accent
+\definecolor{darkgray}{RGB}{64, 64, 64} % Dark gray for text
+\definecolor{lightgray}{RGB}{245, 245, 245} % Light background
+\definecolor{medgray}{RGB}{200, 200, 200} % Medium gray
+\definecolor{warningred}{RGB}{204, 0, 0} % For warnings
+\definecolor{successgreen}{RGB}{0, 153, 76} % For success/goals
+
+% Fonts (if using XeLaTeX/LuaLaTeX) - use default fonts if custom fonts not available
+% \IfFileExists{lato}{\setmainfont{Lato}}{}
+% \IfFileExists{roboto}{\setsansfont{Roboto}}{}
+
+% Hyperlink setup
+\hypersetup{
+ colorlinks=true,
+ linkcolor=primaryblue,
+ citecolor=primaryblue,
+ urlcolor=accentblue,
+ pdfborder={0 0 0}
+}
+
+% Header and footer styling
+\setlength{\headheight}{22pt}
+\pagestyle{fancy}
+\fancyhf{}
+\fancyhead[L]{\color{primaryblue}\sffamily\small\textbf{Diabetes Treatment Plan}}
+\fancyhead[R]{\color{darkgray}\sffamily\small Patient Age: 23}
+\fancyfoot[C]{\color{darkgray}\small\thepage}
+\renewcommand{\headrulewidth}{2pt}
+\renewcommand{\headrule}{\hbox to\headwidth{\color{primaryblue}\leaders\hrule height \headrulewidth\hfill}}
+\renewcommand{\footrulewidth}{0.5pt}
+\renewcommand{\footrule}{\hbox to\headwidth{\color{medgray}\leaders\hrule height \footrulewidth\hfill}}
+
+% Section styling
+\titleformat{\section}
+ {\color{primaryblue}\Large\sffamily\bfseries}
+ {\thesection}{1em}{}
+ [\color{primaryblue}\titlerule]
+
+\titleformat{\subsection}
+ {\color{accentblue}\large\sffamily\bfseries}
+ {\thesubsection}{1em}{}
+
+\titleformat{\subsubsection}
+ {\color{darkgray}\normalsize\sffamily\bfseries}
+ {\thesubsubsection}{1em}{}
+
+% Title page styling
+\renewcommand{\maketitle}{
+ \begin{tcolorbox}[
+ enhanced,
+ colback=primaryblue,
+ colframe=primaryblue,
+ arc=0mm,
+ boxrule=0pt,
+ left=20pt,
+ right=20pt,
+ top=30pt,
+ bottom=30pt,
+ width=\textwidth
+ ]
+ \color{white}
+ \begin{center}
+ {\Huge\sffamily\bfseries Individualized Diabetes\\Treatment Plan}\\[10pt]
+ {\Large\sffamily 23-Year-Old Male Patient with Type 2 Diabetes}\\[15pt]
+ {\large\sffamily Comprehensive Evidence-Based Care Plan}\\[8pt]
+ {\normalsize\sffamily\color{secondaryblue}\today}
+ \end{center}
+ \end{tcolorbox}
+ \vspace{1cm}
+}
+
+% Custom boxes for different content types
+% Info box
+\newtcolorbox{infobox}[1][]{
+ enhanced,
+ colback=lightgray,
+ colframe=primaryblue,
+ arc=3mm,
+ boxrule=1.5pt,
+ left=10pt,
+ right=10pt,
+ top=10pt,
+ bottom=10pt,
+ title=#1,
+ fonttitle=\sffamily\bfseries,
+ coltitle=white,
+ colbacktitle=primaryblue
+}
+
+% Warning box
+\newtcolorbox{warningbox}[1][Warning]{
+ enhanced,
+ colback=yellow!10,
+ colframe=warningred,
+ arc=3mm,
+ boxrule=1.5pt,
+ left=10pt,
+ right=10pt,
+ top=10pt,
+ bottom=10pt,
+ title=#1,
+ fonttitle=\sffamily\bfseries,
+ coltitle=white,
+ colbacktitle=warningred
+}
+
+% Goal box
+\newtcolorbox{goalbox}[1][Treatment Goals]{
+ enhanced,
+ colback=green!5,
+ colframe=successgreen,
+ arc=3mm,
+ boxrule=1.5pt,
+ left=10pt,
+ right=10pt,
+ top=10pt,
+ bottom=10pt,
+ title=#1,
+ fonttitle=\sffamily\bfseries,
+ coltitle=white,
+ colbacktitle=successgreen
+}
+
+% Key points box
+\newtcolorbox{keybox}[1][Key Points]{
+ enhanced,
+ colback=secondaryblue!10,
+ colframe=accentblue,
+ arc=3mm,
+ boxrule=1.5pt,
+ left=10pt,
+ right=10pt,
+ top=10pt,
+ bottom=10pt,
+ title=#1,
+ fonttitle=\sffamily\bfseries,
+ coltitle=white,
+ colbacktitle=accentblue
+}
+
+% Table styling
+\newcommand{\tableheadercolor}{\rowcolor{primaryblue}}
+\newcommand{\tablerowcolor}{\rowcolor{lightgray}}
+
+% Custom table environment
+\newenvironment{medtable}[1]{
+ \begin{table}[h]
+ \centering
+ \small\sffamily
+ \renewcommand{\arraystretch}{1.3}
+}{
+ \end{table}
+}
+
+% Patient info section style
+\newenvironment{patientinfo}{
+ \begin{tcolorbox}[
+ enhanced,
+ colback=white,
+ colframe=secondaryblue,
+ arc=2mm,
+ boxrule=1pt,
+ left=15pt,
+ right=15pt,
+ top=12pt,
+ bottom=12pt
+ ]
+ \sffamily
+}{
+ \end{tcolorbox}
+}
+
+% Custom list styling
+\setlist[itemize,1]{label=\textcolor{primaryblue}{\textbullet}, leftmargin=*, itemsep=3pt}
+\setlist[enumerate,1]{label=\textcolor{primaryblue}{\arabic*.}, leftmargin=*, itemsep=3pt}
+
+% Emergency contact box
+\newtcolorbox{emergencybox}{
+ enhanced,
+ colback=warningred!5,
+ colframe=warningred,
+ arc=3mm,
+ boxrule=2pt,
+ left=15pt,
+ right=15pt,
+ top=15pt,
+ bottom=15pt,
+ title=EMERGENCY CONTACTS,
+ fonttitle=\sffamily\bfseries\Large,
+ coltitle=white,
+ colbacktitle=warningred
+}
+
+\endinput
+
diff --git a/scientific-skills/treatment-plans/assets/mental_health_treatment_plan.tex b/scientific-skills/treatment-plans/assets/mental_health_treatment_plan.tex
new file mode 100644
index 0000000..60a582c
--- /dev/null
+++ b/scientific-skills/treatment-plans/assets/mental_health_treatment_plan.tex
@@ -0,0 +1,774 @@
+% Mental Health Treatment Plan Template
+% For psychiatric and behavioral health treatment
+% Last updated: 2025
+
+\documentclass[11pt,letterpaper]{article}
+
+% Packages
+\usepackage[top=1in,bottom=1in,left=1in,right=1in]{geometry}
+\usepackage{amsmath,amssymb}
+\usepackage[utf8]{inputenc}
+\usepackage{graphicx}
+\usepackage{array}
+\usepackage{longtable}
+\usepackage{booktabs}
+\usepackage{enumitem}
+\usepackage{xcolor}
+\usepackage{fancyhdr}
+\usepackage{lastpage}
+\usepackage{tabularx}
+\usepackage[most]{tcolorbox}
+
+% Header and footer
+\pagestyle{fancy}
+\fancyhf{}
+\lhead{Mental Health Treatment Plan}
+\rhead{Page \thepage\ of \pageref{LastPage}}
+\lfoot{Date Created: \today}
+\rfoot{Confidential Patient Information}
+
+% Title formatting
+\usepackage{titlesec}
+\titleformat{\section}{\large\bfseries}{\thesection}{1em}{}
+\titleformat{\subsection}{\normalsize\bfseries}{\thesubsection}{1em}{}
+
+\begin{document}
+
+% Title
+\begin{center}
+{\Large\bfseries MENTAL HEALTH TREATMENT PLAN}\\[0.5em]
+{\large Psychiatric \& Behavioral Health Services}\\[0.5em]
+\rule{\textwidth}{1pt}
+\end{center}
+
+\vspace{1em}
+
+% ===== TREATMENT PLAN HIGHLIGHTS (Foundation Medicine Model) =====
+\begin{tcolorbox}[colback=purple!5!white,colframe=purple!75!black,title=\textbf{TREATMENT PLAN HIGHLIGHTS},fonttitle=\bfseries\large]
+
+\textbf{Key Diagnosis:} [Primary psychiatric diagnosis - e.g., Major Depressive Disorder, moderate (DSM-5 296.32)]
+
+\vspace{0.3em}
+\textbf{Primary Treatment Goals:}
+\begin{itemize}[leftmargin=*,itemsep=0pt]
+ \item [Goal 1 - e.g., Reduce PHQ-9 score from 18 to $<$10 within 12 weeks]
+ \item [Goal 2 - e.g., Return to work full-time within 3 months]
+ \item [Goal 3 - e.g., Develop 3 effective coping strategies for stress management]
+\end{itemize}
+
+\vspace{0.3em}
+\textbf{Main Interventions:}
+\begin{itemize}[leftmargin=*,itemsep=0pt]
+ \item \textit{Psychotherapy:} [Modality - e.g., Cognitive Behavioral Therapy (CBT) weekly for 16 sessions]
+ \item \textit{Medication:} [Key medications - e.g., Sertraline 50mg daily, titrate to 100mg]
+ \item \textit{Safety:} [Crisis plan in place, emergency contacts established]
+\end{itemize}
+
+\vspace{0.3em}
+\textbf{Timeline:} [Duration - e.g., Acute treatment (12 weeks), Continuation (4-6 months), Maintenance (ongoing)]
+
+\end{tcolorbox}
+
+\vspace{1em}
+
+% ===== SECTION 1: PATIENT INFORMATION =====
+\section*{1. Patient Information}
+
+\textbf{HIPAA Notice}: De-identify all protected health information per Safe Harbor method before sharing.
+
+\vspace{0.5em}
+
+\begin{tabularx}{\textwidth}{|l|X|}
+\hline
+\textbf{Patient ID} & [De-identified code, e.g., MH-001] \\ \hline
+\textbf{Age Range} & [e.g., 30-35 years] \\ \hline
+\textbf{Sex} & [Male/Female/Other] \\ \hline
+\textbf{Gender Identity} & [If relevant and disclosed] \\ \hline
+\textbf{Pronouns} & [Patient's preferred pronouns] \\ \hline
+\textbf{Date of Plan} & [Month/Year only] \\ \hline
+\textbf{Treating Provider} & [Psychiatrist/Psychologist/LCSW/NP Name, Credentials] \\ \hline
+\textbf{Treatment Setting} & [Outpatient/IOP/PHP/Inpatient] \\ \hline
+\textbf{Facility} & [Mental health center/clinic name] \\ \hline
+\end{tabularx}
+
+\vspace{1em}
+
+\subsection*{Presenting Problem}
+
+\textbf{Chief Complaint}: [Patient's own words, e.g., "I've been feeling really down and can't get motivated to do anything"]
+
+\textbf{History of Present Illness}:
+[Detailed description of current symptoms, onset, duration, severity, precipitating factors, impact on functioning. Example: Patient reports depressed mood, anhedonia, fatigue, and difficulty concentrating for past 3 months, following job loss. Symptoms have progressively worsened, now affecting ability to complete daily tasks and maintain social relationships.]
+
+\subsection*{Psychiatric History}
+
+\begin{itemize}[leftmargin=*]
+ \item \textbf{Previous Psychiatric Diagnoses}: [e.g., Major Depressive Disorder, diagnosed 5 years ago]
+ \item \textbf{Previous Treatment}:
+ \begin{itemize}
+ \item Psychotherapy: [e.g., CBT for 6 months in 2020, helpful]
+ \item Medications: [e.g., Sertraline 100mg 2020-2021, discontinued due to side effects]
+ \item Hospitalizations: [e.g., One psychiatric hospitalization in 2019 for suicidal ideation]
+ \end{itemize}
+ \item \textbf{Family Psychiatric History}: [e.g., Mother with depression, paternal uncle with bipolar disorder]
+\end{itemize}
+
+\subsection*{Substance Use History}
+
+\begin{itemize}[leftmargin=*]
+ \item \textbf{Alcohol}: [e.g., Social use, 2-3 drinks per week, denies binge drinking]
+ \item \textbf{Tobacco}: [e.g., Non-smoker]
+ \item \textbf{Cannabis}: [e.g., Previously daily use, quit 6 months ago]
+ \item \textbf{Other Substances}: [e.g., Denies other illicit drug use]
+ \item \textbf{Substance Use Disorder}: [e.g., Cannabis use disorder, in remission]
+\end{itemize}
+
+\subsection*{Medical History}
+
+\begin{itemize}[leftmargin=*]
+ \item \textbf{Chronic Medical Conditions}: [e.g., Hypothyroidism, well-controlled on levothyroxine]
+ \item \textbf{Current Medications}: [e.g., Levothyroxine 100mcg daily]
+ \item \textbf{Allergies}: [NKDA or list medication allergies and reactions]
+\end{itemize}
+
+\subsection*{Social History and Support}
+
+\begin{itemize}[leftmargin=*]
+ \item \textbf{Living Situation}: [e.g., Lives alone in apartment, safe housing]
+ \item \textbf{Employment}: [e.g., Recently unemployed (3 months), previously worked as accountant]
+ \item \textbf{Education}: [e.g., Bachelor's degree in accounting]
+ \item \textbf{Marital/Relationship Status}: [e.g., Single, not in relationship]
+ \item \textbf{Social Support}: [e.g., Close relationship with sister, few friends, isolated recently]
+ \item \textbf{Financial Stressors}: [e.g., Unemployment causing financial strain]
+ \item \textbf{Legal Issues}: [e.g., None]
+ \item \textbf{Trauma History}: [e.g., Reports childhood emotional abuse, no recent trauma]
+\end{itemize}
+
+% ===== SECTION 2: PSYCHIATRIC ASSESSMENT =====
+\section*{2. Psychiatric Assessment and Diagnosis}
+
+\subsection*{Mental Status Examination}
+
+\begin{itemize}[leftmargin=*]
+ \item \textbf{Appearance}: [e.g., Casually dressed, fair grooming, appropriate for season]
+ \item \textbf{Behavior}: [e.g., Cooperative, fair eye contact, psychomotor retardation noted]
+ \item \textbf{Speech}: [e.g., Soft volume, slow rate, decreased spontaneity]
+ \item \textbf{Mood}: [e.g., "Depressed and hopeless" - patient's own words]
+ \item \textbf{Affect}: [e.g., Constricted, dysphoric, congruent with mood]
+ \item \textbf{Thought Process}: [e.g., Linear, goal-directed, no tangentiality or loose associations]
+ \item \textbf{Thought Content}:
+ \begin{itemize}
+ \item Suicidal ideation: [e.g., Passive SI present ("wish I wouldn't wake up"), denies active SI/plan/intent]
+ \item Homicidal ideation: [e.g., Denied]
+ \item Delusions: [e.g., None identified]
+ \item Obsessions/compulsions: [e.g., None]
+ \end{itemize}
+ \item \textbf{Perceptions}: [e.g., No hallucinations (auditory, visual, tactile) reported or observed]
+ \item \textbf{Cognition}:
+ \begin{itemize}
+ \item Orientation: [e.g., Oriented to person, place, time, situation]
+ \item Memory: [e.g., Intact for recent and remote events]
+ \item Concentration: [e.g., Impaired, difficulty with serial 7s]
+ \item Insight: [e.g., Fair - recognizes need for treatment]
+ \item Judgment: [e.g., Fair to good - makes reasonable decisions]
+ \end{itemize}
+\end{itemize}
+
+\subsection*{Diagnostic Assessment}
+
+\textbf{Primary Diagnosis}: [e.g., Major Depressive Disorder, Recurrent Episode, Moderate]\\
+\textbf{DSM-5 Code}: [e.g., F33.1]
+
+\textbf{DSM-5 Criteria Met}:
+\begin{itemize}[leftmargin=*]
+ \item Depressed mood most of the day, nearly every day (patient report, observed affect)
+ \item Markedly diminished interest or pleasure in activities (anhedonia)
+ \item Significant weight loss (10 lbs in 2 months)
+ \item Insomnia nearly every night (difficulty falling and staying asleep)
+ \item Fatigue and loss of energy nearly every day
+ \item Feelings of worthlessness and guilt
+ \item Diminished ability to think and concentrate
+ \item Duration: 3 months
+ \item Significant distress and impairment in occupational and social functioning
+\end{itemize}
+
+\textbf{Secondary Diagnoses}:
+\begin{itemize}[leftmargin=*]
+ \item [e.g., Cannabis Use Disorder, Mild, In Sustained Remission] (DSM-5: F12.11)
+ \item [e.g., Unspecified Anxiety Disorder] (DSM-5: F41.9)
+\end{itemize}
+
+\subsection*{Symptom Severity Assessment}
+
+\begin{tabularx}{\textwidth}{|l|c|c|X|}
+\hline
+\textbf{Assessment Tool} & \textbf{Score} & \textbf{Interpretation} & \textbf{Notes} \\ \hline
+PHQ-9 (Depression) & 18/27 & Moderately severe depression & Target $<$10 for remission \\ \hline
+GAD-7 (Anxiety) & 12/21 & Moderate anxiety & Target $<$5 \\ \hline
+PCL-5 (PTSD) & N/A & Not administered & Consider if trauma symptoms emerge \\ \hline
+C-SSRS (Suicide Risk) & Level 3 & Passive SI, no intent/plan & Requires safety planning \\ \hline
+AUDIT (Alcohol) & 3/40 & Low risk & No current concern \\ \hline
+\end{tabularx}
+
+\subsection*{Functional Impairment}
+
+\textbf{Impact on Daily Functioning}:
+\begin{itemize}[leftmargin=*]
+ \item \textbf{Occupational}: Unable to work currently, difficulty with job search due to lack of motivation
+ \item \textbf{Social}: Withdrawn from friends, decreased social activities, isolating at home
+ \item \textbf{Self-Care}: Difficulty maintaining hygiene, skipping meals, irregular sleep
+ \item \textbf{Relationships}: Strained relationships due to irritability and withdrawal
+ \item \textbf{Physical Health}: Decreased exercise, poor nutrition
+\end{itemize}
+
+\subsection*{Risk Assessment}
+
+\textbf{Suicide Risk}: [e.g., Low to Moderate]
+\begin{itemize}[leftmargin=*]
+ \item \textit{Risk Factors}: Depression, unemployment, social isolation, passive SI, previous suicide attempt (2019)
+ \item \textit{Protective Factors}: Engaged in treatment, close relationship with sister, denies current intent/plan, future-oriented (wants to get better)
+ \item \textit{Current Status}: Passive SI only, no active ideation, plan, or intent. Contracts for safety.
+\end{itemize}
+
+\textbf{Homicide/Violence Risk}: [e.g., Low] - No homicidal ideation, no history of violence
+
+% ===== SECTION 3: TREATMENT GOALS =====
+\section*{3. Treatment Goals (SMART Format)}
+
+\subsection*{3.1 Short-Term Goals (4-8 weeks)}
+
+\textbf{Symptom Reduction Goals}:
+\begin{enumerate}[leftmargin=*]
+ \item \textbf{Depression}: Reduce PHQ-9 score from 18 to $<$10 (minimal depression) within 8 weeks through medication and psychotherapy.
+ \begin{itemize}
+ \item \textit{Measurable}: PHQ-9 assessment every 2 weeks
+ \item \textit{Achievable}: With SSRI and weekly CBT
+ \item \textit{Time-bound}: 8 weeks
+ \end{itemize}
+
+ \item \textbf{Sleep}: Improve sleep to 6-7 hours nightly with no more than 1 awakening within 4 weeks through sleep hygiene and possible medication adjustment.
+
+ \item \textbf{Anxiety}: Reduce GAD-7 score from 12 to $<$8 within 6 weeks using CBT anxiety management techniques.
+
+ \item \textbf{Suicide Risk}: Eliminate passive suicidal ideation, maintain safety contract, implement crisis plan within 2 weeks.
+\end{enumerate}
+
+\textbf{Functional Goals}:
+\begin{enumerate}[leftmargin=*]
+ \item \textbf{Self-Care}: Establish daily self-care routine (shower, meals, sleep schedule) with 80\% compliance within 3 weeks.
+
+ \item \textbf{Social Engagement}: Re-engage in 1-2 social activities per week (phone calls with friends, sister visits) within 4 weeks.
+
+ \item \textbf{Coping Skills}: Learn and practice 3 new coping skills for managing depressive symptoms within 4 weeks.
+\end{enumerate}
+
+\subsection*{3.2 Long-Term Goals (3-6 months)}
+
+\textbf{Recovery-Oriented Goals}:
+\begin{enumerate}[leftmargin=*]
+ \item \textbf{Remission}: Achieve depression remission with PHQ-9 score $<$5 and sustained improved mood within 12-16 weeks.
+
+ \item \textbf{Return to Work}: Develop job search plan, practice interview skills, secure employment or engage in meaningful volunteer work within 3-4 months.
+
+ \item \textbf{Relationship Building}: Rebuild and strengthen social connections, increase social support network by adding 2-3 regular social contacts within 3 months.
+
+ \item \textbf{Quality of Life}: Re-engage in previously enjoyed activities (hobbies, exercise, leisure) at least 3x per week within 3 months.
+
+ \item \textbf{Resilience}: Develop sustainable wellness routine including regular sleep, exercise, healthy diet, and stress management practices within 4 months.
+
+ \item \textbf{Relapse Prevention}: Identify early warning signs of depression, develop relapse prevention plan, maintain treatment gains within 6 months.
+\end{enumerate}
+
+\subsection*{3.3 Patient-Identified Goals}
+
+\begin{itemize}[leftmargin=*]
+ \item \textbf{Priority 1}: "I want to feel like myself again and have energy to do things"
+ \item \textbf{Priority 2}: "I want to find a new job and feel confident in interviews"
+ \item \textbf{Priority 3}: "I want to stop feeling guilty all the time"
+ \item \textbf{Priority 4}: "I want to enjoy spending time with my friends and family again"
+\end{itemize}
+
+% ===== SECTION 4: TREATMENT INTERVENTIONS =====
+\section*{4. Treatment Interventions}
+
+\subsection*{4.1 Psychopharmacology}
+
+\textbf{Medication Plan}:
+
+\begin{longtable}{|p{3cm}|p{2cm}|p{2cm}|p{6.5cm}|}
+\hline
+\textbf{Medication} & \textbf{Dose} & \textbf{Frequency} & \textbf{Rationale \& Instructions} \\ \hline
+\endfirsthead
+\hline
+\textbf{Medication} & \textbf{Dose} & \textbf{Frequency} & \textbf{Rationale \& Instructions} \\ \hline
+\endhead
+
+Escitalopram (Lexapro) & 10mg & Daily (morning) & \textbf{Rationale}: First-line SSRI for major depression. \textbf{Start}: 10mg daily. \textbf{Titration}: May increase to 20mg after 4 weeks if partial response. \textbf{Expected}: 2-4 weeks for initial response, 6-8 weeks for full effect. \textbf{Monitor}: Mood, anxiety, suicidal ideation, side effects. \\ \hline
+
+Trazodone & 50mg & QHS PRN & \textbf{Rationale}: For insomnia, sedating antidepressant. \textbf{Start}: 50mg at bedtime as needed. \textbf{Titration}: May increase to 100mg if ineffective. \textbf{Instructions}: Take 30 min before bed. May cause morning grogginess - reduce dose if bothersome. \\ \hline
+
+[Continue current medications] & & & \\ \hline
+Levothyroxine & 100mcg & Daily & \textbf{Continue}: Hypothyroidism management. Monitor TSH every 6-12 months. \\ \hline
+\end{longtable}
+
+\textbf{Medication Safety and Monitoring}:
+\begin{itemize}[leftmargin=*]
+ \item \textbf{Common Side Effects}: Nausea (take with food), headache, insomnia or drowsiness, sexual dysfunction (discuss if bothersome)
+ \item \textbf{Serious Side Effects} (rare): Serotonin syndrome (agitation, confusion, rapid heart rate, high fever - seek emergency care), increased suicidal thoughts (especially first 1-2 weeks - monitor closely)
+ \item \textbf{Drug Interactions}: Avoid other serotonergic agents, NSAIDs (increased bleeding risk)
+ \item \textbf{Adherence Plan}: Set daily reminder alarm, use pill box, refill prescriptions on time
+ \item \textbf{Follow-up}: Psychiatry visit week 2 (phone), week 4 (in-person), week 8, then monthly
+\end{itemize}
+
+\textbf{Response Timeline}:
+\begin{itemize}[leftmargin=*]
+ \item Week 1-2: May notice side effects before benefits, monitor suicide risk closely
+ \item Week 2-4: Early improvement in sleep, appetite, energy possible
+ \item Week 4-6: Mood improvement, decreased anxiety expected
+ \item Week 6-8: Full therapeutic effect, reassess dose if partial response
+ \item Week 12+: Continued improvement, consider maintenance therapy
+\end{itemize}
+
+\subsection*{4.2 Psychotherapy}
+
+\textbf{Therapy Modality}: Cognitive Behavioral Therapy (CBT) for Depression
+
+\textbf{Frequency}: Weekly 50-minute sessions for 12-16 weeks, then biweekly as symptoms improve
+
+\textbf{Treatment Framework}:
+
+\textbf{Weeks 1-4: Assessment and Behavioral Activation}
+\begin{itemize}[leftmargin=*]
+ \item Establish therapeutic alliance and treatment goals
+ \item Psychoeducation: Depression, treatment options, CBT model
+ \item Activity monitoring and identifying mood-behavior connections
+ \item Behavioral activation: Schedule pleasant and meaningful activities
+ \item Develop daily structure and routine
+ \item Suicide risk assessment and safety planning
+\end{itemize}
+
+\textbf{Weeks 5-8: Cognitive Restructuring}
+\begin{itemize}[leftmargin=*]
+ \item Identify automatic negative thoughts
+ \item Challenge cognitive distortions (all-or-nothing thinking, overgeneralization, catastrophizing)
+ \item Develop balanced, realistic thoughts
+ \item Address guilt and worthlessness cognitions
+ \item Problem-solving skills training
+\end{itemize}
+
+\textbf{Weeks 9-12: Skill Building and Application}
+\begin{itemize}[leftmargin=*]
+ \item Assertiveness and communication skills
+ \item Interpersonal effectiveness
+ \item Stress management and relaxation techniques
+ \item Values clarification and goal-setting (career, relationships)
+ \item Address employment/job search anxiety
+\end{itemize}
+
+\textbf{Weeks 13-16: Relapse Prevention and Maintenance}
+\begin{itemize}[leftmargin=*]
+ \item Identify early warning signs of depression
+ \item Develop personalized relapse prevention plan
+ \item Review and consolidate skills learned
+ \item Plan for ongoing self-care and wellness
+ \item Discuss transition to maintenance phase or termination
+\end{itemize}
+
+\textbf{Specific CBT Techniques}:
+\begin{itemize}[leftmargin=*]
+ \item Thought records (identify situations, thoughts, emotions, behaviors)
+ \item Behavioral experiments (test negative predictions)
+ \item Activity scheduling (increase rewarding activities)
+ \item Graded task assignment (break large tasks into manageable steps)
+ \item Cognitive continuum (evaluate black-and-white thinking)
+ \item Core belief work (address underlying schemas)
+\end{itemize}
+
+\textbf{Homework Assignments}:
+\begin{itemize}[leftmargin=*]
+ \item Weekly mood and activity logs
+ \item Thought records (3-column or 7-column)
+ \item Behavioral activation: Complete 2-3 scheduled activities
+ \item Reading: CBT self-help materials (e.g., "Feeling Good" by David Burns)
+ \item Skills practice between sessions
+\end{itemize}
+
+\subsection*{4.3 Adjunctive Interventions}
+
+\textbf{Case Management}:
+\begin{itemize}[leftmargin=*]
+ \item Assist with unemployment benefits and financial resources
+ \item Connect with vocational rehabilitation services
+ \item Coordinate care with primary care provider
+ \item Insurance and medication assistance navigation
+\end{itemize}
+
+\textbf{Lifestyle Interventions}:
+\begin{itemize}[leftmargin=*]
+ \item \textbf{Exercise}: Goal of 30 minutes moderate exercise 5x/week (walking, yoga, biking)
+ \item \textbf{Sleep Hygiene}: Consistent sleep schedule (11 PM - 7 AM), limit screen time 1 hour before bed, avoid caffeine after 2 PM, bedroom for sleep only
+ \item \textbf{Nutrition}: Regular balanced meals, minimize processed foods, stay hydrated
+ \item \textbf{Substance Use}: Continue cannabis abstinence, limit alcohol to 1-2 drinks/week max
+ \item \textbf{Light Exposure}: Morning sunlight or light box 30 min daily (if seasonal pattern)
+\end{itemize}
+
+\textbf{Social Support Enhancement}:
+\begin{itemize}[leftmargin=*]
+ \item Increase contact with sister (supportive relationship)
+ \item Consider depression support group (online or in-person)
+ \item Re-engage with friend group gradually
+ \item Volunteer opportunities for meaningful engagement
+\end{itemize}
+
+\textbf{Family/Collateral Sessions}:
+\begin{itemize}[leftmargin=*]
+ \item Offer to include sister in 1-2 sessions (with patient consent) for psychoeducation and support
+ \item Educate family on depression, how to help, what to avoid (enabling, criticism)
+\end{itemize}
+
+% ===== SECTION 5: TREATMENT SCHEDULE =====
+\section*{5. Treatment Schedule and Timeline}
+
+\subsection*{Treatment Phases}
+
+\begin{tabularx}{\textwidth}{|l|l|X|}
+\hline
+\textbf{Phase} & \textbf{Duration} & \textbf{Focus} \\ \hline
+Acute Treatment & Weeks 1-8 & Symptom reduction, medication titration, behavioral activation, safety \\ \hline
+Continuation & Weeks 9-16 & Cognitive restructuring, skill building, functional recovery \\ \hline
+Maintenance & Months 4-12 & Relapse prevention, sustained wellness, reduce visit frequency \\ \hline
+\end{tabularx}
+
+\subsection*{Appointment Schedule}
+
+\begin{tabularx}{\textwidth}{|l|l|X|}
+\hline
+\textbf{Provider} & \textbf{Frequency} & \textbf{Notes} \\ \hline
+Psychiatry & Week 2 (phone), 4, 8, then monthly & Medication management, side effect monitoring \\ \hline
+Psychotherapy (CBT) & Weekly weeks 1-12, biweekly weeks 13-16 & 50-minute sessions \\ \hline
+PHQ-9/GAD-7 Assessment & Every 2 weeks & Track symptom severity \\ \hline
+Case Management & As needed & Resources, benefits, vocational support \\ \hline
+\end{tabularx}
+
+\subsection*{Milestones and Reassessment}
+
+\begin{itemize}[leftmargin=*]
+ \item \textbf{Week 2}: Medication tolerance check, safety assessment, initial behavioral activation
+ \item \textbf{Week 4}: PHQ-9 reassessment, medication dose adjustment if needed, CBT engagement
+ \item \textbf{Week 8}: Comprehensive reassessment, PHQ-9 target $<$10, functional improvement expected
+ \item \textbf{Week 12}: PHQ-9 target $<$5, relapse prevention planning initiated
+ \item \textbf{Week 16}: Treatment goal review, transition to maintenance or taper frequency
+\end{itemize}
+
+% ===== SECTION 6: MONITORING AND OUTCOMES =====
+\section*{6. Monitoring Parameters and Outcomes}
+
+\subsection*{Symptom Tracking}
+
+\begin{longtable}{|p{4cm}|p{2.5cm}|p{2.5cm}|p{4.5cm}|}
+\hline
+\textbf{Measure} & \textbf{Baseline} & \textbf{Target} & \textbf{Frequency} \\ \hline
+\endfirsthead
+\hline
+\textbf{Measure} & \textbf{Baseline} & \textbf{Target} & \textbf{Frequency} \\ \hline
+\endhead
+PHQ-9 (Depression) & 18/27 & $<$5 (remission) & Every 2 weeks \\ \hline
+GAD-7 (Anxiety) & 12/21 & $<$5 & Every 2 weeks \\ \hline
+C-SSRS (Suicide Risk) & Level 3 (passive SI) & Level 0 (no SI) & Each session initially, then monthly \\ \hline
+Sleep Quality & 4-5 hrs, fragmented & 6-7 hrs, consolidated & Weekly self-report \\ \hline
+Social Activities & 0-1/week & 3-4/week & Weekly log \\ \hline
+Exercise & 0 days/week & 5 days/week & Weekly log \\ \hline
+Therapy Homework & -- & 80\% completion & Each session \\ \hline
+Medication Adherence & -- & $>$90\% & Each psychiatry visit \\ \hline
+\end{longtable}
+
+\subsection*{Functional Outcome Tracking}
+
+\begin{itemize}[leftmargin=*]
+ \item \textbf{Self-Care}: Daily routine checklist (shower, meals, sleep, medications)
+ \item \textbf{Social Functioning}: Number of social interactions per week
+ \item \textbf{Occupational}: Job applications submitted, interviews attended, volunteer hours
+ \item \textbf{Quality of Life}: Engagement in hobbies, pleasurable activities
+ \item \textbf{Overall Functioning}: GAF or WHODAS score at baseline, 8 weeks, discharge
+\end{itemize}
+
+\subsection*{Safety Monitoring}
+
+\begin{itemize}[leftmargin=*]
+ \item Suicidal ideation assessment at every contact (especially weeks 1-4)
+ \item Medication side effects and tolerability
+ \item Substance use (alcohol, cannabis) - weekly check-ins
+ \item Worsening symptoms or breakthrough depression
+ \item Medication adherence
+\end{itemize}
+
+% ===== SECTION 7: CRISIS AND SAFETY PLANNING =====
+\section*{7. Crisis Management and Safety Planning}
+
+\subsection*{Safety Plan (Based on Stanley-Brown Model)}
+
+\textbf{Step 1: Warning Signs}
+\begin{itemize}[leftmargin=*]
+ \item Thoughts: "I'm worthless," "Things will never get better," "I'm a burden"
+ \item Feelings: Hopelessness, overwhelming sadness, numbness
+ \item Behaviors: Isolating for days, not eating, excessive sleeping
+ \item Situations: Financial stress, rejection, conflict with family
+\end{itemize}
+
+\textbf{Step 2: Internal Coping Strategies} (things I can do on my own)
+\begin{itemize}[leftmargin=*]
+ \item Go for a walk outside
+ \item Listen to favorite music playlist
+ \item Take a warm shower
+ \item Deep breathing exercises (5-10 minutes)
+ \item Read CBT thought records
+ \item Write in journal
+\end{itemize}
+
+\textbf{Step 3: Social Contacts for Distraction}
+\begin{itemize}[leftmargin=*]
+ \item Sister: [phone number]
+ \item Close friend: [phone number]
+ \item Former coworker: [phone number]
+\end{itemize}
+
+\textbf{Step 4: People I Can Ask for Help}
+\begin{itemize}[leftmargin=*]
+ \item Sister: [phone number] - can talk about feelings, will listen without judgment
+ \item Therapist: [phone number] - call for emergency appointment
+ \item Psychiatrist: [phone number] - after-hours answering service
+\end{itemize}
+
+\textbf{Step 5: Professionals and Agencies to Contact}
+\begin{itemize}[leftmargin=*]
+ \item Therapist: [clinic phone]
+ \item Psychiatrist on-call: [after-hours number]
+ \item Crisis Line: 988 Suicide \& Crisis Lifeline (call or text 988)
+ \item Crisis Text Line: Text HOME to 741741
+ \item Local crisis center: [local crisis services phone]
+\end{itemize}
+
+\textbf{Step 6: Reduce Access to Lethal Means}
+\begin{itemize}[leftmargin=*]
+ \item No firearms in home
+ \item Medications: Sister holds extra medication supply, patient has only 1-week supply at home
+ \item Remove other potential means from immediate environment
+\end{itemize}
+
+\textbf{One Thing That Is Most Important to Me}:
+\begin{itemize}[leftmargin=*]
+ \item [e.g., "My relationship with my sister - I don't want to hurt her"]
+\end{itemize}
+
+\subsection*{Emergency Procedures}
+
+\textbf{Patient to seek immediate care (Emergency Department or call 911) if}:
+\begin{itemize}[leftmargin=*]
+ \item Active suicidal ideation with plan and intent
+ \item Unable to maintain safety despite using crisis plan
+ \item Acute psychosis (hallucinations, delusions, disorganized behavior)
+ \item Severe agitation or aggression toward others
+ \item Substance intoxication/overdose
+\end{itemize}
+
+\textbf{Provider to intervene if}:
+\begin{itemize}[leftmargin=*]
+ \item Increased suicide risk (passive → active SI, plan development)
+ \item Significant worsening of depression or emergence of psychotic symptoms
+ \item Non-adherence with safety plan
+ \item Relapse in substance use
+ \item Actions: Increase visit frequency, consider higher level of care (IOP/PHP/inpatient), medication adjustment, collateral contact with family
+\end{itemize}
+
+% ===== SECTION 8: PATIENT EDUCATION =====
+\section*{8. Patient Education and Psychoeducation}
+
+\subsection*{Understanding Depression}
+
+Education provided on:
+\begin{itemize}[leftmargin=*]
+ \item \textbf{What is Depression}: Biological illness, not weakness or character flaw
+ \item \textbf{Neurobiology}: Serotonin, norepinephrine, brain circuits involved
+ \item \textbf{Course}: Episodic illness, high recurrence rate, importance of treatment adherence
+ \item \textbf{Treatment}: Evidence for medication + therapy combination
+\end{itemize}
+
+\subsection*{Medication Education}
+
+\begin{itemize}[leftmargin=*]
+ \item How SSRIs work (increase serotonin availability)
+ \item Timeline for response (2-4 weeks initial, 6-8 weeks full effect)
+ \item Common side effects and management
+ \item Importance of daily adherence (not "as needed")
+ \item Not addictive, but need to taper when discontinuing
+ \item Maintenance treatment (continue 6-12 months after remission)
+\end{itemize}
+
+\subsection*{Therapy Skills and Homework}
+
+\begin{itemize}[leftmargin=*]
+ \item CBT model: Thoughts → Feelings → Behaviors (interconnected)
+ \item Behavioral activation: Activity improves mood (not the reverse)
+ \item Cognitive distortions: Common thinking errors in depression
+ \item Thought challenging: Evidence for/against, alternative perspectives
+ \item Skills practice between sessions is essential
+\end{itemize}
+
+\subsection*{Self-Management Strategies}
+
+\begin{itemize}[leftmargin=*]
+ \item Recognize early warning signs of depression
+ \item When to call provider (worsening symptoms, suicidal thoughts)
+ \item Lifestyle factors: sleep, exercise, nutrition, substance use
+ \item Stress management and self-care
+ \item Building and maintaining social connections
+\end{itemize}
+
+\subsection*{Resources Provided}
+
+\begin{itemize}[leftmargin=*]
+ \item Crisis hotline numbers (988, Crisis Text Line)
+ \item CBT self-help books: "Feeling Good" by David Burns, "Mind Over Mood"
+ \item Meditation apps: Headspace, Calm, Insight Timer
+ \item Exercise resources: Local trails, gyms, online yoga
+ \item NAMI (National Alliance on Mental Illness) support groups
+ \item Depression and Bipolar Support Alliance (DBSA)
+\end{itemize}
+
+% ===== SECTION 9: FOLLOW-UP AND DISCHARGE =====
+\section*{9. Follow-Up and Discharge Planning}
+
+\subsection*{Continuation and Maintenance Treatment}
+
+\textbf{After Acute Treatment (if goals achieved)}:
+\begin{itemize}[leftmargin=*]
+ \item Continue medication for 6-12 months minimum after remission
+ \item Taper therapy to biweekly, then monthly "booster" sessions
+ \item Regular symptom monitoring (monthly PHQ-9)
+ \item Psychiatry visits every 2-3 months for medication management
+\end{itemize}
+
+\subsection*{Relapse Prevention}
+
+\begin{itemize}[leftmargin=*]
+ \item \textbf{Early Warning Signs}: [Patient-specific list from treatment]
+ \item \textbf{Action Plan}: If warning signs emerge, resume weekly therapy, contact psychiatrist
+ \item \textbf{Protective Factors}: Maintain exercise, sleep, social connections, continue medication
+ \item \textbf{Ongoing Skills Practice}: Continue thought records, behavioral activation as needed
+\end{itemize}
+
+\subsection*{Discharge Criteria}
+
+Ready for discharge when:
+\begin{itemize}[leftmargin=*]
+ \item PHQ-9 $<$5 sustained for 4+ weeks
+ \item No suicidal ideation
+ \item Functional recovery (working or engaged in meaningful activities, social connections restored)
+ \item Mastery of CBT skills and relapse prevention plan
+ \item Stable on medication regimen
+ \item Patient and provider agree discharge is appropriate
+\end{itemize}
+
+\subsection*{Discharge Recommendations}
+
+\begin{itemize}[leftmargin=*]
+ \item Continue antidepressant for 6-12 months, then discuss tapering with psychiatrist
+ \item Monthly "check-in" sessions available if needed
+ \item Return to treatment if early warning signs emerge
+ \item Continue healthy lifestyle practices
+ \item Stay connected with support system
+ \item Annual depression screening with primary care provider
+\end{itemize}
+
+% ===== SECTION 10: INFORMED CONSENT =====
+\section*{10. Informed Consent and Collaboration}
+
+\subsection*{Treatment Consent}
+
+The following have been discussed with the patient:
+\begin{itemize}[leftmargin=*]
+ \item Diagnosis, symptoms, and prognosis
+ \item Treatment options (medication, therapy, combination, no treatment)
+ \item Risks and benefits of recommended treatment
+ \item Expected timeline for improvement
+ \item Potential side effects of medication
+ \item Alternatives to proposed treatment
+ \item Importance of adherence and therapy homework
+ \item Right to refuse or discontinue treatment
+ \item Limits of confidentiality (harm to self/others, abuse)
+\end{itemize}
+
+Patient demonstrates understanding and agrees to treatment plan. Questions answered satisfactorily. Patient has opportunity for shared decision-making and treatment preferences incorporated.
+
+\subsection*{Collaborative Treatment Agreement}
+
+\textbf{Provider Responsibilities}:
+\begin{itemize}[leftmargin=*]
+ \item Provide evidence-based treatment
+ \item Monitor progress and adjust treatment as needed
+ \item Maintain availability for emergencies (or provide backup coverage)
+ \item Respect patient autonomy and preferences
+\end{itemize}
+
+\textbf{Patient Responsibilities}:
+\begin{itemize}[leftmargin=*]
+ \item Attend scheduled appointments
+ \item Take medications as prescribed
+ \item Complete therapy homework
+ \item Communicate openly about symptoms and concerns
+ \item Contact provider if symptoms worsen or suicidal thoughts emerge
+ \item Follow safety plan
+\end{itemize}
+
+% ===== SECTION 11: SIGNATURES =====
+\vspace{2em}
+
+\section*{11. Provider Signature and Attestation}
+
+I have reviewed this treatment plan with the patient. The patient demonstrates understanding of the diagnosis, treatment recommendations, risks and benefits, and alternatives. The patient has been involved in shared decision-making. Safety planning has been completed. The patient agrees to this treatment plan.
+
+\vspace{1em}
+
+\begin{tabular}{ll}
+Provider Signature: & \rule{7cm}{0.5pt} \\[1em]
+Provider Name/Credentials: & \rule{7cm}{0.5pt} \\[1em]
+Date: & \rule{4cm}{0.5pt} \\[2em]
+\end{tabular}
+
+\subsection*{Patient Acknowledgment}
+
+I have reviewed this treatment plan with my mental health provider. I understand my diagnosis, treatment goals, and the recommended interventions. My questions have been answered. I agree to participate in this treatment plan and will contact my provider if I have concerns or my symptoms worsen.
+
+\vspace{1em}
+
+\begin{tabular}{ll}
+Patient Signature: & \rule{7cm}{0.5pt} \\[1em]
+Date: & \rule{4cm}{0.5pt} \\
+\end{tabular}
+
+\vspace{2em}
+\begin{center}
+\rule{\textwidth}{1pt}\\
+\textbf{End of Mental Health Treatment Plan}\\
+This document contains confidential patient information protected by HIPAA and 42 CFR Part 2.
+\end{center}
+
+\end{document}
+
+% ========== NOTES FOR USERS ==========
+%
+% CUSTOMIZATION:
+% - Replace all bracketed placeholders with patient-specific information
+% - Adjust CBT framework based on presenting problem (can use DBT, ACT, IPT instead)
+% - Modify safety plan collaboratively with patient
+% - Select appropriate medications based on diagnosis and patient factors
+%
+% IMPORTANT:
+% - Complete thorough suicide risk assessment
+% - Document safety planning
+% - Ensure crisis resources are accurate and accessible
+% - Maintain 42 CFR Part 2 confidentiality for substance use information
+%
+% COMPILATION:
+% pdflatex mental_health_treatment_plan.tex
+
diff --git a/scientific-skills/treatment-plans/assets/one_page_treatment_plan.tex b/scientific-skills/treatment-plans/assets/one_page_treatment_plan.tex
new file mode 100644
index 0000000..2897b6e
--- /dev/null
+++ b/scientific-skills/treatment-plans/assets/one_page_treatment_plan.tex
@@ -0,0 +1,193 @@
+% One-Page Treatment Plan Template
+% Concise, clinician-focused treatment recommendation
+% Modeled after precision oncology reports and clinical decision support cards
+% Last updated: 2025
+
+\documentclass[10pt,letterpaper]{article}
+
+% Minimal packages for clean, dense layout
+\usepackage[top=0.5in,bottom=0.5in,left=0.6in,right=0.6in]{geometry}
+\usepackage{amsmath,amssymb}
+\usepackage[utf8]{inputenc}
+\usepackage{graphicx}
+\usepackage{array}
+\usepackage{booktabs}
+\usepackage{enumitem}
+\usepackage{xcolor}
+\usepackage{fancyhdr}
+\usepackage{tabularx}
+\usepackage[most]{tcolorbox}
+\usepackage{multicol}
+
+% Compact spacing
+\setlist{nosep,leftmargin=*,itemsep=0pt,topsep=2pt}
+\setlength{\parindent}{0pt}
+\setlength{\parskip}{4pt}
+
+% No page numbers for single page
+\pagestyle{empty}
+
+% Section formatting - compact
+\usepackage{titlesec}
+\titlespacing*{\section}{0pt}{8pt}{4pt}
+\titlespacing*{\subsection}{0pt}{6pt}{3pt}
+\titleformat{\section}{\normalsize\bfseries\sffamily}{\thesection}{0em}{}
+\titleformat{\subsection}{\small\bfseries\sffamily}{\thesubsection}{0em}{}
+
+% Color scheme
+\definecolor{headerblue}{RGB}{0,102,153}
+\definecolor{lightgray}{RGB}{240,240,240}
+\definecolor{darkgray}{RGB}{80,80,80}
+
+\begin{document}
+
+% ========== TITLE ==========
+\begin{center}
+{\small\textit{PRECISION MEDICINE / CLINICAL RECOMMENDATION}}\\[2pt]
+{\Large\bfseries\sffamily [Treatment Type]}\\[1pt]
+{\normalsize\textit{[Condition/Disease Name]}}
+\end{center}
+
+\vspace{-8pt}
+
+% ========== PATIENT/CASE INFO BOX ==========
+\begin{tcolorbox}[
+ colback=lightgray,
+ colframe=headerblue,
+ boxrule=0.5pt,
+ arc=2pt,
+ left=4pt,right=4pt,top=3pt,bottom=3pt,
+ fontupper=\small
+]
+\textbf{Patient ID:} [De-identified ID] \hfill \textbf{Date:} \today\\
+\textbf{Diagnosis:} [Primary diagnosis + ICD-10] \hfill \textbf{Stage/Grade:} [If applicable]\\
+\textbf{Age/Sex:} [Age range, sex] \hfill \textbf{Molecular Profile:} [Key biomarkers or cluster, if applicable]
+\end{tcolorbox}
+
+\vspace{4pt}
+
+% ========== TWO-COLUMN LAYOUT FOR EFFICIENCY ==========
+\begin{multicols}{2}
+
+% ========== LEFT COLUMN ==========
+
+\section*{TARGET PATIENT POPULATION}
+{\small
+\textbf{Number of Patients:} [N (\% of cohort)]\\
+\textbf{Key Features:} [Brief demographic or clinical features]\\
+\textbf{Inclusion Criteria:} [1-2 key criteria]
+}
+
+\section*{PRIMARY TREATMENT REGIMEN}
+{\small
+\begin{enumerate}[leftmargin=12pt]
+ \item \textbf{[Intervention 1]:} [Specific details]
+ \begin{itemize}
+ \item Dose: [specific dosing]
+ \item Frequency: [schedule]
+ \item Duration: [timeframe]
+ \end{itemize}
+
+ \item \textbf{[Intervention 2]:} [Specific details]
+ \begin{itemize}
+ \item [Key parameters]
+ \end{itemize}
+
+ \item \textbf{[Intervention 3]:} [Optional, if needed]
+ \begin{itemize}
+ \item [Key parameters]
+ \end{itemize}
+\end{enumerate}
+}
+
+\section*{SUPPORTIVE CARE}
+{\small
+\begin{itemize}
+ \item \textbf{[Supportive Med 1]:} [dose/frequency]
+ \item \textbf{[Supportive Med 2]:} [dose/frequency]
+ \item \textbf{[Other support]:} [brief description]
+\end{itemize}
+}
+
+\section*{RATIONALE}
+{\small
+[1-3 sentences explaining why this regimen is appropriate for this patient. Include key pathophysiology, guideline alignment, or molecular rationale if applicable.]
+}
+
+\columnbreak
+
+% ========== RIGHT COLUMN ==========
+
+\section*{MOLECULAR TARGETS / RISK FACTORS}
+{\small
+\begin{itemize}
+ \item \textbf{[Target/Factor 1]:} [Value/status]
+ \item \textbf{[Target/Factor 2]:} [Value/status]
+ \item \textbf{[Target/Factor 3]:} [Value/status]
+\end{itemize}
+}
+
+\section*{EVIDENCE LEVEL}
+{\small
+\textbf{[Level designation - e.g., Level 1, FDA approved]}\\
+\textbf{Supporting Evidence:} [Guideline name/year or key trial]\\
+\textbf{References:} [1-2 key citations in abbreviated format]
+}
+
+\section*{MONITORING REQUIREMENTS}
+{\small
+\begin{tabular}{@{}ll@{}}
+\textbf{Parameter} & \textbf{Frequency} \\
+\hline
+[Lab/vital 1] & [e.g., Weekly x 4 weeks] \\
+[Lab/vital 2] & [e.g., Monthly x 3 months] \\
+[Lab/vital 3] & [e.g., Every 3 months] \\
+[Assessment tool] & [e.g., Baseline, 3 mo, 6 mo] \\
+\end{tabular}
+}
+
+\section*{EXPECTED CLINICAL BENEFIT}
+{\small
+\textbf{Primary Outcome:} [e.g., Median OS 20.9 months]\\
+\textbf{Timeline:} [e.g., Response assessment at 12 weeks]\\
+\textbf{Success Criteria:} [Specific metrics for goal achievement]
+}
+
+\section*{CRITICAL DECISION POINTS}
+{\small
+\begin{itemize}
+ \item \textbf{Hold treatment if:} [Specific criteria]
+ \item \textbf{Dose modify for:} [Specific criteria]
+ \item \textbf{Discontinue if:} [Specific criteria]
+\end{itemize}
+}
+
+\end{multicols}
+
+\vspace{4pt}
+
+% ========== BOTTOM SECTION - FULL WIDTH ==========
+\begin{tcolorbox}[
+ colback=yellow!10,
+ colframe=red!60!black,
+ boxrule=0.8pt,
+ arc=2pt,
+ left=4pt,right=4pt,top=3pt,bottom=3pt,
+ fontupper=\small\bfseries
+]
+\textbf{EMERGENCY CONTACTS / URGENT CONCERNS:} \\
+{\small\normalfont
+Call [clinic/provider] immediately for: [List 2-3 red flag symptoms]. \\
+Emergency: 911 | Clinic: [phone] | After-hours: [phone] | Pharmacy: [phone]
+}
+\end{tcolorbox}
+
+\vspace{6pt}
+
+{\footnotesize\textit{
+Prepared by: [Provider name, credentials] | Plan created: \today | Next review: [date] \\
+HIPAA Notice: This document contains de-identified patient information per Safe Harbor standards.
+}}
+
+\end{document}
+
diff --git a/scientific-skills/treatment-plans/assets/pain_management_plan.tex b/scientific-skills/treatment-plans/assets/pain_management_plan.tex
new file mode 100644
index 0000000..cf7678f
--- /dev/null
+++ b/scientific-skills/treatment-plans/assets/pain_management_plan.tex
@@ -0,0 +1,799 @@
+% Pain Management Plan Template
+% For acute and chronic pain treatment
+% Last updated: 2025
+
+\documentclass[11pt,letterpaper]{article}
+
+% Packages
+\usepackage[top=1in,bottom=1in,left=1in,right=1in]{geometry}
+\usepackage[utf8]{inputenc}
+\usepackage{array}
+\usepackage{longtable}
+\usepackage{booktabs}
+\usepackage{enumitem}
+\usepackage{xcolor}
+\usepackage{fancyhdr}
+\usepackage{lastpage}
+\usepackage{tabularx}
+\usepackage[most]{tcolorbox}
+
+% Header and footer
+\pagestyle{fancy}
+\fancyhf{}
+\lhead{Pain Management Plan}
+\rhead{Page \thepage\ of \pageref{LastPage}}
+\lfoot{Date Created: \today}
+\rfoot{Confidential Patient Information}
+
+% Title formatting
+\usepackage{titlesec}
+\titleformat{\section}{\large\bfseries}{\thesection}{1em}{}
+\titleformat{\subsection}{\normalsize\bfseries}{\thesubsection}{1em}{}
+
+\begin{document}
+
+% Title
+\begin{center}
+{\Large\bfseries PAIN MANAGEMENT PLAN}\\[0.5em]
+{\large Comprehensive Multimodal Pain Treatment}\\[0.5em]
+\rule{\textwidth}{1pt}
+\end{center}
+
+\vspace{1em}
+
+% ===== TREATMENT PLAN HIGHLIGHTS (Foundation Medicine Model) =====
+\begin{tcolorbox}[colback=yellow!10!white,colframe=yellow!75!black,title=\textbf{TREATMENT PLAN HIGHLIGHTS},fonttitle=\bfseries\large]
+
+\textbf{Pain Diagnosis:} [Primary pain condition - e.g., Chronic low back pain, nociceptive/neuropathic mixed]
+
+\vspace{0.3em}
+\textbf{Primary Treatment Goals:}
+\begin{itemize}[leftmargin=*,itemsep=0pt]
+ \item [Goal 1 - e.g., Reduce pain from 8/10 to $<$5/10 within 8 weeks]
+ \item [Goal 2 - e.g., Return to work with accommodations within 12 weeks]
+ \item [Goal 3 - e.g., Improve physical function - walk 30 minutes without significant pain]
+\end{itemize}
+
+\vspace{0.3em}
+\textbf{Main Interventions:}
+\begin{itemize}[leftmargin=*,itemsep=0pt]
+ \item \textit{Multimodal Pharmacotherapy:} [Medications - e.g., Acetaminophen, duloxetine, topical lidocaine]
+ \item \textit{Physical Interventions:} [Therapies - e.g., PT 2x/week, core strengthening, heat/ice]
+ \item \textit{Behavioral:} [Approaches - e.g., CBT for pain, relaxation techniques, activity pacing]
+\end{itemize}
+
+\vspace{0.3em}
+\textbf{Timeline:} [Phases - e.g., Intensive treatment (8 weeks), Optimization (12 weeks), Long-term management]
+
+\end{tcolorbox}
+
+\vspace{1em}
+
+% ===== SECTION 1: PATIENT AND PAIN INFORMATION =====
+\section*{1. Patient Information and Pain Assessment}
+
+\textbf{HIPAA Notice}: De-identify all protected health information before sharing.
+
+\vspace{0.5em}
+
+\begin{tabularx}{\textwidth}{|l|X|}
+\hline
+\textbf{Patient ID} & [De-identified code, e.g., PM-001] \\ \hline
+\textbf{Age Range} & [e.g., 45-50 years] \\ \hline
+\textbf{Sex} & [Male/Female/Other] \\ \hline
+\textbf{Date of Plan} & [Month/Year only] \\ \hline
+\textbf{Pain Specialist} & [Name, MD, Credentials] \\ \hline
+\textbf{Referring Provider} & [Name, MD/NP/PA] \\ \hline
+\textbf{Facility} & [Pain clinic/hospital name] \\ \hline
+\end{tabularx}
+
+\vspace{1em}
+
+\subsection*{Pain Characteristics}
+
+\textbf{Pain Type}: [e.g., Chronic low back pain] ☐ Acute ☑ Chronic
+
+\textbf{Primary Pain Diagnosis}: [e.g., Chronic lumbar radiculopathy] (ICD-10: [M54.16])
+
+\textbf{Secondary Pain Diagnoses}:
+\begin{itemize}[leftmargin=*]
+ \item [e.g., Lumbar spinal stenosis] (ICD-10: [M48.06])
+ \item [e.g., Degenerative disc disease L4-L5] (ICD-10: [M51.36])
+\end{itemize}
+
+\textbf{Duration}: [e.g., 3 years of chronic pain, worsening past 6 months]
+
+\textbf{Pain Location}:
+\begin{itemize}[leftmargin=*]
+ \item \textbf{Primary}: Lower back (lumbar region L4-L5)
+ \item \textbf{Radiation}: Right leg, posterior thigh to calf (sciatic distribution)
+ \item \textbf{Secondary}: [Other pain sites if applicable]
+\end{itemize}
+
+\textbf{Pain Quality}: [e.g., Sharp, shooting pain in leg; dull ache in back]
+
+\textbf{Pain Intensity}:
+\begin{itemize}[leftmargin=*]
+ \item \textbf{Current}: [e.g., 7/10 numeric rating scale (NRS)]
+ \item \textbf{Average (past week)}: [e.g., 6/10]
+ \item \textbf{Worst}: [e.g., 9/10]
+ \item \textbf{Best}: [e.g., 4/10 with rest]
+ \item \textbf{At night}: [e.g., 6/10, disrupts sleep]
+\end{itemize}
+
+\textbf{Temporal Pattern}:
+\begin{itemize}[leftmargin=*]
+ \item ☐ Constant ☑ Intermittent ☐ Episodic
+ \item \textbf{Frequency}: Daily, worse with activity
+ \item \textbf{Duration of episodes}: Varies, 2-6 hours of severe pain
+ \item \textbf{Breakthrough pain}: [e.g., Yes, with bending, lifting, prolonged sitting]
+\end{itemize}
+
+\textbf{Aggravating Factors}:
+\begin{itemize}[leftmargin=*]
+ \item Prolonged sitting ($>$30 minutes)
+ \item Bending forward
+ \item Lifting objects $>$10 lbs
+ \item Prolonged standing
+ \item Coughing, sneezing (increases radicular pain)
+\end{itemize}
+
+\textbf{Alleviating Factors}:
+\begin{itemize}[leftmargin=*]
+ \item Lying supine with knees elevated
+ \item Heat application to lower back
+ \item Walking short distances (5-10 minutes)
+ \item Current pain medications (partial relief)
+\end{itemize}
+
+\subsection*{Pain Impact Assessment}
+
+\textbf{Functional Interference} (Brief Pain Inventory - BPI):
+
+\begin{tabularx}{\textwidth}{|l|c|X|}
+\hline
+\textbf{Domain} & \textbf{Score (0-10)} & \textbf{Description} \\ \hline
+General Activity & 7/10 & Significantly limited household tasks \\ \hline
+Mood & 6/10 & Frustration, irritability, mild depression \\ \hline
+Walking Ability & 8/10 & Can walk only 5-10 minutes before pain \\ \hline
+Work & 9/10 & Unable to work (construction job), on disability \\ \hline
+Relationships & 5/10 & Decreased social engagement \\ \hline
+Sleep & 7/10 & Difficulty falling asleep, awakens with pain \\ \hline
+Enjoyment of Life & 8/10 & Cannot participate in hobbies (fishing, gardening) \\ \hline
+\end{tabularx}
+
+\textbf{Quality of Life Impact}:
+\begin{itemize}[leftmargin=*]
+ \item Unable to work for 1 year
+ \item Difficulty with ADLs (bathing, dressing due to bending limitations)
+ \item Social isolation, stopped attending family events
+ \item Stopped recreational activities (fishing, yard work)
+ \item Relationship strain with spouse
+\end{itemize}
+
+\textbf{Psychological Impact}:
+\begin{itemize}[leftmargin=*]
+ \item \textbf{Depression Screening} (PHQ-9): [e.g., 12/27 - Moderate depression]
+ \item \textbf{Anxiety Screening} (GAD-7): [e.g., 10/21 - Moderate anxiety]
+ \item \textbf{Pain Catastrophizing}: [e.g., Moderate - frequent thoughts that pain won't improve]
+ \item \textbf{Sleep Disturbance}: [e.g., 5-6 hours/night, poor quality]
+\end{itemize}
+
+\subsection*{Previous Pain Treatments}
+
+\textbf{Medications Tried}:
+\begin{longtable}{|p{3cm}|p{2.5cm}|p{7.5cm}|}
+\hline
+\textbf{Medication} & \textbf{Duration} & \textbf{Response} \\ \hline
+NSAIDs (ibuprofen) & 2 years & Partial relief initially, GI upset, ineffective now \\ \hline
+Acetaminophen & 1 year & Minimal benefit \\ \hline
+Cyclobenzaprine & 6 months & Sedation, minimal pain relief, discontinued \\ \hline
+Gabapentin & 3 months & Tried up to 1800mg/day, minimal benefit, dizziness \\ \hline
+Tramadol & 1 year & Partial relief, nausea, stopped working \\ \hline
+[List others] & & \\ \hline
+\end{longtable}
+
+\textbf{Interventional Procedures}:
+\begin{itemize}[leftmargin=*]
+ \item Lumbar epidural steroid injection (ESI) x2 - Last [6 months ago], temporary relief (3-4 weeks)
+ \item Physical therapy: 3 months, minimal sustained benefit
+ \item Chiropractic care: 6 months, temporary relief only
+\end{itemize}
+
+\textbf{Non-pharmacological}:
+\begin{itemize}[leftmargin=*]
+ \item Physical therapy, home exercise program (partial compliance)
+ \item Heat/ice application
+ \item TENS unit (limited benefit)
+\end{itemize}
+
+\subsection*{Medical and Surgical History}
+
+\begin{itemize}[leftmargin=*]
+ \item \textbf{Relevant Comorbidities}: Hypertension, GERD, obesity (BMI 33)
+ \item \textbf{Previous Surgeries}: None on spine
+ \item \textbf{Imaging}:
+ \begin{itemize}
+ \item Lumbar MRI [6 months ago]: L4-L5 disc herniation, moderate central stenosis, right foraminal narrowing
+ \item No surgical candidacy per neurosurgery consultation
+ \end{itemize}
+ \item \textbf{Current Medications}: Lisinopril 20mg daily, omeprazole 20mg daily
+ \item \textbf{Allergies}: NKDA
+\end{itemize}
+
+\subsection*{Substance Use and Risk Assessment}
+
+\textbf{Alcohol}: [e.g., Social use, 2-3 drinks/week]
+
+\textbf{Tobacco}: [e.g., 10 pack-year history, quit 2 years ago]
+
+\textbf{Illicit Drugs}: [e.g., Denies current or past use]
+
+\textbf{Opioid Risk Tool (ORT) Score}: [e.g., 3 points - Moderate risk]
+\begin{itemize}[leftmargin=*]
+ \item Family history of substance abuse: Yes (1 point)
+ \item Personal history of substance abuse: No
+ \item Age 16-45: No (patient is 45-50)
+ \item History of preadolescent sexual abuse: No
+ \item Psychological disease: Depression (2 points)
+\end{itemize}
+
+\textbf{Urine Drug Screen (UDS)}: [e.g., Negative - Baseline before starting controlled substances]
+
+\textbf{Prescription Drug Monitoring Program (PDMP)}: [e.g., Checked - No other controlled substance prescriptions]
+
+% ===== SECTION 2: PAIN MANAGEMENT GOALS =====
+\section*{2. Pain Management Goals (SMART Format)}
+
+\textbf{Realistic Expectations Discussed}: Complete pain elimination unlikely; goal is meaningful pain reduction and improved function.
+
+\subsection*{2.1 Short-Term Goals (4-8 weeks)}
+
+\begin{enumerate}[leftmargin=*]
+ \item \textbf{Pain Intensity}: Reduce average pain from 6-7/10 to 4-5/10 using multimodal analgesia within 6 weeks.
+
+ \item \textbf{Functional Improvement}: Increase walking tolerance from 5-10 minutes to 20-30 minutes within 8 weeks.
+
+ \item \textbf{Sleep}: Improve sleep quality from 5-6 hours to 7 hours per night with fewer pain-related awakenings within 4 weeks.
+
+ \item \textbf{Medication Optimization}: Establish effective multimodal regimen with minimal side effects within 4 weeks.
+\end{enumerate}
+
+\subsection*{2.2 Long-Term Goals (3-6 months)}
+
+\begin{enumerate}[leftmargin=*]
+ \item \textbf{Pain Reduction}: Achieve average pain level of 3-4/10, allowing engagement in daily activities within 3 months.
+
+ \item \textbf{Return to Work}: Explore modified duty or vocational rehabilitation with goal of returning to some form of employment within 6 months.
+
+ \item \textbf{Functional Activities}: Resume light recreational activities (fishing, light gardening with modifications) within 4 months.
+
+ \item \textbf{Psychological Well-being}: Reduce depression (PHQ-9 $<$10) and anxiety (GAD-7 $<$8) through pain relief and CBT within 3 months.
+
+ \item \textbf{Reduced Pain Interference}: Improve BPI interference scores by 30-40\% across all domains within 6 months.
+
+ \item \textbf{Opioid Reduction}: If opioids initiated, taper to lowest effective dose or discontinue if alternative strategies successful.
+\end{enumerate}
+
+\subsection*{2.3 Patient-Identified Goals}
+
+\begin{itemize}[leftmargin=*]
+ \item \textbf{Priority 1}: "I want to be able to play with my grandkids without being in agony"
+ \item \textbf{Priority 2}: "I want to sleep through the night"
+ \item \textbf{Priority 3}: "I want to do some kind of work, even if not my old job"
+ \item \textbf{Priority 4}: "I don't want to be on pain pills forever"
+\end{itemize}
+
+% ===== SECTION 3: MULTIMODAL TREATMENT PLAN =====
+\section*{3. Comprehensive Multimodal Treatment Plan}
+
+\textbf{Approach}: Opioid-sparing multimodal analgesia with combination pharmacologic, interventional, physical, and psychological therapies.
+
+\subsection*{3.1 Pharmacological Management}
+
+\textbf{First-Line Non-Opioid Analgesics}:
+
+\begin{longtable}{|p{3cm}|p{2cm}|p{2cm}|p{6.5cm}|}
+\hline
+\textbf{Medication} & \textbf{Dose} & \textbf{Frequency} & \textbf{Rationale \& Instructions} \\ \hline
+\endfirsthead
+\hline
+\textbf{Medication} & \textbf{Dose} & \textbf{Frequency} & \textbf{Rationale \& Instructions} \\ \hline
+\endhead
+
+Duloxetine (Cymbalta) & 30mg, titrate to 60mg & Daily & \textbf{Rationale}: SNRI approved for chronic MSK pain, also treats comorbid depression. \textbf{Start}: 30mg daily x 1 week, then 60mg daily. \textbf{Benefit}: Pain reduction + mood improvement. \textbf{Monitor}: Nausea (take with food), BP, suicidal ideation first weeks. \\ \hline
+
+Meloxicam & 15mg & Daily & \textbf{Rationale}: NSAID for inflammatory component. \textbf{Instructions}: Take with food. \textbf{Monitor}: GI symptoms (on PPI already), renal function, BP. \textbf{Duration}: Trial 4-8 weeks, reassess if benefit vs. risk. \\ \hline
+
+Acetaminophen ER & 1300mg & TID (scheduled) & \textbf{Rationale}: Baseline analgesic, opioid-sparing. \textbf{Max}: 4000mg/day. Safe with liver function normal. Scheduled, not PRN for chronic pain. \\ \hline
+
+Tizanidine & 2-4mg & QHS & \textbf{Rationale}: Muscle relaxant for muscle spasm component. \textbf{Start}: 2mg QHS, may increase to 4mg. \textbf{SE}: Sedation (beneficial for sleep), dry mouth. \textbf{Monitor}: BP (can lower), LFTs. \\ \hline
+
+[Add as needed] & & & \\ \hline
+\end{longtable}
+
+\textbf{Adjuvant Analgesics} (If first-line insufficient):
+
+\begin{itemize}[leftmargin=*]
+ \item \textbf{Pregabalin (Lyrica)}: If neuropathic component predominates
+ \begin{itemize}
+ \item Start 75mg BID, titrate to 150mg BID over 1-2 weeks
+ \item Monitor: Dizziness, sedation, weight gain, peripheral edema
+ \item More effective than gabapentin, better tolerability for many patients
+ \end{itemize}
+\end{itemize}
+
+\textbf{Topical Therapies}:
+\begin{itemize}[leftmargin=*]
+ \item \textbf{Diclofenac gel 1\%}: Apply to lower back QID (NSAID, local effect)
+ \item \textbf{Lidocaine patches 5\%}: Apply to painful area up to 12 hours daily
+ \item \textbf{Compounded creams}: [If appropriate - ketoprofen/baclofen/cyclobenzaprine cream]
+\end{itemize}
+
+\textbf{Opioid Therapy} (If conservative measures inadequate):
+
+\textit{Note: Opioids considered only after multimodal non-opioid therapies trialed. CDC guidelines followed.}
+
+\begin{itemize}[leftmargin=*]
+ \item \textbf{Indication}: Severe functional impairment despite aggressive non-opioid multimodal therapy
+ \item \textbf{Risk-Benefit Discussion}: Documented - risks (dependence, tolerance, side effects, overdose) vs. benefits (functional improvement)
+ \item \textbf{Informed Consent}: Opioid treatment agreement signed
+ \item \textbf{Starting Opioid}: [e.g., Oxycodone 5mg Q6H PRN] - Lowest effective dose, short-acting initially
+ \item \textbf{Morphine Milligram Equivalent (MME)}: Start $<$50 MME/day, avoid $>$90 MME/day if possible
+ \item \textbf{Monitoring Plan}:
+ \begin{itemize}
+ \item UDS every 3-6 months
+ \item PDMP check every prescription
+ \item Reassess pain and function every 1-3 months
+ \item Naloxone co-prescribed for overdose reversal
+ \item Pain contract/opioid agreement
+ \end{itemize}
+ \item \textbf{Taper Plan}: If goals not met or risks outweigh benefits, slow taper (10-25\% per week to month)
+\end{itemize}
+
+\subsection*{3.2 Interventional Pain Procedures}
+
+\textbf{Recommended Procedures}:
+
+\begin{enumerate}[leftmargin=*]
+ \item \textbf{Lumbar Epidural Steroid Injection (ESI)} - Repeat series
+ \begin{itemize}
+ \item \textbf{Indication}: Radicular pain from disc herniation/stenosis
+ \item \textbf{Approach}: Transforaminal at L4-L5 right (fluoroscopy-guided)
+ \item \textbf{Timing}: Can repeat if previous 3-4 week relief, up to 3-4 injections/year
+ \item \textbf{Expected Benefit}: 50-70\% experience significant short-term relief
+ \end{itemize}
+
+ \item \textbf{Medial Branch Blocks (MBB)} - Diagnostic
+ \begin{itemize}
+ \item \textbf{Indication}: Assess facet joint contribution to pain
+ \item \textbf{Target}: L3-L4, L4-L5 facets bilaterally
+ \item \textbf{Next Step}: If $>$50\% relief x2 blocks, proceed to radiofrequency ablation (RFA)
+ \end{itemize}
+
+ \item \textbf{Radiofrequency Ablation (RFA)} - If MBB positive
+ \begin{itemize}
+ \item \textbf{Indication}: Facet-mediated pain confirmed by diagnostic blocks
+ \item \textbf{Expected Duration}: 6-12 months of relief
+ \item \textbf{Repeatable}: Can repeat when pain returns
+ \end{itemize}
+
+ \item \textbf{Spinal Cord Stimulation (SCS)} - If refractory
+ \begin{itemize}
+ \item \textbf{Indication}: Failed conservative management, not surgical candidate
+ \item \textbf{Trial First}: Percutaneous trial x 5-7 days
+ \item \textbf{Permanent Implant}: If trial successful ($>$50\% pain relief, functional improvement)
+ \item \textbf{Success Rate}: 50-60\% achieve sustained benefit
+ \end{itemize}
+\end{enumerate}
+
+\textbf{Procedure Timeline}:
+\begin{itemize}[leftmargin=*]
+ \item Month 1: ESI series (up to 3 injections, 2 weeks apart)
+ \item Month 2: Evaluate ESI response, if inadequate → MBB diagnostic blocks
+ \item Month 3: If MBB positive ($>$50\% relief) → RFA
+ \item Month 4-6: Reassess, if still refractory → consider SCS trial
+\end{itemize}
+
+\subsection*{3.3 Physical and Rehabilitation Therapies}
+
+\textbf{Physical Therapy} (Comprehensive program):
+\begin{itemize}[leftmargin=*]
+ \item \textbf{Frequency}: 2-3x/week x 8-12 weeks
+ \item \textbf{Focus Areas}:
+ \begin{itemize}
+ \item Core strengthening (abdominals, paraspinals)
+ \item Hip and leg strengthening (reduce spinal load)
+ \item Flexibility and stretching (hamstrings, hip flexors)
+ \item Posture and body mechanics training
+ \item Aerobic conditioning (aquatic therapy, stationary bike)
+ \end{itemize}
+ \item \textbf{Manual Therapy}: Soft tissue mobilization, joint mobilization
+ \item \textbf{Modalities}: Heat, ice, TENS as adjuncts
+ \item \textbf{Functional Training}: Sit-to-stand, lifting mechanics, ADL adaptations
+\end{itemize}
+
+\textbf{Home Exercise Program}:
+\begin{itemize}[leftmargin=*]
+ \item Daily core exercises (planks, bird-dogs, bridges)
+ \item Stretching routine (30 min daily)
+ \item Walking program: Start 10 min 2x/day, gradually increase to 30 min continuous
+ \item Aquatic exercise if accessible (lower impact)
+\end{itemize}
+
+\textbf{Activity Modifications}:
+\begin{itemize}[leftmargin=*]
+ \item Avoid prolonged sitting ($>$30 min without breaks)
+ \item Lifting restrictions: No lifting $>$20 lbs, use proper mechanics
+ \item Ergonomic adjustments: Lumbar support, standing desk option
+ \item Pacing strategies: Alternate activity with rest
+\end{itemize}
+
+\textbf{Weight Management}:
+\begin{itemize}[leftmargin=*]
+ \item \textbf{Current BMI}: 33 (obese)
+ \item \textbf{Goal}: 10\% weight loss (reduce spinal loading)
+ \item \textbf{Referral}: Registered dietitian for nutrition counseling
+ \item \textbf{Exercise}: Low-impact aerobic activity as tolerated
+\end{itemize}
+
+\subsection*{3.4 Psychological and Behavioral Interventions}
+
+\textbf{Cognitive Behavioral Therapy for Chronic Pain (CBT-CP)}:
+\begin{itemize}[leftmargin=*]
+ \item \textbf{Frequency}: Weekly 50-min sessions x 8-12 weeks
+ \item \textbf{Therapist}: Pain psychologist or licensed therapist trained in CBT-CP
+ \item \textbf{Components}:
+ \begin{itemize}
+ \item Pain education and reconceptualization
+ \item Cognitive restructuring (address catastrophizing, all-or-nothing thinking)
+ \item Activity pacing and graded exposure
+ \item Relaxation techniques (progressive muscle relaxation, diaphragmatic breathing)
+ \item Sleep hygiene
+ \item Stress management
+ \item Goal-setting and problem-solving
+ \end{itemize}
+\end{itemize}
+
+\textbf{Mindfulness-Based Stress Reduction (MBSR)}:
+\begin{itemize}[leftmargin=*]
+ \item 8-week program, group format
+ \item Meditation, body scanning, mindful movement
+ \item Reduce pain catastrophizing and improve pain acceptance
+\end{itemize}
+
+\textbf{Acceptance and Commitment Therapy (ACT)}:
+\begin{itemize}[leftmargin=*]
+ \item Alternative to CBT if patient prefers
+ \item Focus on acceptance, values-based living despite pain
+\end{itemize}
+
+\textbf{Sleep Hygiene and Sleep Optimization}:
+\begin{itemize}[leftmargin=*]
+ \item Regular sleep schedule (11 PM - 6 AM)
+ \item Sleep environment optimization
+ \item Avoid screens 1 hour before bed
+ \item Consider trazodone 50mg QHS if sleep remains impaired (dual benefit: antidepressant + sleep aid)
+\end{itemize}
+
+\textbf{Depression and Anxiety Management}:
+\begin{itemize}[leftmargin=*]
+ \item Duloxetine addresses both pain and depression
+ \item Consider additional therapy if PHQ-9/GAD-7 not improving
+ \item Psychiatry referral if severe or refractory
+\end{itemize}
+
+\subsection*{3.5 Complementary and Alternative Therapies}
+
+\begin{itemize}[leftmargin=*]
+ \item \textbf{Acupuncture}: Trial 8-10 sessions (evidence for chronic low back pain)
+ \item \textbf{Massage Therapy}: 1-2x/week for muscle tension, relaxation
+ \item \textbf{Yoga or Tai Chi}: Gentle movement, mind-body connection
+ \item \textbf{Chiropractic Care}: Patient had some benefit previously, can continue if helpful
+\end{itemize}
+
+% ===== SECTION 4: MONITORING AND REASSESSMENT =====
+\section*{4. Monitoring Plan and Outcome Tracking}
+
+\subsection*{4.1 Regular Monitoring}
+
+\begin{tabularx}{\textwidth}{|l|c|X|}
+\hline
+\textbf{Parameter} & \textbf{Frequency} & \textbf{Method} \\ \hline
+Pain Intensity (NRS) & Daily (patient log) & 0-10 scale: average, worst, least daily \\ \hline
+Functional Interference (BPI) & Monthly & Brief Pain Inventory - 7 interference items \\ \hline
+Opioid Adherence (if prescribed) & Every visit & Pill counts, PDMP, UDS \\ \hline
+Medication Side Effects & Every visit & Systematic review \\ \hline
+Depression (PHQ-9) & Monthly & 9-item questionnaire \\ \hline
+Anxiety (GAD-7) & Monthly & 7-item questionnaire \\ \hline
+Sleep Quality & Weekly (patient log) & Hours slept, quality rating \\ \hline
+Physical Activity & Weekly (patient log) & Minutes walked, exercise completed \\ \hline
+Work Status & Monthly & Hours worked, restrictions \\ \hline
+\end{tabularx}
+
+\subsection*{4.2 Follow-Up Schedule}
+
+\begin{longtable}{|l|l|X|}
+\hline
+\textbf{Timeframe} & \textbf{Provider} & \textbf{Purpose} \\ \hline
+Week 2 & Pain clinic (phone) & Medication tolerance check, early side effects \\ \hline
+Week 4 & Pain specialist & Medication adjustment, assess early response, plan interventions \\ \hline
+Week 8 & Pain specialist & Comprehensive reassessment, BPI, goal progress review \\ \hline
+Month 3 & Pain specialist & Evaluate treatment response, modify plan if needed \\ \hline
+Month 6 & Pain specialist & Long-term goal assessment, maintenance planning \\ \hline
+Ongoing & Every 1-3 months & Chronic pain management, medication refills (if opioids: monthly) \\ \hline
+Physical Therapy & 2-3x/week x 8-12 weeks & See PT plan \\ \hline
+Psychology (CBT) & Weekly x 8-12 weeks & See psychological interventions \\ \hline
+\end{longtable}
+
+\subsection*{4.3 Treatment Response Criteria}
+
+\textbf{Success Criteria} (Re-evaluate at 3 months):
+\begin{itemize}[leftmargin=*]
+ \item Pain reduction $\geq$30\% (clinically meaningful)
+ \item Functional improvement: BPI interference reduced $\geq$30\%
+ \item Improved quality of life: Return to valued activities
+ \item Acceptable side effect profile
+\end{itemize}
+
+\textbf{If Goals Not Met}: Modify treatment plan
+\begin{itemize}[leftmargin=*]
+ \item Adjust medications (change dose, switch agents, add adjuvants)
+ \item Add or modify interventional procedures
+ \item Intensify physical therapy or psychological therapy
+ \item Consider multidisciplinary pain rehabilitation program
+ \item Reassess diagnosis (imaging, specialist consultation)
+\end{itemize}
+
+% ===== SECTION 5: SAFETY AND RISK MITIGATION =====
+\section*{5. Safety Planning and Risk Mitigation}
+
+\subsection*{Opioid Safety (If Opioids Prescribed)}
+
+\textbf{Opioid Treatment Agreement}: Patient signed agreement outlining:
+\begin{itemize}[leftmargin=*]
+ \item Single prescriber and pharmacy
+ \item No early refills
+ \item Lost/stolen medications not replaced
+ \item UDS and PDMP monitoring compliance
+ \item Consequences of aberrant behavior
+\end{itemize}
+
+\textbf{Naloxone Prescription}:
+\begin{itemize}[leftmargin=*]
+ \item \textbf{Naloxone (Narcan) nasal spray}: Prescribed to all patients on opioids
+ \item \textbf{Education}: Family member trained on use for overdose reversal
+ \item \textbf{Keep at Home}: Readily accessible
+\end{itemize}
+
+\textbf{Monitoring for Aberrant Behaviors}:
+\begin{itemize}[leftmargin=*]
+ \item Early refill requests
+ \item Multiple lost prescriptions
+ \item Obtaining opioids from other sources (PDMP)
+ \item Positive UDS for non-prescribed substances
+ \item Diversion suspected
+ \item \textit{Action}: If concerning behaviors → reassess, taper, refer to addiction specialist
+\end{itemize}
+
+\subsection*{Medication Safety}
+
+\textbf{Drug Interactions}:
+\begin{itemize}[leftmargin=*]
+ \item Duloxetine + NSAIDs: Increased bleeding risk (monitor)
+ \item Tizanidine + alcohol: Enhanced sedation (educate patient to avoid)
+ \item Multiple CNS depressants: Additive sedation (avoid benzodiazepines with opioids)
+\end{itemize}
+
+\textbf{Renal and Hepatic Function}:
+\begin{itemize}[leftmargin=*]
+ \item Baseline labs: BMP, LFTs
+ \item Monitor every 6-12 months (NSAIDs nephrotoxic, duloxetine hepatotoxic rare)
+\end{itemize}
+
+\textbf{GI Protection}:
+\begin{itemize}[leftmargin=*]
+ \item Already on omeprazole (PPI) for GERD
+ \item Adequate protection for NSAID use
+\end{itemize}
+
+\subsection*{Emergency Procedures}
+
+\textbf{Patient to call office or seek care if}:
+\begin{itemize}[leftmargin=*]
+ \item New or worsening neurologic symptoms (weakness, numbness, bowel/bladder dysfunction - cauda equina)
+ \item Severe uncontrolled pain despite medications
+ \item Signs of medication overdose (excessive sedation, confusion, slow breathing)
+ \item Allergic reaction to medications
+ \item Severe side effects (GI bleeding, liver problems)
+\end{itemize}
+
+\textbf{Call 911 for}:
+\begin{itemize}[leftmargin=*]
+ \item Suspected opioid overdose (unresponsive, slow/no breathing)
+ \item Sudden onset severe back pain with leg weakness/paralysis
+ \item Loss of bowel or bladder control (possible cauda equina syndrome)
+\end{itemize}
+
+% ===== SECTION 6: PATIENT EDUCATION =====
+\section*{6. Patient Education}
+
+\subsection*{Understanding Chronic Pain}
+
+\begin{itemize}[leftmargin=*]
+ \item \textbf{Pain Neurobiology}: Central sensitization, pain pathways, why pain persists
+ \item \textbf{Biopsychosocial Model}: Pain influenced by physical, psychological, and social factors
+ \item \textbf{Realistic Expectations}: Complete pain elimination unlikely, but significant improvement possible
+ \item \textbf{Active Participation}: Patient role in treatment (exercise, pacing, therapy homework) essential
+\end{itemize}
+
+\subsection*{Medication Education}
+
+\begin{itemize}[leftmargin=*]
+ \item How each medication works
+ \item Expected timeline for benefit (SNRIs take 4-6 weeks)
+ \item Common side effects and management
+ \item Importance of adherence (scheduled medications work better than PRN for chronic pain)
+ \item Risks of opioids if prescribed (dependence, tolerance, side effects)
+\end{itemize}
+
+\subsection*{Self-Management Skills}
+
+\begin{itemize}[leftmargin=*]
+ \item Activity pacing (alternate activity with rest, avoid overexertion)
+ \item Proper body mechanics (lifting, bending)
+ \item Home exercise program compliance
+ \item Pain flare management (rest, ice/heat, medication adjustment)
+ \item Stress reduction techniques
+ \item Sleep hygiene practices
+\end{itemize}
+
+\subsection*{Red Flags - When to Seek Immediate Care}
+
+\begin{itemize}[leftmargin=*]
+ \item New leg weakness or foot drop
+ \item Loss of bowel or bladder control
+ \item Numbness in saddle/groin area
+ \item Severe pain not responsive to usual medications
+ \item Fever with back pain (infection concern)
+\end{itemize}
+
+% ===== SECTION 7: MULTIDISCIPLINARY COORDINATION =====
+\section*{7. Care Coordination}
+
+\textbf{Care Team}:
+\begin{itemize}[leftmargin=*]
+ \item \textbf{Pain Specialist}: Medication management, interventional procedures
+ \item \textbf{Primary Care Provider}: Overall health, comorbidity management, coordinate referrals
+ \item \textbf{Physical Therapist}: Functional restoration, exercise program
+ \item \textbf{Pain Psychologist}: CBT-CP, coping skills
+ \item \textbf{Interventional Radiologist}: Perform injections (ESI, MBB, RFA)
+ \item \textbf{Vocational Rehabilitation}: Return-to-work planning
+ \item [Neurosurgery/Spine Surgeon: Consult if surgical candidacy changes]
+\end{itemize}
+
+\textbf{Communication Plan}:
+\begin{itemize}[leftmargin=*]
+ \item All providers share treatment plan
+ \item Pain specialist sends notes to PCP after each visit
+ \item PT and psychologist provide progress reports monthly
+ \item Patient carries medication list and pain diary
+\end{itemize}
+
+% ===== SECTION 8: DISCHARGE/TRANSITION PLANNING =====
+\section*{8. Long-Term Management and Transition}
+
+\subsection*{If Goals Achieved}
+
+\begin{itemize}[leftmargin=*]
+ \item Transition to maintenance phase
+ \item Reduce visit frequency (every 3-6 months)
+ \item Continue home exercise program indefinitely
+ \item Taper medications if possible (especially opioids)
+ \item Relapse prevention plan
+\end{itemize}
+
+\subsection*{If Refractory to Treatment}
+
+\begin{itemize}[leftmargin=*]
+ \item Consider multidisciplinary pain rehabilitation program (intensive 3-4 week program)
+ \item Re-evaluate for surgical candidacy
+ \item Advanced interventions (SCS, intrathecal pump if appropriate)
+ \item Palliative care consultation for severe refractory pain
+ \item Vocational rehabilitation for permanent disability if unable to return to work
+\end{itemize}
+
+% ===== SECTION 9: INFORMED CONSENT =====
+\section*{9. Informed Consent and Agreement}
+
+\textbf{Risks and Benefits Discussed}:
+
+\textbf{Benefits of Treatment Plan}:
+\begin{itemize}[leftmargin=*]
+ \item Pain reduction (goal 30-50\% reduction)
+ \item Improved function and quality of life
+ \item Better sleep
+ \item Reduced depression and anxiety
+ \item Potential return to work
+\end{itemize}
+
+\textbf{Risks}:
+\begin{itemize}[leftmargin=*]
+ \item Medication side effects (GI upset, sedation, others)
+ \item Opioid risks if prescribed (dependence, tolerance, overdose)
+ \item Injection risks (infection, bleeding, nerve injury - rare)
+ \item Treatment may not be fully effective
+\end{itemize}
+
+\textbf{Patient Responsibilities}:
+\begin{itemize}[leftmargin=*]
+ \item Take medications as prescribed
+ \item Attend all therapy appointments (PT, psychology)
+ \item Complete home exercise program
+ \item Keep pain diary
+ \item Communicate openly about pain and side effects
+ \item If on opioids: Comply with opioid agreement, UDS, PDMP
+\end{itemize}
+
+Patient demonstrates understanding, questions answered, agrees to proceed with comprehensive pain management plan.
+
+% ===== SECTION 10: SIGNATURES =====
+\vspace{2em}
+
+\section*{10. Provider Signature and Attestation}
+
+This comprehensive pain management plan has been reviewed with the patient. The patient understands the multimodal approach, realistic expectations, risks and benefits of treatments, and their responsibilities in pain management. If opioid therapy is included, an opioid treatment agreement has been signed separately.
+
+\vspace{1em}
+
+\begin{tabular}{ll}
+Provider Signature: & \rule{7cm}{0.5pt} \\[1em]
+Provider Name/Credentials: & \rule{7cm}{0.5pt} \\[1em]
+Date: & \rule{4cm}{0.5pt} \\[2em]
+\end{tabular}
+
+\subsection*{Patient Acknowledgment}
+
+I have reviewed this pain management plan with my provider. I understand the treatments recommended, realistic expectations for pain relief, and my role in managing my pain. I agree to participate actively in this plan.
+
+\vspace{1em}
+
+\begin{tabular}{ll}
+Patient Signature: & \rule{7cm}{0.5pt} \\[1em]
+Date: & \rule{4cm}{0.5pt} \\
+\end{tabular}
+
+\vspace{2em}
+\begin{center}
+\rule{\textwidth}{1pt}\\
+\textbf{End of Pain Management Plan}\\
+This document contains confidential patient information protected by HIPAA.
+\end{center}
+
+\end{document}
+
+% ========== NOTES FOR USERS ==========
+%
+% KEY PRINCIPLES:
+% - Multimodal opioid-sparing approach
+% - CDC opioid prescribing guidelines compliance
+% - Functional improvement as primary goal (not just pain scores)
+% - Biopsychosocial model of pain
+% - Patient education and self-management emphasis
+%
+% CUSTOMIZATION:
+% - Adjust medications based on pain type (nociceptive vs. neuropathic)
+% - Select interventions appropriate for pain generator
+% - Modify based on patient comorbidities and contraindications
+% - Adapt psychological interventions to patient preference
+%
+% OPIOID CONSIDERATIONS:
+% - Use only after non-opioid therapies inadequate
+% - Lowest effective dose, short-acting preferred initially
+% - Close monitoring, UDS, PDMP
+% - Naloxone co-prescription
+% - Reassess regularly, taper if not meeting goals
+%
+% COMPILATION:
+% pdflatex pain_management_plan.tex
+
diff --git a/scientific-skills/treatment-plans/assets/perioperative_care_plan.tex b/scientific-skills/treatment-plans/assets/perioperative_care_plan.tex
new file mode 100644
index 0000000..3b47a09
--- /dev/null
+++ b/scientific-skills/treatment-plans/assets/perioperative_care_plan.tex
@@ -0,0 +1,753 @@
+% Perioperative Care Plan Template
+% For surgical and procedural patient management
+% Last updated: 2025
+
+\documentclass[11pt,letterpaper]{article}
+
+% Packages
+\usepackage[top=1in,bottom=1in,left=1in,right=1in]{geometry}
+\usepackage[utf8]{inputenc}
+\usepackage{array}
+\usepackage{longtable}
+\usepackage{booktabs}
+\usepackage{enumitem}
+\usepackage{xcolor}
+\usepackage{fancyhdr}
+\usepackage{lastpage}
+\usepackage{tabularx}
+\usepackage[most]{tcolorbox}
+
+% Header and footer
+\pagestyle{fancy}
+\fancyhf{}
+\lhead{Perioperative Care Plan}
+\rhead{Page \thepage\ of \pageref{LastPage}}
+\lfoot{Date Created: \today}
+\rfoot{Confidential Patient Information}
+
+% Title formatting
+\usepackage{titlesec}
+\titleformat{\section}{\large\bfseries}{\thesection}{1em}{}
+\titleformat{\subsection}{\normalsize\bfseries}{\thesubsection}{1em}{}
+
+\begin{document}
+
+% Title
+\begin{center}
+{\Large\bfseries PERIOPERATIVE CARE PLAN}\\[0.5em]
+{\large Surgical \& Procedural Patient Management}\\[0.5em]
+\rule{\textwidth}{1pt}
+\end{center}
+
+\vspace{1em}
+
+% ===== TREATMENT PLAN HIGHLIGHTS (Foundation Medicine Model) =====
+\begin{tcolorbox}[colback=red!5!white,colframe=red!75!black,title=\textbf{TREATMENT PLAN HIGHLIGHTS},fonttitle=\bfseries\large]
+
+\textbf{Procedure:} [Planned surgery/procedure - e.g., Laparoscopic cholecystectomy for symptomatic cholelithiasis]
+
+\vspace{0.3em}
+\textbf{Primary Perioperative Goals:}
+\begin{itemize}[leftmargin=*,itemsep=0pt]
+ \item [Goal 1 - e.g., Safe completion of procedure with minimal complications]
+ \item [Goal 2 - e.g., Discharge within 24 hours (outpatient procedure)]
+ \item [Goal 3 - e.g., Return to normal activities within 2 weeks]
+\end{itemize}
+
+\vspace{0.3em}
+\textbf{Key Perioperative Elements:}
+\begin{itemize}[leftmargin=*,itemsep=0pt]
+ \item \textit{Preoperative:} [Optimization - e.g., ASA class II, medical clearance obtained, NPO after midnight]
+ \item \textit{Intraoperative:} [Approach - e.g., General anesthesia, standard laparoscopic technique]
+ \item \textit{Postoperative:} [Recovery - e.g., Early mobilization, multimodal analgesia, same-day discharge]
+\end{itemize}
+
+\vspace{0.3em}
+\textbf{Timeline:} [Schedule - e.g., Surgery date [XX/XX], follow-up at 2 weeks, full recovery 4-6 weeks]
+
+\end{tcolorbox}
+
+\vspace{1em}
+
+% ===== SECTION 1: PATIENT AND PROCEDURE INFORMATION =====
+\section*{1. Patient and Procedure Information}
+
+\textbf{HIPAA Notice}: De-identify all protected health information before sharing.
+
+\vspace{0.5em}
+
+\begin{tabularx}{\textwidth}{|l|X|}
+\hline
+\textbf{Patient ID} & [De-identified code, e.g., SURG-001] \\ \hline
+\textbf{Age Range} & [e.g., 65-70 years] \\ \hline
+\textbf{Sex} & [Male/Female/Other] \\ \hline
+\textbf{Date of Plan} & [Month/Year only] \\ \hline
+\textbf{Surgeon} & [Name, MD, Specialty] \\ \hline
+\textbf{Anesthesiologist} & [Name, MD or assigned team] \\ \hline
+\textbf{Planned Procedure} & [e.g., Elective total knee arthroplasty, right] \\ \hline
+\textbf{CPT Code} & [e.g., 27447] \\ \hline
+\textbf{Scheduled Date} & [Month/Year or "Within 2-4 weeks"] \\ \hline
+\textbf{Facility} & [Hospital/Surgery center name] \\ \hline
+\textbf{Expected LOS} & [e.g., 2-3 days] \\ \hline
+\end{tabularx}
+
+\vspace{1em}
+
+\subsection*{Surgical Indication}
+
+\textbf{Primary Diagnosis}: [e.g., Severe osteoarthritis, right knee] (ICD-10: [M17.11])
+
+\textbf{Indication for Surgery}:
+[e.g., Patient has severe right knee pain (8/10) limiting mobility and function despite conservative management including physical therapy, weight loss, and analgesics. Radiographs demonstrate bone-on-bone contact, osteophytes, and joint space narrowing. Failed conservative treatment for 12+ months. Patient desires surgical intervention to improve quality of life and function.]
+
+\textbf{Previous Treatments}:
+\begin{itemize}[leftmargin=*]
+ \item Physical therapy (6 months, minimal benefit)
+ \item Weight loss (15 lbs, ongoing)
+ \item NSAIDs, acetaminophen (limited efficacy)
+ \item Intra-articular corticosteroid injections (3 injections, temporary relief only)
+\end{itemize}
+
+\subsection*{Medical History and Comorbidities}
+
+\textbf{Active Medical Conditions}:
+\begin{itemize}[leftmargin=*]
+ \item \textbf{Hypertension}: Well-controlled on lisinopril 20mg daily
+ \item \textbf{Type 2 Diabetes}: HbA1c 6.8\%, well-controlled on metformin
+ \item \textbf{Hyperlipidemia}: On atorvastatin 40mg
+ \item \textbf{Obesity}: BMI 32 (down from 35 with weight loss efforts)
+ \item [List additional conditions]
+\end{itemize}
+
+\textbf{Current Medications}:
+\begin{longtable}{|p{3cm}|p{2cm}|p{2cm}|p{6cm}|}
+\hline
+\textbf{Medication} & \textbf{Dose} & \textbf{Frequency} & \textbf{Perioperative Plan} \\ \hline
+Lisinopril & 20mg & Daily & Hold day of surgery, resume POD 1 if BP stable \\ \hline
+Metformin & 1000mg & BID & Hold 24 hours before surgery, resume when eating \\ \hline
+Atorvastatin & 40mg & QHS & Continue through surgery \\ \hline
+Aspirin & 81mg & Daily & Discuss with surgeon - likely continue \\ \hline
+Ibuprofen & 600mg & PRN & Discontinue 5-7 days before surgery \\ \hline
+[Add medications] & & & \\ \hline
+\end{longtable}
+
+\textbf{Allergies}: [NKDA or list medication allergies and reactions]
+
+\subsection*{Preoperative Risk Assessment}
+
+\textbf{ASA Physical Status Classification}: [e.g., ASA Class II - Mild systemic disease (HTN, DM)]
+
+\textbf{Cardiac Risk} (Revised Cardiac Risk Index - RCRI):
+\begin{itemize}[leftmargin=*]
+ \item High-risk surgery: ☐ Yes ☑ No (orthopedic is intermediate-risk)
+ \item Ischemic heart disease: ☐ Yes ☑ No
+ \item Heart failure: ☐ Yes ☑ No
+ \item Cerebrovascular disease: ☐ Yes ☑ No
+ \item Diabetes on insulin: ☐ Yes ☑ No
+ \item Creatinine $>$2 mg/dL: ☐ Yes ☑ No
+ \item \textbf{RCRI Score}: 0 (Low risk $<$1\% cardiac event)
+\end{itemize}
+
+\textbf{Pulmonary Risk}:
+\begin{itemize}[leftmargin=*]
+ \item No active pulmonary disease
+ \item No smoking history
+ \item Room air oxygen saturation 98\%
+ \item Low risk for postoperative pulmonary complications
+\end{itemize}
+
+\textbf{VTE Risk} (Caprini Score):
+\begin{itemize}[leftmargin=*]
+ \item Age 65-70: 2 points
+ \item Major surgery ($>$45 min): 2 points
+ \item BMI $>$30: 1 point
+ \item \textbf{Total Score}: 5 (Moderate-high risk)
+ \item \textbf{Prophylaxis Plan}: Pharmacologic (enoxaparin) + mechanical (SCDs)
+\end{itemize}
+
+\textbf{Bleeding Risk}: Low (no anticoagulation, normal coagulation studies)
+
+% ===== SECTION 2: PREOPERATIVE OPTIMIZATION =====
+\section*{2. Preoperative Optimization and Preparation}
+
+\subsection*{2.1 Medical Optimization}
+
+\textbf{Diabetes Management}:
+\begin{itemize}[leftmargin=*]
+ \item \textbf{Goal}: HbA1c $<$7-8\% for elective surgery (current 6.8\% - optimized)
+ \item \textbf{Preop Day}: Hold metformin 24 hours before surgery
+ \item \textbf{Morning of Surgery}: NPO, no oral hypoglycemics
+ \item \textbf{Glucose Monitoring}: Check fasting glucose morning of surgery, target 100-180 mg/dL
+ \item \textbf{Perioperative Protocol}: Insulin sliding scale if glucose $>$180 mg/dL
+\end{itemize}
+
+\textbf{Hypertension Management}:
+\begin{itemize}[leftmargin=*]
+ \item \textbf{Goal}: BP $<$140/90 preoperatively (current 128/76 - controlled)
+ \item \textbf{Medication Plan}: Hold lisinopril morning of surgery (avoid intraop hypotension)
+ \item \textbf{Beta-blockers}: [If on beta-blocker, continue through surgery]
+ \item \textbf{Postop}: Resume home BP medications when tolerating oral intake
+\end{itemize}
+
+\textbf{Cardiac Clearance}:
+\begin{itemize}[leftmargin=*]
+ \item \textbf{Assessment}: Low cardiac risk (RCRI 0), intermediate-risk surgery
+ \item \textbf{Functional Capacity}: $>$4 METs (can climb 1 flight of stairs)
+ \item \textbf{EKG}: Normal sinus rhythm, no acute changes
+ \item \textbf{Additional Testing}: Not needed (low risk, good functional capacity)
+ \item \textbf{Cardiology Consultation}: Not indicated
+ \item \textbf{Cleared for Surgery}: Yes
+\end{itemize}
+
+\textbf{Pulmonary Optimization}:
+\begin{itemize}[leftmargin=*]
+ \item \textbf{Smoking Cessation}: N/A (non-smoker)
+ \item \textbf{Incentive Spirometry}: Education provided, will use postoperatively
+ \item \textbf{Pulmonary Function Tests}: Not indicated (no pulmonary disease)
+\end{itemize}
+
+\textbf{Nutritional Status}:
+\begin{itemize}[leftmargin=*]
+ \item \textbf{Albumin}: [e.g., 4.0 g/dL - normal]
+ \item \textbf{BMI}: 32 (obese, but weight loss of 15 lbs achieved)
+ \item \textbf{Nutritional Optimization}: Adequate, no protein supplementation needed
+\end{itemize}
+
+\textbf{Anemia Screening and Management}:
+\begin{itemize}[leftmargin=*]
+ \item \textbf{Preop Hemoglobin}: [e.g., 13.2 g/dL - normal]
+ \item \textbf{Iron Studies}: [If low Hgb - check iron, ferritin, TIBC]
+ \item \textbf{Optimization}: No anemia present, no intervention needed
+ \item \textbf{Transfusion Threshold}: Hgb $<$7-8 g/dL postoperatively (restrictive strategy)
+\end{itemize}
+
+\subsection*{2.2 Medication Management}
+
+\textbf{Medications to Continue}:
+\begin{itemize}[leftmargin=*]
+ \item Statin (atorvastatin)
+ \item Aspirin 81mg (after surgeon confirmation - typically continued for orthopedic)
+ \item [Other chronic medications per anesthesia recommendations]
+\end{itemize}
+
+\textbf{Medications to Hold}:
+\begin{itemize}[leftmargin=*]
+ \item \textbf{NSAIDs}: Discontinue 5-7 days before surgery (ibuprofen)
+ \item \textbf{ACE Inhibitors}: Hold day of surgery (lisinopril)
+ \item \textbf{Metformin}: Hold 24 hours before, resume when eating normally
+ \item \textbf{[Other medications]}: [Specific instructions]
+\end{itemize}
+
+\textbf{Anticoagulation Management}:
+\begin{itemize}[leftmargin=*]
+ \item Not applicable (patient not on anticoagulation)
+ \item [If on warfarin: bridge with LMWH, target INR $<$1.5]
+ \item [If on DOAC: hold 24-48 hours based on renal function]
+\end{itemize}
+
+\subsection*{2.3 Preoperative Testing and Clearance}
+
+\textbf{Laboratory Tests}:
+\begin{itemize}[leftmargin=*]
+ \item CBC: [Results - Hgb, platelets]
+ \item BMP: [Results - creatinine, glucose, electrolytes]
+ \item HbA1c: 6.8\% (within 3 months)
+ \item Coagulation studies (PT/INR, PTT): [If indicated]
+ \item Type and screen: [Completed, blood available if needed]
+\end{itemize}
+
+\textbf{Imaging}:
+\begin{itemize}[leftmargin=*]
+ \item Chest X-ray: [If indicated - age $>$50 with cardiac/pulmonary disease]
+ \item Preop knee X-rays: Confirm diagnosis, surgical planning
+\end{itemize}
+
+\textbf{Medical Clearance}: ☑ Cleared for surgery by PCP [Date]
+
+\subsection*{2.4 Enhanced Recovery After Surgery (ERAS) Protocol}
+
+\textbf{Preoperative ERAS Elements}:
+\begin{itemize}[leftmargin=*]
+ \item \textbf{Patient Education}: Provided ERAS booklet, reviewed expectations
+ \item \textbf{Nutritional Optimization}: Carbohydrate loading (clear carb drink 2 hours before surgery)
+ \item \textbf{Fasting Guidelines}: NPO solid food 6 hours, clear liquids until 2 hours before
+ \item \textbf{Preoperative Bathing}: Chlorhexidine shower night before and morning of surgery
+ \item \textbf{No Premedication}: Avoid long-acting sedatives (faster recovery)
+\end{itemize}
+
+% ===== SECTION 3: PERIOPERATIVE GOALS =====
+\section*{3. Perioperative Goals}
+
+\subsection*{3.1 Immediate Perioperative Goals (Day 0-1)}
+
+\begin{enumerate}[leftmargin=*]
+ \item \textbf{Pain Control}: Achieve pain $\leq$4/10 at rest, $\leq$6/10 with movement using multimodal analgesia by POD 0.
+
+ \item \textbf{Early Mobilization}: Out of bed to chair within 4-6 hours post-surgery (day of surgery if morning case).
+
+ \item \textbf{Nausea/Vomiting Prevention}: No or minimal PONV with multimodal antiemetic prophylaxis.
+
+ \item \textbf{Glucose Control}: Maintain blood glucose 100-180 mg/dL perioperatively.
+
+ \item \textbf{Hemodynamic Stability}: Maintain BP within 20\% of baseline, avoid hypo/hypertension.
+\end{enumerate}
+
+\subsection*{3.2 Early Postoperative Goals (POD 1-3)}
+
+\begin{enumerate}[leftmargin=*]
+ \item \textbf{Mobilization}: Ambulate with physical therapy 50+ feet with walker by POD 1, progress to 150 feet by POD 2.
+
+ \item \textbf{ROM}: Achieve knee flexion $>$70 degrees and full extension by POD 2.
+
+ \item \textbf{Pain Management}: Transition to oral multimodal analgesia, pain $\leq$5/10, minimize opioid use.
+
+ \item \textbf{Diet Advancement}: Resume regular diet POD 1, adequate oral intake.
+
+ \item \textbf{Bowel Function}: Return of bowel sounds, pass flatus by POD 2.
+
+ \item \textbf{Urinary Function}: Foley catheter removed POD 0-1, spontaneous void within 6-8 hours.
+
+ \item \textbf{Prevent Complications}: No surgical site infection, DVT, PE, or other major complications.
+\end{enumerate}
+
+\subsection*{3.3 Discharge Goals (POD 2-3)}
+
+\begin{enumerate}[leftmargin=*]
+ \item \textbf{Functional Mobility}: Independent transfers, ambulate 150+ feet with assistive device, negotiate stairs if needed for home.
+
+ \item \textbf{Pain Control}: Adequate pain control on oral medications, pain $<$5/10.
+
+ \item \textbf{Safety}: Patient/family demonstrate understanding of precautions, medications, wound care.
+
+ \item \textbf{Discharge Readiness}: Stable vital signs, no complications, safe for discharge home (with home health if needed).
+\end{enumerate}
+
+% ===== SECTION 4: INTRAOPERATIVE MANAGEMENT =====
+\section*{4. Intraoperative Management Plan}
+
+\subsection*{Anesthesia Plan}
+
+\textbf{Anesthesia Type}: [e.g., Spinal anesthesia + sedation] (surgeon/anesthesia preference)
+
+\textbf{Alternatives Discussed}:
+\begin{itemize}[leftmargin=*]
+ \item General anesthesia
+ \item Regional anesthesia (spinal/epidural)
+ \item Peripheral nerve block (femoral, adductor canal block)
+\end{itemize}
+
+\textbf{Multimodal Analgesia - Intraoperative}:
+\begin{itemize}[leftmargin=*]
+ \item Regional anesthesia (spinal/block) as primary analgesic
+ \item IV acetaminophen 1g intraoperatively
+ \item Ketorolac 15-30mg IV (if no contraindication)
+ \item Local anesthetic infiltration at surgical site (surgeon)
+ \item Minimize intraop opioids (opioid-sparing approach)
+\end{itemize}
+
+\textbf{PONV Prophylaxis}:
+\begin{itemize}[leftmargin=*]
+ \item Ondansetron 4mg IV
+ \item Dexamethasone 4-8mg IV
+ \item Scopolamine patch (if high PONV risk)
+ \item Avoid volatile anesthetics if possible (TIVA preferred)
+\end{itemize}
+
+\subsection*{Surgical Approach}
+
+\textbf{Procedure}: Total knee arthroplasty, cemented components
+
+\textbf{Antibiotic Prophylaxis}:
+\begin{itemize}[leftmargin=*]
+ \item Cefazolin 2g IV within 60 minutes of incision (3g if weight $>$120 kg)
+ \item Redose if surgery $>$4 hours or blood loss $>$1500 mL
+ \item Discontinue within 24 hours post-surgery
+\end{itemize}
+
+\textbf{VTE Prophylaxis - Intraoperative}:
+\begin{itemize}[leftmargin=*]
+ \item Sequential compression devices (SCDs) applied before induction
+ \item Continue SCDs throughout hospitalization and at rest at home
+\end{itemize}
+
+\textbf{Surgical Site Infection Prevention}:
+\begin{itemize}[leftmargin=*]
+ \item Chlorhexidine-alcohol skin prep
+ \item Maintain normothermia (goal temp $>$36°C)
+ \item Glucose control (intraop glucose $<$180 mg/dL)
+ \item Surgical time minimize (planned $<$2 hours)
+\end{itemize}
+
+\textbf{Blood Management}:
+\begin{itemize}[leftmargin=*]
+ \item Tranexamic acid 1-2g IV (reduce blood loss)
+ \item Cell saver if appropriate
+ \item Restrictive transfusion strategy (Hgb $<$7-8 g/dL)
+\end{itemize}
+
+% ===== SECTION 5: POSTOPERATIVE MANAGEMENT =====
+\section*{5. Postoperative Management Plan}
+
+\subsection*{5.1 Pain Management (Multimodal Analgesia)}
+
+\textbf{ERAS Pain Protocol} (opioid-minimizing):
+
+\begin{longtable}{|p{3.5cm}|p{2.5cm}|p{7cm}|}
+\hline
+\textbf{Medication} & \textbf{Dose/Frequency} & \textbf{Instructions} \\ \hline
+\textbf{Acetaminophen} & 1000mg Q6H & Scheduled (not PRN), around-the-clock for 48 hours \\ \hline
+\textbf{Celecoxib} or \textbf{Meloxicam} & 200mg BID or 15mg daily & NSAID (if no contraindication), scheduled x 7-14 days \\ \hline
+\textbf{Gabapentin} & 300mg TID & Neuropathic pain adjuvant, start preop or POD 0 \\ \hline
+\textbf{Ice therapy} & Q2H while awake & Local cooling, reduces swelling and pain \\ \hline
+\textbf{Oxycodone} & 5mg Q4H PRN & Breakthrough pain only, goal minimize use \\ \hline
+\end{longtable}
+
+\textbf{Pain Assessment}: Numeric rating scale (0-10) every 4 hours, before and after ambulation
+
+\textbf{Pain Goals}: $\leq$4/10 at rest, $\leq$6/10 with PT/activity
+
+\subsection*{5.2 Early Mobilization and Physical Therapy}
+
+\textbf{ERAS Mobility Protocol}:
+
+\begin{itemize}[leftmargin=*]
+ \item \textbf{POD 0 (Day of Surgery)}: Out of bed to chair 4-6 hours post-op, stand at bedside
+ \item \textbf{POD 1}:
+ \begin{itemize}
+ \item PT evaluation and gait training
+ \item Ambulate 50+ feet with walker x2
+ \item Begin ROM exercises (CPM machine or therapist-assisted)
+ \item Stair practice if needed for home
+ \end{itemize}
+ \item \textbf{POD 2}:
+ \begin{itemize}
+ \item Ambulate 150+ feet with walker x2-3
+ \item ROM: Goal flexion $>$90 degrees
+ \item Independent bed mobility and transfers
+ \item Stairs if required
+ \end{itemize}
+ \item \textbf{Discharge Criteria}: Ambulate 150 feet, transfers independently, stairs if applicable
+\end{itemize}
+
+\textbf{Fall Precautions}: High risk post-surgery - bed alarm, non-slip socks, walker, call for assist
+
+\subsection*{5.3 Nausea and Vomiting Management}
+
+\textbf{Multimodal Antiemetic Protocol}:
+\begin{itemize}[leftmargin=*]
+ \item Ondansetron 4mg IV/PO Q6H PRN
+ \item Metoclopramide 10mg IV Q6H PRN (if ondansetron insufficient)
+ \item Scopolamine patch (continue 72 hours if applied)
+ \item Non-pharmacologic: Ginger ale, acupressure bands, avoid rapid position changes
+\end{itemize}
+
+\subsection*{5.4 Nutrition and Diet Advancement}
+
+\textbf{ERAS Nutrition}:
+\begin{itemize}[leftmargin=*]
+ \item Resume diet as tolerated POD 0-1 (no prolonged NPO)
+ \item Protein-rich diet (wound healing)
+ \item Adequate hydration
+ \item No routine NG tube
+\end{itemize}
+
+\subsection*{5.5 VTE Prophylaxis}
+
+\textbf{Pharmacologic} (High-risk orthopedic surgery):
+\begin{itemize}[leftmargin=*]
+ \item \textbf{Enoxaparin 40mg SC daily} starting POD 1, continue 10-14 days
+ \item \textit{Alternative}: Apixaban 2.5mg BID x 12 days (extended prophylaxis)
+ \item Hold first dose if neuraxial anesthesia (spinal/epidural) until catheter removal + 12 hours
+\end{itemize}
+
+\textbf{Mechanical}:
+\begin{itemize}[leftmargin=*]
+ \item SCDs while in bed throughout hospitalization
+ \item Early mobilization (most important)
+\end{itemize}
+
+\textbf{Duration}: Minimum 10-14 days, consider up to 35 days for high-risk patients
+
+\subsection*{5.6 Urinary Catheter Management}
+
+\begin{itemize}[leftmargin=*]
+ \item \textbf{Foley Catheter}: Typically placed intraoperatively
+ \item \textbf{Removal}: POD 0 or POD 1 morning (early removal to prevent CAUTI)
+ \item \textbf{Voiding Trial}: Must void within 6-8 hours of catheter removal
+ \item \textbf{Retention Protocol}: If unable to void or bladder scan $>$400 mL, straight cath or replace Foley temporarily
+\end{itemize}
+
+\subsection*{5.7 Wound Care and Drain Management}
+
+\textbf{Surgical Drain}:
+\begin{itemize}[leftmargin=*]
+ \item Hemovac or JP drain typically placed
+ \item Monitor output, remove when $<$30 mL/8 hours (usually POD 1-2)
+\end{itemize}
+
+\textbf{Dressing}:
+\begin{itemize}[leftmargin=*]
+ \item Keep clean and dry
+ \item First dressing change POD 2 or per surgeon
+ \item Assess for signs of infection daily
+\end{itemize}
+
+\subsection*{5.8 Glycemic Control}
+
+\textbf{Postoperative Glucose Management}:
+\begin{itemize}[leftmargin=*]
+ \item Target glucose 100-180 mg/dL
+ \item Check glucose Q6H while NPO or on IV fluids
+ \item Insulin sliding scale (SSI) if glucose $>$180 mg/dL
+ \item Resume metformin when tolerating regular diet and creatinine stable
+\end{itemize}
+
+\subsection*{5.9 Complication Surveillance}
+
+\textbf{Monitor for}:
+\begin{itemize}[leftmargin=*]
+ \item \textbf{Surgical site infection}: Fever, wound erythema, purulent drainage, increased pain
+ \item \textbf{DVT/PE}: Unilateral leg swelling, chest pain, dyspnea, hypoxia
+ \item \textbf{Acute kidney injury}: Decreased UOP, rising creatinine
+ \item \textbf{Cardiovascular events}: Chest pain, EKG changes, troponin elevation
+ \item \textbf{Delirium}: Especially in elderly, multimodal prevention
+\end{itemize}
+
+% ===== SECTION 6: DISCHARGE PLANNING =====
+\section*{6. Discharge Planning and Criteria}
+
+\subsection*{Discharge Criteria (Typically POD 2-3)}
+
+Patient ready for discharge when ALL met:
+\begin{itemize}[leftmargin=*]
+ \item ☐ Adequate pain control on oral medications (pain $<$5/10)
+ \item ☐ Functional mobility: Ambulate 150+ feet, transfers, stairs if needed
+ \item ☐ Tolerating regular diet, adequate oral intake
+ \item ☐ Voiding spontaneously without catheter
+ \item ☐ Stable vital signs, no fever $>$38.5°C x 24 hours
+ \item ☐ No complications requiring continued hospitalization
+ \item ☐ Adequate home support and DME arranged
+ \item ☐ Patient/family education completed, demonstrate understanding
+\end{itemize}
+
+\subsection*{Discharge Medications}
+
+\begin{longtable}{|p{3cm}|p{2cm}|p{2cm}|p{6cm}|}
+\hline
+\textbf{Medication} & \textbf{Dose} & \textbf{Frequency} & \textbf{Duration/Instructions} \\ \hline
+Oxycodone & 5mg & Q4-6H PRN & Pain, 20 tablets (minimize use) \\ \hline
+Acetaminophen & 1000mg & Q6H & Scheduled x 2 weeks \\ \hline
+Meloxicam & 15mg & Daily & x 2 weeks (NSAID) \\ \hline
+Enoxaparin & 40mg SC & Daily & x 10-14 days (VTE prophylaxis) \\ \hline
+Colace & 100mg & BID & Constipation prevention while on opioids \\ \hline
+[Resume home meds] & & & Resume lisinopril, metformin, atorvastatin \\ \hline
+\end{longtable}
+
+\subsection*{Durable Medical Equipment (DME)}
+
+\begin{itemize}[leftmargin=*]
+ \item Walker (front-wheeled, standard adult)
+ \item Raised toilet seat with arms
+ \item Shower chair or bath bench
+ \item Reacher (32-inch)
+ \item Ice machine or ice packs (for knee)
+ \item Long-handled shoe horn (hip precautions if applicable)
+\end{itemize}
+
+\subsection*{Home Services}
+
+\begin{itemize}[leftmargin=*]
+ \item \textbf{Home Health Physical Therapy}: 2-3x/week x 2-3 weeks, then transition to outpatient PT
+ \item \textbf{Home Health Nursing}: PRN for wound check, drain removal if not removed before discharge, medication teaching (enoxaparin injections)
+ \item [If high needs: Home health aide for ADL assistance]
+\end{itemize}
+
+\subsection*{Patient Education Completed}
+
+\begin{itemize}[leftmargin=*]
+ \item ✓ Wound care and dressing changes
+ \item ✓ Signs of infection (fever, redness, drainage, increased pain)
+ \item ✓ Pain medication use and weaning plan
+ \item ✓ Enoxaparin self-injection technique (or family member trained)
+ \item ✓ DVT/PE warning signs (leg swelling, chest pain, shortness of breath)
+ \item ✓ Activity restrictions and precautions
+ \item ✓ Home exercise program
+ \item ✓ Use of DME (walker, raised toilet seat, etc.)
+ \item ✓ When to call surgeon (fever $>$101.5°F, severe pain, wound concerns)
+ \item ✓ Follow-up appointments scheduled
+\end{itemize}
+
+\subsection*{Activity Restrictions}
+
+\begin{itemize}[leftmargin=*]
+ \item Use walker for ambulation x 2-4 weeks (per PT recommendation)
+ \item No driving until off opioid pain medications and cleared by surgeon (typically 2-4 weeks)
+ \item No prolonged sitting $>$30-45 min without getting up and moving
+ \item Avoid kneeling on operative knee
+ \item Gradual return to activities as tolerated
+\end{itemize}
+
+\subsection*{Follow-Up Appointments}
+
+\begin{tabularx}{\textwidth}{|l|l|X|}
+\hline
+\textbf{Provider} & \textbf{Timing} & \textbf{Purpose} \\ \hline
+Surgeon & 10-14 days & Wound check, staple/suture removal, assess progress \\ \hline
+Surgeon & 6 weeks & X-ray, functional assessment, advance activities \\ \hline
+Surgeon & 3 months, 6 months, 1 year & Long-term follow-up, outcomes \\ \hline
+PCP & 1-2 weeks & Resume chronic disease management, BP/DM check \\ \hline
+PT (outpatient) & After home health complete & Continue strengthening, ROM, return to function \\ \hline
+\end{tabularx}
+
+% ===== SECTION 7: EMERGENCY PROCEDURES =====
+\section*{7. Postoperative Emergency Procedures}
+
+\textbf{Call surgeon immediately or go to ED if}:
+\begin{itemize}[leftmargin=*]
+ \item Fever $>$101.5°F (38.6°C)
+ \item Severe uncontrolled pain ($>$7/10 despite medications)
+ \item Wound: Excessive drainage, purulent discharge, wound dehiscence, foul odor
+ \item Increased redness, warmth, or swelling at surgical site
+ \item DVT symptoms: Unilateral leg swelling, pain, warmth, redness
+ \item PE symptoms: Sudden chest pain, shortness of breath, rapid heart rate
+ \item Numbness, tingling, or weakness in leg (nerve injury concern)
+ \item Inability to urinate
+ \item Excessive bleeding from surgical site
+\end{itemize}
+
+\textbf{Call 911 for}:
+\begin{itemize}[leftmargin=*]
+ \item Chest pain or pressure
+ \item Severe shortness of breath
+ \item Loss of consciousness
+ \item Signs of stroke (facial droop, arm weakness, speech difficulty)
+\end{itemize}
+
+\textbf{Surgeon Contact Information}:
+\begin{itemize}[leftmargin=*]
+ \item Office: [Phone number]
+ \item After-hours/Emergency: [On-call service number]
+\end{itemize}
+
+% ===== SECTION 8: REHABILITATION AND RECOVERY =====
+\section*{8. Rehabilitation Plan and Expected Recovery}
+
+\subsection*{Recovery Timeline}
+
+\begin{tabularx}{\textwidth}{|l|X|}
+\hline
+\textbf{Timeframe} & \textbf{Expected Progress} \\ \hline
+Week 1-2 & Wound healing, pain decreasing, ambulation with walker improving, ROM exercises \\ \hline
+Week 3-6 & Transition from walker to cane, ROM improving (goal flexion $>$100°), less pain \\ \hline
+Week 6-12 & Progress to independent ambulation (no assistive device), ROM 110-120° flexion, strengthening phase \\ \hline
+3-6 months & Return to most activities, continued strengthening, ROM optimization, minimal pain \\ \hline
+6-12 months & Full recovery, return to all desired activities, final ROM achieved \\ \hline
+\end{tabularx}
+
+\subsection*{Physical Therapy Goals}
+
+\textbf{Short-term} (0-6 weeks):
+\begin{itemize}[leftmargin=*]
+ \item ROM: Flexion $>$90° by week 2, $>$110° by week 6, full extension
+ \item Strength: Quadriceps, hamstrings, hip abductors
+ \item Ambulation: Progress from walker to cane to independent
+ \item Stairs: Negotiate safely
+\end{itemize}
+
+\textbf{Long-term} (6 weeks - 3 months):
+\begin{itemize}[leftmargin=*]
+ \item ROM: Maximum flexion (goal 120-125°)
+ \item Strength: Near-normal lower extremity strength
+ \item Function: Return to ADLs, hobbies, light sports
+ \item Gait: Normal gait pattern without assistive device
+\end{itemize}
+
+\subsection*{Home Exercise Program}
+
+\textit{Provided by PT, to be performed 2-3x daily}:
+\begin{itemize}[leftmargin=*]
+ \item Ankle pumps
+ \item Quad sets
+ \item Straight leg raises
+ \item Hamstring curls
+ \item Hip abduction
+ \item Knee flexion/extension ROM exercises
+ \item Heel slides
+ \item Stationary bike (when cleared)
+\end{itemize}
+
+% ===== SECTION 9: INFORMED CONSENT =====
+\section*{9. Informed Consent Documentation}
+
+\textbf{Risks and Benefits Discussed}:
+
+\textbf{Benefits}:
+\begin{itemize}[leftmargin=*]
+ \item Pain relief (90\% significant improvement)
+ \item Improved function and mobility
+ \item Enhanced quality of life
+ \item Return to desired activities
+\end{itemize}
+
+\textbf{Risks}:
+\begin{itemize}[leftmargin=*]
+ \item Infection ($<$2\%)
+ \item DVT/PE (2-3\% despite prophylaxis)
+ \item Bleeding, hematoma
+ \item Nerve or blood vessel injury (rare)
+ \item Stiffness, limited ROM
+ \item Implant loosening, wear (long-term)
+ \item Need for revision surgery (10-15\% lifetime risk)
+ \item Anesthesia risks
+\end{itemize}
+
+\textbf{Alternatives Discussed}:
+\begin{itemize}[leftmargin=*]
+ \item Continued conservative management (PT, medications, injections)
+ \item Partial knee replacement (if eligible)
+ \item No treatment
+\end{itemize}
+
+Patient demonstrates understanding, all questions answered, consents to proceed with surgery.
+
+% ===== SECTION 10: SIGNATURES =====
+\vspace{2em}
+
+\section*{10. Provider Signatures}
+
+\textbf{Surgeon}:\\[0.5em]
+Signature: \rule{6cm}{0.5pt} \quad Date: \rule{3cm}{0.5pt}\\
+Name/Credentials: \rule{6cm}{0.5pt}\\[1em]
+
+\textbf{Anesthesiologist}:\\[0.5em]
+Signature: \rule{6cm}{0.5pt} \quad Date: \rule{3cm}{0.5pt}\\
+Name/Credentials: \rule{6cm}{0.5pt}\\[1em]
+
+\textbf{Patient Consent}:\\[0.5em]
+I have reviewed this perioperative care plan. I understand the procedure, risks, benefits, and alternatives. My questions have been answered. I consent to the planned surgery.\\[0.5em]
+Signature: \rule{6cm}{0.5pt} \quad Date: \rule{3cm}{0.5pt}\\
+
+\vspace{2em}
+\begin{center}
+\rule{\textwidth}{1pt}\\
+\textbf{End of Perioperative Care Plan}\\
+This document contains confidential patient information protected by HIPAA.
+\end{center}
+
+\end{document}
+
+% ========== NOTES FOR USERS ==========
+%
+% This template emphasizes Enhanced Recovery After Surgery (ERAS) principles
+% Key ERAS elements: preop carbohydrate loading, minimal fasting, multimodal analgesia,
+% early mobilization, early feeding, minimizing tubes/drains, VTE prophylaxis
+%
+% CUSTOMIZATION:
+% - Adjust for specific surgical procedure
+% - Modify based on patient comorbidities
+% - Update medication protocols per institutional guidelines
+% - Adapt ERAS elements based on evidence and surgeon preference
+%
+% COMPILATION:
+% pdflatex perioperative_care_plan.tex
+
diff --git a/scientific-skills/treatment-plans/assets/quality_checklist.md b/scientific-skills/treatment-plans/assets/quality_checklist.md
new file mode 100644
index 0000000..c9bcbda
--- /dev/null
+++ b/scientific-skills/treatment-plans/assets/quality_checklist.md
@@ -0,0 +1,471 @@
+# Treatment Plan Quality Assurance Checklist
+
+## Overview
+
+Use this checklist to ensure treatment plans meet professional standards for completeness, quality, safety, and regulatory compliance. Review each section before finalizing the plan.
+
+---
+
+## Section 1: Completeness - Required Components
+
+### ☐ Patient Information
+- [ ] Patient identifier (de-identified if sharing)
+- [ ] Age range (not exact date of birth)
+- [ ] Sex and relevant demographics
+- [ ] Date of plan creation
+- [ ] Provider name and credentials
+- [ ] Facility/practice name
+- [ ] HIPAA de-identification notice included
+
+### ☐ Diagnosis and Assessment
+- [ ] Primary diagnosis clearly stated
+- [ ] ICD-10 code(s) included
+- [ ] Secondary diagnoses and comorbidities listed
+- [ ] Disease severity/staging documented
+- [ ] Baseline functional status assessed
+- [ ] Risk stratification performed (if applicable)
+
+### ☐ Treatment Goals
+- [ ] Short-term goals present (1-3 months)
+- [ ] Long-term goals present (6-12 months)
+- [ ] Goals meet SMART criteria (see Section 2)
+- [ ] Patient-centered goals included
+- [ ] Goals are prioritized or organized
+
+### ☐ Interventions
+- [ ] Pharmacological interventions specified
+- [ ] Non-pharmacological interventions included
+- [ ] Procedural interventions or referrals noted
+- [ ] Each intervention has clear rationale
+- [ ] Evidence-based or guideline-concordant
+
+### ☐ Timeline and Schedule
+- [ ] Treatment phases with durations defined
+- [ ] Appointment frequency specified
+- [ ] Milestone assessments scheduled
+- [ ] Expected total treatment duration stated
+
+### ☐ Monitoring Parameters
+- [ ] Clinical outcomes to track identified
+- [ ] Baseline values documented
+- [ ] Target values specified
+- [ ] Monitoring frequency defined
+- [ ] Assessment tools/scales named
+
+### ☐ Expected Outcomes
+- [ ] Primary outcome measures stated
+- [ ] Success criteria defined
+- [ ] Timeline for improvement indicated
+- [ ] Criteria for treatment modification noted
+
+### ☐ Follow-up Plan
+- [ ] Next appointment scheduled
+- [ ] Follow-up frequency specified
+- [ ] Communication plan outlined
+- [ ] Emergency contact procedures included
+
+### ☐ Patient Education
+- [ ] Condition education documented
+- [ ] Self-management skills training noted
+- [ ] Warning signs communicated
+- [ ] Resources and support listed
+
+### ☐ Risk Mitigation and Safety
+- [ ] Potential adverse effects identified
+- [ ] Safety monitoring plan included
+- [ ] Emergency procedures outlined
+- [ ] Complication prevention addressed
+
+### ☐ Signature and Date
+- [ ] Provider signature line
+- [ ] Provider name and credentials
+- [ ] Date of plan
+- [ ] Patient acknowledgment (if applicable)
+
+---
+
+## Section 2: SMART Goals Quality
+
+For each treatment goal, verify it meets SMART criteria:
+
+### ☐ Specific
+- [ ] Goal clearly defines what will be accomplished
+- [ ] No vague language (e.g., "improve", "better")
+- [ ] Specific outcome stated
+
+**Example**: "Reduce HbA1c from 8.5% to <7%" ✓
+**Not**: "Improve diabetes control" ✗
+
+### ☐ Measurable
+- [ ] Quantifiable metric or observable criterion included
+- [ ] Baseline value documented
+- [ ] Target value specified
+
+**Example**: "Walk 300 feet with walker independently" ✓
+**Not**: "Walk further" ✗
+
+### ☐ Achievable
+- [ ] Realistic given patient's condition and capabilities
+- [ ] Resources available to support goal
+- [ ] Timeframe is reasonable
+- [ ] Treatment efficacy supports goal
+
+**Example**: "Reduce pain from 7/10 to 4/10 in 6 weeks" ✓
+**Not**: "Eliminate all pain in 1 week" ✗
+
+### ☐ Relevant
+- [ ] Aligned with patient values and priorities
+- [ ] Clinically meaningful
+- [ ] Addresses patient's functional limitations
+- [ ] Integrated with overall treatment objectives
+
+**Example**: "Return to work with modifications within 3 months" ✓
+**Not**: "Lab value improvement" (if patient doesn't care about it) ✗
+
+### ☐ Time-bound
+- [ ] Specific deadline or timeframe stated
+- [ ] Reassessment interval defined
+- [ ] Action frequency specified (if applicable)
+
+**Example**: "Within 8 weeks" or "By month 3" ✓
+**Not**: "Eventually" or "Soon" ✗
+
+---
+
+## Section 3: Clinical Quality
+
+### ☐ Evidence-Based Practice
+- [ ] Interventions based on current evidence
+- [ ] Clinical practice guidelines followed
+- [ ] Guideline deviations explained and justified
+- [ ] Literature or evidence cited (if formal plan)
+
+### ☐ Medication Documentation (if applicable)
+- [ ] Generic drug names used
+- [ ] Specific dose, route, frequency documented
+- [ ] Indication/rationale provided for each medication
+- [ ] Adverse effects to monitor noted
+- [ ] Drug interactions considered
+- [ ] Titration plan included if applicable
+
+### ☐ Assessment Tools
+- [ ] Validated assessment tools used when available
+- [ ] Tools appropriate for condition (PHQ-9, FIM, Berg, etc.)
+- [ ] Baseline scores documented
+- [ ] Target scores specified
+- [ ] Reassessment schedule defined
+
+### ☐ Multidisciplinary Coordination (if applicable)
+- [ ] Roles of team members defined
+- [ ] Communication plan among providers specified
+- [ ] Care transitions addressed
+- [ ] Specialist recommendations integrated
+
+### ☐ Preventive Care Integration
+- [ ] Age-appropriate screening included
+- [ ] Vaccination schedule noted
+- [ ] Lifestyle counseling documented
+- [ ] Health maintenance addressed
+
+---
+
+## Section 4: Patient-Centered Care
+
+### ☐ Shared Decision-Making
+- [ ] Patient preferences documented
+- [ ] Treatment options discussed
+- [ ] Risks and benefits explained
+- [ ] Patient values incorporated into goals
+- [ ] Alternative treatments considered
+
+### ☐ Health Literacy
+- [ ] Language appropriate for patient understanding
+- [ ] Medical jargon explained or avoided
+- [ ] Teach-back method used or planned
+- [ ] Written materials at appropriate reading level
+
+### ☐ Cultural Competence
+- [ ] Cultural beliefs and practices considered
+- [ ] Language barriers addressed (interpreter if needed)
+- [ ] Cultural adaptations made when appropriate
+- [ ] Religious/spiritual preferences respected
+
+### ☐ Social Determinants of Health
+- [ ] Social needs screened (food, housing, transportation)
+- [ ] Barriers to care identified
+- [ ] Community resources provided
+- [ ] Financial concerns addressed (medication costs, etc.)
+
+### ☐ Patient Engagement
+- [ ] Patient actively involved in goal-setting
+- [ ] Self-management support provided
+- [ ] Patient education tailored to individual
+- [ ] Follow-up preferences considered
+
+---
+
+## Section 5: Safety and Risk Management
+
+### ☐ Medication Safety
+- [ ] Allergy history documented
+- [ ] Polypharmacy reviewed (deprescribing considered)
+- [ ] High-risk medications monitored appropriately
+- [ ] Drug-drug interactions checked
+- [ ] Renal/hepatic dosing adjustments made if needed
+
+### ☐ Fall Prevention (if relevant)
+- [ ] Fall risk assessed
+- [ ] Fall prevention strategies included
+- [ ] Environmental modifications recommended
+- [ ] Assistive devices prescribed
+
+### ☐ Infection Prevention (if relevant)
+- [ ] Immunizations up to date
+- [ ] Prophylactic antibiotics if indicated
+- [ ] Infection signs and symptoms patient education
+
+### ☐ Emergency Preparedness
+- [ ] Emergency warning signs clearly listed
+- [ ] When to call 911 specified
+- [ ] When to call provider defined
+- [ ] Emergency contact numbers provided
+
+### ☐ Suicide/Violence Risk (mental health plans)
+- [ ] Risk assessment documented
+- [ ] Safety plan created if ideation present
+- [ ] Means restriction addressed
+- [ ] Crisis resources provided (988 lifeline)
+- [ ] Follow-up frequency appropriate for risk level
+
+### ☐ Opioid Safety (pain management plans)
+- [ ] Opioid risk assessment completed (ORT, SOAPP)
+- [ ] Informed consent discussion documented
+- [ ] Treatment agreement signed
+- [ ] PDMP checked
+- [ ] Naloxone co-prescribed
+- [ ] UDS plan included
+
+---
+
+## Section 6: Regulatory Compliance
+
+### ☐ HIPAA Compliance
+- [ ] Protected health information (PHI) safeguarded
+- [ ] De-identification per Safe Harbor method (if sharing)
+- [ ] All 18 HIPAA identifiers removed (if de-identified)
+- [ ] Minimum necessary principle followed
+
+### ☐ Informed Consent
+- [ ] Consent discussion documented
+- [ ] Patient understanding verified
+- [ ] Risks and benefits explained
+- [ ] Alternative treatments discussed
+- [ ] Patient agreement documented
+
+### ☐ Medical Necessity
+- [ ] Treatment medically necessary for diagnosis
+- [ ] Interventions appropriate for severity
+- [ ] Evidence supports treatment choices
+- [ ] Frequency and duration justified
+
+### ☐ Billing and Coding
+- [ ] ICD-10 diagnosis codes included
+- [ ] CPT procedure codes (if procedures planned)
+- [ ] Documentation supports billing level
+- [ ] Medical necessity for services demonstrated
+
+### ☐ Quality Measure Support
+- [ ] Elements support quality reporting (HEDIS, MIPS)
+- [ ] Chronic disease management protocols followed
+- [ ] Preventive care documented
+- [ ] Patient safety indicators addressed
+
+### ☐ Specialty-Specific Regulations
+- [ ] 42 CFR Part 2 compliance (if substance use disorder treatment)
+- [ ] CDC opioid guidelines followed (if opioid prescription)
+- [ ] Joint Commission standards met (if applicable)
+- [ ] State-specific requirements addressed
+
+---
+
+## Section 7: Documentation Standards
+
+### ☐ Clarity and Precision
+- [ ] Professional medical terminology used appropriately
+- [ ] Abbreviations defined on first use
+- [ ] No ambiguous language
+- [ ] Specific rather than vague descriptions
+
+### ☐ Accuracy
+- [ ] Factually correct information
+- [ ] Current evidence-based recommendations
+- [ ] Correct medication dosing and frequencies
+- [ ] Proper ICD-10 and CPT coding
+
+### ☐ Organization
+- [ ] Logical flow and structure
+- [ ] Consistent formatting
+- [ ] Easy to locate key information
+- [ ] Headings and sections clearly labeled
+
+### ☐ Legibility (if handwritten or hybrid)
+- [ ] Handwriting legible
+- [ ] No unclear abbreviations
+- [ ] Typed portions clear
+- [ ] Signatures legible with printed name
+
+### ☐ Authentication
+- [ ] Provider name clearly stated
+- [ ] Credentials included
+- [ ] Date of plan present
+- [ ] Signature obtained (electronic or handwritten)
+
+---
+
+## Section 8: Special Considerations by Plan Type
+
+### For General Medical Plans:
+- [ ] Chronic disease management protocols followed
+- [ ] Guideline-based targets used (HbA1c, BP, lipids)
+- [ ] Medication regimen optimized
+- [ ] Comorbidities addressed
+- [ ] Preventive care integrated
+
+### For Rehabilitation Plans:
+- [ ] Functional assessments with validated tools (FIM, Berg)
+- [ ] Impairment, activity, and participation goals included
+- [ ] Therapy frequency and duration specified
+- [ ] Home exercise program documented
+- [ ] DME and environmental modifications listed
+- [ ] Discharge criteria defined
+
+### For Mental Health Plans:
+- [ ] DSM-5 diagnostic criteria met
+- [ ] Symptom severity assessed (PHQ-9, GAD-7, etc.)
+- [ ] Suicide/violence risk assessed
+- [ ] Safety plan created (if indicated)
+- [ ] Evidence-based psychotherapy specified
+- [ ] Medication trials and responses documented
+- [ ] Functional and recovery-oriented goals included
+
+### For Chronic Disease Management Plans:
+- [ ] All active conditions prioritized
+- [ ] Medication synergies identified
+- [ ] Polypharmacy addressed
+- [ ] Care coordination plan clear
+- [ ] Registry/population health integration noted
+- [ ] Transition management included
+
+### For Perioperative Plans:
+- [ ] Preoperative risk assessment (RCRI, ASA, Caprini)
+- [ ] Medical optimization documented
+- [ ] ERAS elements included (if applicable)
+- [ ] Postoperative milestones defined
+- [ ] Discharge criteria specified
+- [ ] VTE prophylaxis plan included
+
+### For Pain Management Plans:
+- [ ] Comprehensive pain assessment (location, quality, intensity, impact)
+- [ ] Pain type classified (nociceptive, neuropathic, nociplastic)
+- [ ] Multimodal analgesia approach
+- [ ] Opioid risk assessment (if opioids considered)
+- [ ] Functional goals emphasized (not just pain scores)
+- [ ] Psychological screening and intervention included
+- [ ] CDC opioid guidelines followed (if prescribing)
+
+---
+
+## Section 9: Final Review
+
+### ☐ Proofreading
+- [ ] Spelling and grammar checked
+- [ ] No typos or errors
+- [ ] Consistent terminology throughout
+- [ ] Patient name correct throughout (if not de-identified)
+
+### ☐ Completeness Verification
+- [ ] All placeholder text replaced with patient-specific information
+- [ ] All bracketed [fields] customized
+- [ ] No "TBD" or "to be completed" items remaining
+- [ ] All required sections complete
+
+### ☐ Quality Assurance
+- [ ] Plan reviewed by provider
+- [ ] Peer review completed (if applicable)
+- [ ] Compliance verification done
+- [ ] Automated checks run (if available scripts used)
+
+### ☐ Patient Review Preparation
+- [ ] Patient-friendly summary prepared (if needed)
+- [ ] Patient education materials gathered
+- [ ] Consent forms ready for signature
+- [ ] Questions anticipated and prepared to address
+
+---
+
+## Scoring and Interpretation
+
+**Total Items**: ~150 (varies by plan type)
+
+### Scoring:
+- Count number of checked items
+- Calculate percentage: (Checked / Total) × 100
+
+### Interpretation:
+- **95-100%**: Excellent - Plan meets highest quality standards
+- **85-94%**: Good - Plan is high quality with minor gaps
+- **70-84%**: Acceptable - Plan is adequate but has areas needing improvement
+- **<70%**: Needs Improvement - Significant gaps in quality or compliance
+
+### Critical Items (Must Have):
+The following items are critical and must be present:
+- ✓ Patient identifier and de-identification notice
+- ✓ Primary diagnosis with ICD-10 code
+- ✓ At least 3 SMART goals
+- ✓ Interventions with rationales
+- ✓ Monitoring plan
+- ✓ Follow-up plan
+- ✓ Patient education
+- ✓ Safety/risk mitigation
+- ✓ Emergency procedures
+- ✓ Provider signature
+
+If any critical item is missing, plan should not be finalized until corrected.
+
+---
+
+## Usage Instructions
+
+1. **Review each section** systematically
+2. **Check boxes** as criteria are met
+3. **Note deficiencies** for correction
+4. **Calculate score** to assess overall quality
+5. **Address gaps** before finalizing
+6. **Document review** with reviewer name and date
+
+**Reviewer**: \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_
+
+**Date Reviewed**: \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_
+
+**Score**: \_\_\_\_\_% (\_\_\_\_ items checked / \_\_\_\_ total items)
+
+**Status**:
+- [ ] Approved for use
+- [ ] Approved with minor revisions
+- [ ] Requires significant revision
+- [ ] Not approved
+
+**Comments/Recommendations**:
+
+\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_
+
+\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_
+
+\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_
+
+---
+
+**Document Version**: 1.0
+**Last Updated**: January 2025
+**Next Review**: Annually or with guideline updates
+
diff --git a/scientific-skills/treatment-plans/assets/rehabilitation_treatment_plan.tex b/scientific-skills/treatment-plans/assets/rehabilitation_treatment_plan.tex
new file mode 100644
index 0000000..9115c5f
--- /dev/null
+++ b/scientific-skills/treatment-plans/assets/rehabilitation_treatment_plan.tex
@@ -0,0 +1,756 @@
+% Rehabilitation Treatment Plan Template
+% For physical therapy, occupational therapy, and rehabilitation services
+% Last updated: 2025
+
+\documentclass[11pt,letterpaper]{article}
+
+% Packages
+\usepackage[top=1in,bottom=1in,left=1in,right=1in]{geometry}
+\usepackage{amsmath,amssymb}
+\usepackage[utf8]{inputenc}
+\usepackage{graphicx}
+\usepackage{array}
+\usepackage{longtable}
+\usepackage{booktabs}
+\usepackage{enumitem}
+\usepackage{xcolor}
+\usepackage{fancyhdr}
+\usepackage{lastpage}
+\usepackage{tabularx}
+\usepackage{multirow}
+\usepackage[most]{tcolorbox}
+
+% Header and footer
+\pagestyle{fancy}
+\fancyhf{}
+\lhead{Rehabilitation Treatment Plan}
+\rhead{Page \thepage\ of \pageref{LastPage}}
+\lfoot{Date Created: \today}
+\rfoot{Confidential Patient Information}
+
+% Title formatting
+\usepackage{titlesec}
+\titleformat{\section}{\large\bfseries}{\thesection}{1em}{}
+\titleformat{\subsection}{\normalsize\bfseries}{\thesubsection}{1em}{}
+
+\begin{document}
+
+% Title
+\begin{center}
+{\Large\bfseries REHABILITATION TREATMENT PLAN}\\[0.5em]
+{\large Physical Therapy | Occupational Therapy | Speech-Language Pathology}\\[0.5em]
+\rule{\textwidth}{1pt}
+\end{center}
+
+\vspace{1em}
+
+% ===== TREATMENT PLAN HIGHLIGHTS (Foundation Medicine Model) =====
+\begin{tcolorbox}[colback=green!5!white,colframe=green!75!black,title=\textbf{TREATMENT PLAN HIGHLIGHTS},fonttitle=\bfseries\large]
+
+\textbf{Key Diagnosis:} [Primary condition requiring rehabilitation - e.g., Post-stroke hemiparesis, Total knee replacement]
+
+\vspace{0.3em}
+\textbf{Primary Functional Goals:}
+\begin{itemize}[leftmargin=*,itemsep=0pt]
+ \item [Goal 1 - e.g., Independent ambulation with assistive device within 8 weeks]
+ \item [Goal 2 - e.g., Return to independent ADLs (bathing, dressing) within 12 weeks]
+ \item [Goal 3 - e.g., Improve upper extremity strength to 4/5 for functional tasks]
+\end{itemize}
+
+\vspace{0.3em}
+\textbf{Main Interventions:}
+\begin{itemize}[leftmargin=*,itemsep=0pt]
+ \item \textit{Physical Therapy:} [Focus - e.g., Gait training, strengthening, balance exercises 3x/week]
+ \item \textit{Occupational Therapy:} [Focus - e.g., ADL training, adaptive equipment, 2x/week]
+ \item \textit{Home Exercise Program:} [Key exercises - e.g., Daily strengthening and ROM exercises]
+\end{itemize}
+
+\vspace{0.3em}
+\textbf{Timeline:} [Duration - e.g., Acute phase (4 weeks), Active rehab (8 weeks), Maintenance (ongoing)]
+
+\end{tcolorbox}
+
+\vspace{1em}
+
+% ===== SECTION 1: PATIENT INFORMATION =====
+\section*{1. Patient Information}
+
+\textbf{HIPAA Notice}: De-identify per Safe Harbor method. Remove all 18 HIPAA identifiers before sharing.
+
+\vspace{0.5em}
+
+\begin{tabularx}{\textwidth}{|l|X|}
+\hline
+\textbf{Patient ID} & [De-identified code, e.g., PT-RH-001] \\ \hline
+\textbf{Age Range} & [e.g., 65-70 years] \\ \hline
+\textbf{Sex} & [Male/Female/Other] \\ \hline
+\textbf{Date of Plan} & [Month/Year only] \\ \hline
+\textbf{Referring Provider} & [Name, Credentials] \\ \hline
+\textbf{Primary Therapist} & [PT/OT/SLP Name, Credentials] \\ \hline
+\textbf{Facility} & [Rehabilitation center/Clinic name] \\ \hline
+\end{tabularx}
+
+\vspace{1em}
+
+\subsection*{Diagnosis and Medical History}
+
+\begin{itemize}[leftmargin=*]
+ \item \textbf{Primary Diagnosis}: [e.g., Right hip fracture status post ORIF] (ICD-10: [code])
+ \item \textbf{Secondary Diagnoses}:
+ \begin{itemize}
+ \item [e.g., Osteoporosis] (ICD-10: [code])
+ \item [e.g., Hypertension] (ICD-10: [code])
+ \item [Additional relevant conditions]
+ \end{itemize}
+ \item \textbf{Date of Injury/Surgery}: [Month/Year]
+ \item \textbf{Surgical Procedure}: [e.g., Open reduction internal fixation right hip]
+ \item \textbf{Precautions/Restrictions}: [e.g., Weight-bearing as tolerated, hip flexion $<$90 degrees]
+\end{itemize}
+
+\subsection*{Current Medications}
+
+Medications affecting rehabilitation:
+\begin{itemize}[leftmargin=*]
+ \item \textbf{Pain Management}: [e.g., Oxycodone 5mg Q6H PRN - may affect alertness]
+ \item \textbf{Anticoagulation}: [e.g., Enoxaparin 40mg daily - fall precautions]
+ \item \textbf{Other Relevant Medications}: [e.g., Beta-blocker - monitor HR during exercise]
+\end{itemize}
+
+\subsection*{Living Situation and Support}
+
+\begin{itemize}[leftmargin=*]
+ \item \textbf{Living Environment}: [e.g., Two-story home, bedroom upstairs, 4 steps to entry]
+ \item \textbf{Social Support}: [e.g., Lives with spouse, adult children nearby]
+ \item \textbf{Prior Functional Level}: [e.g., Independent in all ADLs, community ambulation]
+ \item \textbf{Occupation/Activities}: [e.g., Retired teacher, enjoys gardening and walking]
+\end{itemize}
+
+% ===== SECTION 2: FUNCTIONAL ASSESSMENT =====
+\section*{2. Initial Functional Assessment}
+
+\subsection*{2.1 Functional Independence Measure (FIM) or Similar}
+
+\textbf{Date of Assessment}: [Date]
+
+\begin{tabularx}{\textwidth}{|l|c|c|X|}
+\hline
+\textbf{Domain} & \textbf{Score} & \textbf{Goal} & \textbf{Notes} \\ \hline
+Self-Care & [e.g., 28/42] & [35/42] & Requires assist with lower body dressing, bathing \\ \hline
+Sphincter Control & [42/42] & [42/42] & Independent \\ \hline
+Transfers & [e.g., 12/21] & [18/21] & Moderate assist bed/chair, toilet \\ \hline
+Locomotion & [e.g., 8/14] & [12/14] & Contact guard ambulation 50ft with walker \\ \hline
+Communication & [14/14] & [14/14] & Independent \\ \hline
+Social Cognition & [21/21] & [21/21] & Independent \\ \hline
+\textbf{TOTAL FIM} & \textbf{[125/126]} & \textbf{[142/126]} & \\ \hline
+\end{tabularx}
+
+\vspace{0.5em}
+\textit{FIM Scoring: 7=Complete Independence, 6=Modified Independence, 5=Supervision, 4=Minimal Assist, 3=Moderate Assist, 2=Maximal Assist, 1=Total Assist}
+
+\subsection*{2.2 Physical Therapy Assessment}
+
+\textbf{Range of Motion}:
+\begin{longtable}{|l|c|c|c|}
+\hline
+\textbf{Joint/Motion} & \textbf{Baseline} & \textbf{Goal} & \textbf{Normal Range} \\ \hline
+\endfirsthead
+\hline
+\textbf{Joint/Motion} & \textbf{Baseline} & \textbf{Goal} & \textbf{Normal Range} \\ \hline
+\endhead
+Right hip flexion & 70° (pain at end range) & 110° pain-free & 120° \\ \hline
+Right hip extension & 5° & 15° & 20° \\ \hline
+Right hip abduction & 20° & 35° & 45° \\ \hline
+Right knee flexion & 100° & 125° & 130° \\ \hline
+Right ankle DF/PF & 5°/35° & 10°/40° & 15°/50° \\ \hline
+[Additional joints] & & & \\ \hline
+\end{longtable}
+
+\textbf{Muscle Strength (Manual Muscle Testing - MMT)}:
+\begin{longtable}{|l|c|c|}
+\hline
+\textbf{Muscle Group} & \textbf{Baseline} & \textbf{Goal} \\ \hline
+\endfirsthead
+\hline
+\textbf{Muscle Group} & \textbf{Baseline} & \textbf{Goal} \\ \hline
+\endhead
+Right hip flexors & 3/5 (fair) & 4+/5 (good+) \\ \hline
+Right hip extensors & 3/5 (fair) & 4+/5 (good+) \\ \hline
+Right hip abductors & 2+/5 (poor+) & 4/5 (good) \\ \hline
+Right quadriceps & 4-/5 (good-) & 5/5 (normal) \\ \hline
+Right ankle DF/PF & 4/5 / 4/5 & 5/5 / 5/5 \\ \hline
+Core stability & Fair & Good \\ \hline
+[Additional muscles] & & \\ \hline
+\end{longtable}
+
+\textit{MMT Scale: 5=Normal, 4=Good, 3=Fair, 2=Poor, 1=Trace, 0=Zero}
+
+\textbf{Balance Assessment}:
+\begin{itemize}[leftmargin=*]
+ \item \textbf{Berg Balance Scale}: [e.g., 38/56 - Moderate fall risk]
+ \item \textbf{Goal Berg Score}: [e.g., $>$45/56 - Low fall risk]
+ \item \textbf{Static Standing Balance}: [e.g., Able to stand 30 sec with walker, not independent]
+ \item \textbf{Dynamic Balance}: [e.g., Unable to step over obstacles safely]
+ \item \textbf{Single Leg Stance}: [e.g., Unable, requires support]
+\end{itemize}
+
+\textbf{Gait Assessment}:
+\begin{itemize}[leftmargin=*]
+ \item \textbf{Assistive Device}: [e.g., Front-wheeled walker]
+ \item \textbf{Weight-Bearing Status}: [e.g., WBAT (weight-bearing as tolerated)]
+ \item \textbf{Gait Distance}: [e.g., 50 feet with contact guard, requires 1 rest break]
+ \item \textbf{Gait Speed}: [e.g., 0.4 m/s (severely impaired, normal $>$1.0 m/s)]
+ \item \textbf{Gait Deviations}: [e.g., Shortened stance phase right, Trendelenburg gait, decreased step length]
+ \item \textbf{Stairs}: [e.g., Unable to attempt, 4 steps required for home access]
+\end{itemize}
+
+\textbf{Endurance}:
+\begin{itemize}[leftmargin=*]
+ \item \textbf{6-Minute Walk Test}: [e.g., 150 feet - severely impaired]
+ \item \textbf{Goal Distance}: [e.g., 300+ feet]
+ \item \textbf{Perceived Exertion}: [e.g., 5/10 after 50 feet]
+ \item \textbf{Vital Signs Response}: [e.g., HR increases 85→105, appropriate response]
+\end{itemize}
+
+\textbf{Pain Assessment}:
+\begin{itemize}[leftmargin=*]
+ \item \textbf{Pain Location}: [e.g., Right hip, groin region]
+ \item \textbf{Pain at Rest}: [e.g., 2/10]
+ \item \textbf{Pain with Activity}: [e.g., 6/10 with weight-bearing, 4/10 with ROM]
+ \item \textbf{Pain Impact}: [e.g., Limits therapy participation, improves with rest]
+\end{itemize}
+
+\subsection*{2.3 Occupational Therapy Assessment}
+
+\textbf{Activities of Daily Living (ADLs)}:
+\begin{longtable}{|l|c|X|}
+\hline
+\textbf{Activity} & \textbf{Level} & \textbf{Description} \\ \hline
+\endfirsthead
+\hline
+\textbf{Activity} & \textbf{Level} & \textbf{Description} \\ \hline
+\endhead
+Bathing & Mod A & Requires assist entering/exiting shower, reaching lower extremities \\ \hline
+Dressing - Upper Body & I & Independent \\ \hline
+Dressing - Lower Body & Mod A & Requires assist donning socks, shoes, pants due to hip precautions \\ \hline
+Toileting & Min A & Requires assist with clothing management \\ \hline
+Grooming & I & Independent \\ \hline
+Feeding & I & Independent \\ \hline
+Functional Mobility & CG & Contact guard for bed mobility, transfers \\ \hline
+\end{longtable}
+
+\textit{I=Independent, SV=Supervision, CG=Contact Guard, Min A=Minimal Assist, Mod A=Moderate Assist, Max A=Maximal Assist}
+
+\textbf{Instrumental Activities of Daily Living (IADLs)}:
+\begin{itemize}[leftmargin=*]
+ \item \textbf{Meal Preparation}: Not assessed, not safe for standing tasks currently
+ \item \textbf{Housekeeping}: Dependent, unable to perform
+ \item \textbf{Laundry}: Dependent
+ \item \textbf{Shopping}: Dependent
+ \item \textbf{Home Management}: Requires complete assistance
+\end{itemize}
+
+\textbf{Upper Extremity Function}:
+\begin{itemize}[leftmargin=*]
+ \item \textbf{Grip Strength}: Right [kg], Left [kg] (compared to normative data)
+ \item \textbf{Coordination}: [e.g., Within normal limits bilaterally]
+ \item \textbf{Sensation}: [e.g., Intact to light touch, proprioception]
+\end{itemize}
+
+\subsection*{2.4 Cognitive and Perceptual Assessment}
+
+\begin{itemize}[leftmargin=*]
+ \item \textbf{Alertness/Orientation}: [e.g., Alert, oriented x3]
+ \item \textbf{Memory}: [e.g., Intact for short and long-term]
+ \item \textbf{Safety Awareness}: [e.g., Good insight into limitations, follows precautions]
+ \item \textbf{Executive Function}: [e.g., Able to problem-solve, sequence tasks appropriately]
+ \item \textbf{Visual-Perceptual Skills}: [e.g., Within normal limits]
+\end{itemize}
+
+\subsection*{2.5 Environmental Assessment}
+
+\textbf{Home Safety Concerns}:
+\begin{itemize}[leftmargin=*]
+ \item 4 steps to enter home - needs stair training
+ \item Bedroom/bathroom upstairs - may need temporary bedroom on main floor
+ \item Shower stall (no tub) - needs shower chair, grab bars
+ \item Scatter rugs - fall hazard, recommend removal
+ \item Adequate lighting - satisfactory
+\end{itemize}
+
+% ===== SECTION 3: REHABILITATION GOALS =====
+\section*{3. Rehabilitation Goals (SMART Format)}
+
+\subsection*{3.1 Short-Term Goals (2-4 weeks)}
+
+\textbf{Impairment-Level Goals}:
+\begin{enumerate}[leftmargin=*]
+ \item \textbf{Range of Motion}: Increase right hip flexion from 70° to 90° pain-free within 2 weeks to improve functional mobility.
+
+ \item \textbf{Strength}: Improve right hip abductor strength from 2+/5 to 3+/5 within 3 weeks to reduce Trendelenburg gait.
+
+ \item \textbf{Balance}: Increase Berg Balance Scale from 38/56 to 42/56 within 4 weeks to reduce fall risk.
+\end{enumerate}
+
+\textbf{Activity-Level Goals}:
+\begin{enumerate}[leftmargin=*]
+ \item \textbf{Ambulation}: Ambulate 150 feet with front-wheeled walker, supervision level, within 3 weeks.
+
+ \item \textbf{Transfers}: Perform bed-to-chair and toilet transfers with supervision (no physical assist) within 2 weeks.
+
+ \item \textbf{Stairs}: Ascend/descend 4 stairs with handrail and supervision within 4 weeks for home access.
+
+ \item \textbf{Lower Body Dressing}: Don socks and shoes with adaptive equipment (reacher, sock aid) with minimal assist within 3 weeks.
+
+ \item \textbf{Bathing}: Shower independently using shower chair and grab bars with setup assistance within 4 weeks.
+\end{enumerate}
+
+\subsection*{3.2 Long-Term Goals (6-12 weeks)}
+
+\textbf{Participation-Level Goals}:
+\begin{enumerate}[leftmargin=*]
+ \item \textbf{Community Ambulation}: Walk independently 300+ feet with assistive device on varied terrain within 8 weeks to enable community outings.
+
+ \item \textbf{ADL Independence}: Achieve independence in all basic ADLs (bathing, dressing, toileting, transfers) within 8 weeks for safe home discharge.
+
+ \item \textbf{Home Management}: Return to light homemaking tasks (meal prep, laundry) with modified techniques within 12 weeks.
+
+ \item \textbf{Recreational Activities}: Resume gardening with adaptive techniques and equipment within 12 weeks.
+
+ \item \textbf{Fall Prevention}: Demonstrate safety awareness and fall prevention strategies for independent home functioning within 8 weeks.
+\end{enumerate}
+
+\textbf{Discharge Goals}:
+\begin{itemize}[leftmargin=*]
+ \item Safe discharge home with appropriate DME (durable medical equipment)
+ \item Independent or supervision level for all ADLs
+ \item Community ambulation with assistive device
+ \item Patient and family educated on home exercise program
+ \item Fall risk minimized with environmental modifications
+\end{itemize}
+
+\subsection*{3.3 Patient-Centered Goals}
+
+Patient's top priorities:
+\begin{enumerate}[leftmargin=*]
+ \item "I want to go home and not need help from my family"
+ \item "I want to be able to go to the grocery store again"
+ \item "I want to get back to my garden this spring"
+\end{enumerate}
+
+% ===== SECTION 4: TREATMENT INTERVENTIONS =====
+\section*{4. Treatment Interventions}
+
+\subsection*{4.1 Physical Therapy Interventions}
+
+\textbf{Frequency}: 3 sessions per week, 45-60 minutes per session, for 8-12 weeks
+
+\textbf{Therapeutic Exercise}:
+\begin{itemize}[leftmargin=*]
+ \item \textbf{Strengthening}:
+ \begin{itemize}
+ \item Hip abduction in sidelying with resistance band: 3 sets x 10 reps
+ \item Hip extension prone: 3 sets x 10 reps
+ \item Quadriceps sets and straight leg raises: 3 sets x 10 reps
+ \item Standing hip abduction at parallel bars: 2 sets x 10 reps
+ \item Step-ups (2-inch platform progressing to 6-inch): 2 sets x 10 reps
+ \item Squats (partial, with walker for support): 2 sets x 10 reps
+ \end{itemize}
+
+ \item \textbf{Range of Motion}:
+ \begin{itemize}
+ \item Active-assisted hip flexion supine: 3 sets x 10 reps
+ \item Hip flexor stretching (modified, respecting precautions): 3 x 30 sec holds
+ \item Ankle pumps and circles: 3 sets x 10 reps
+ \end{itemize}
+
+ \item \textbf{Core Stabilization}:
+ \begin{itemize}
+ \item Abdominal bracing: 10 x 10 sec holds
+ \item Pelvic tilts: 2 sets x 10 reps
+ \item Dead bug progression (modified): 2 sets x 8 reps
+ \end{itemize}
+\end{itemize}
+
+\textbf{Balance Training}:
+\begin{itemize}[leftmargin=*]
+ \item Static standing balance exercises at parallel bars
+ \item Weight shifting activities (anterior-posterior, medial-lateral)
+ \item Tandem stance progression
+ \item Single-leg stance (holding support as needed)
+ \item Reaching activities outside base of support
+ \item Step-over obstacles
+\end{itemize}
+
+\textbf{Gait Training}:
+\begin{itemize}[leftmargin=*]
+ \item Gait training with front-wheeled walker on level surfaces
+ \item Focus on step length symmetry, heel strike, push-off
+ \item Progress from contact guard to supervision to modified independence
+ \item Advance distance as tolerated (goal 300+ feet)
+ \item Outdoor gait training on varied terrain (grass, gravel, curbs)
+ \item Reduce assistive device as appropriate (walker → cane → no device)
+\end{itemize}
+
+\textbf{Stair Training}:
+\begin{itemize}[leftmargin=*]
+ \item Stair negotiation with handrail (step-to pattern initially)
+ \item 4 steps ascending/descending to match home environment
+ \item Progress to step-over-step pattern
+ \item Practice with carrying objects
+\end{itemize}
+
+\textbf{Modalities (as indicated)}:
+\begin{itemize}[leftmargin=*]
+ \item Ice after therapy sessions for pain management
+ \item Electrical stimulation for hip abductor muscle re-education (if indicated)
+ \item Ultrasound for soft tissue mobility (if indicated)
+\end{itemize}
+
+\textbf{Patient Education}:
+\begin{itemize}[leftmargin=*]
+ \item Hip precautions education and review
+ \item Fall prevention strategies
+ \item Proper use of assistive device
+ \item Pain management techniques
+ \item Activity pacing and energy conservation
+\end{itemize}
+
+\subsection*{4.2 Occupational Therapy Interventions}
+
+\textbf{Frequency}: 3 sessions per week, 45 minutes per session, for 6-8 weeks
+
+\textbf{ADL Training}:
+\begin{itemize}[leftmargin=*]
+ \item \textbf{Bathing}: Practice shower transfers with grab bars and shower chair, long-handled sponge technique
+ \item \textbf{Lower Body Dressing}: Training with reacher, sock aid, elastic shoelaces, dressing stick
+ \item \textbf{Toileting}: Practice with raised toilet seat and grab bars
+ \item \textbf{Bed Mobility}: Log-roll technique, use of bed rail if needed
+ \item \textbf{Kitchen Tasks}: Safe standing tolerance, use of walker basket to carry items
+\end{itemize}
+
+\textbf{Adaptive Equipment Training}:
+\begin{itemize}[leftmargin=*]
+ \item Reacher (32-inch) for dressing, picking up objects
+ \item Sock aid and dressing stick for lower extremity dressing
+ \item Long-handled shoe horn
+ \item Long-handled sponge/bath brush
+ \item Shower chair with back
+ \item Raised toilet seat with arms
+ \item Bedside commode (if bedroom upstairs initially)
+\end{itemize}
+
+\textbf{Home Management Training}:
+\begin{itemize}[leftmargin=*]
+ \item Light meal preparation (seated when possible)
+ \item Laundry (modified techniques, avoid lifting heavy baskets)
+ \item Safe reaching and bending techniques
+ \item Organization strategies to minimize unnecessary walking
+\end{itemize}
+
+\textbf{Upper Extremity Strengthening}:
+\begin{itemize}[leftmargin=*]
+ \item Therapeutic putty for grip strength
+ \item Weighted exercises for shoulder stability (needed for walker use)
+ \item Fine motor coordination activities
+\end{itemize}
+
+\textbf{Energy Conservation and Work Simplification}:
+\begin{itemize}[leftmargin=*]
+ \item Activity pacing strategies
+ \item Prioritization of daily tasks
+ \item Use of rest breaks
+ \item Organization to reduce unnecessary steps
+\end{itemize}
+
+\subsection*{4.3 Home Exercise Program (HEP)}
+
+Patient provided with illustrated HEP to perform daily at home:
+
+\begin{longtable}{|p{4cm}|p{4cm}|p{5cm}|}
+\hline
+\textbf{Exercise} & \textbf{Dosage} & \textbf{Instructions} \\ \hline
+\endfirsthead
+\hline
+\textbf{Exercise} & \textbf{Dosage} & \textbf{Instructions} \\ \hline
+\endhead
+Ankle pumps & 3 x 10, 3x daily & Seated or lying, point toes up/down \\ \hline
+Quadriceps sets & 3 x 10, 2x daily & Tighten thigh muscle, hold 5 sec \\ \hline
+Hip abduction sidelying & 2 x 10, 1x daily & Lift top leg, hold 2 sec, lower slowly \\ \hline
+Sit-to-stand & 2 x 10, 2x daily & Use walker, stand fully, sit slowly \\ \hline
+Standing hip flexion & 2 x 10, 1x daily & Lift knee (respect 90° precaution) \\ \hline
+Balance - standing & 3 x 30 sec, 2x daily & Stand at counter, reduce hand support as able \\ \hline
+Walking & 10 min, 2-3x daily & With walker, gradually increase distance \\ \hline
+\end{longtable}
+
+\textbf{HEP Instructions}:
+\begin{itemize}[leftmargin=*]
+ \item Perform exercises on non-therapy days
+ \item Stop if pain exceeds 4/10
+ \item Maintain hip precautions at all times
+ \item Progress per therapist instruction only
+ \item Record completion in exercise log
+\end{itemize}
+
+\subsection*{4.4 Durable Medical Equipment (DME)}
+
+\textbf{Recommended Equipment}:
+\begin{itemize}[leftmargin=*]
+ \item Front-wheeled walker (standard adult)
+ \item Shower chair with back (adjustable height)
+ \item Grab bars for shower (2 bars - vertical and horizontal)
+ \item Raised toilet seat with arms
+ \item Reacher (32-inch)
+ \item Sock aid
+ \item Long-handled shoe horn
+ \item Long-handled sponge
+ \item Bedside commode (if needed initially)
+ \item Non-slip bath mat
+\end{itemize}
+
+% ===== SECTION 5: TREATMENT SCHEDULE =====
+\section*{5. Treatment Schedule and Timeline}
+
+\subsection*{Treatment Phases}
+
+\begin{tabularx}{\textwidth}{|l|l|X|}
+\hline
+\textbf{Phase} & \textbf{Duration} & \textbf{Focus} \\ \hline
+Acute/Early & Weeks 1-2 & Pain management, basic mobility, ADL training with equipment, safety \\ \hline
+Intermediate & Weeks 3-6 & Strength/ROM progression, advanced balance, stair training, ADL refinement \\ \hline
+Advanced & Weeks 7-10 & Community ambulation, IADL training, HEP independence, discharge prep \\ \hline
+Transition & Weeks 11-12 & Reduce frequency, monitor independence, finalize home setup \\ \hline
+\end{tabularx}
+
+\subsection*{Session Frequency and Duration}
+
+\begin{tabularx}{\textwidth}{|l|X|X|}
+\hline
+\textbf{Discipline} & \textbf{Frequency} & \textbf{Duration} \\ \hline
+Physical Therapy & 3x/week & 45-60 min/session, 8-12 weeks total \\ \hline
+Occupational Therapy & 3x/week & 45 min/session, 6-8 weeks total \\ \hline
+Home Exercise Program & Daily (non-therapy days) & 30 min/day \\ \hline
+\end{tabularx}
+
+\subsection*{Progress Assessments}
+
+\begin{itemize}[leftmargin=*]
+ \item \textbf{Weekly}: Informal progress monitoring, pain levels, exercise tolerance
+ \item \textbf{Biweekly}: Reassess key impairments (ROM, strength, balance measures)
+ \item \textbf{Week 4}: Formal reassessment, FIM score, goal progress review, plan modification if needed
+ \item \textbf{Week 8}: Comprehensive reassessment, discharge planning, final goal review
+ \item \textbf{Discharge}: Final outcomes documentation, HEP review, follow-up recommendations
+\end{itemize}
+
+% ===== SECTION 6: OUTCOME MEASURES =====
+\section*{6. Outcome Measures and Monitoring}
+
+\subsection*{Standardized Assessments}
+
+\begin{longtable}{|p{4.5cm}|p{3cm}|p{3cm}|p{3cm}|}
+\hline
+\textbf{Measure} & \textbf{Baseline} & \textbf{Goal} & \textbf{Frequency} \\ \hline
+\endfirsthead
+\hline
+\textbf{Measure} & \textbf{Baseline} & \textbf{Goal} & \textbf{Frequency} \\ \hline
+\endhead
+FIM Score & [125/126] & [142/126] & Week 0, 4, 8, discharge \\ \hline
+Berg Balance Scale & [38/56] & [$>$45/56] & Week 0, 4, 8, discharge \\ \hline
+6-Minute Walk Test & [150 feet] & [$>$300 feet] & Week 0, 4, 8, discharge \\ \hline
+Gait Speed & [0.4 m/s] & [$>$0.8 m/s] & Week 0, 4, 8, discharge \\ \hline
+Pain (NRS 0-10) & [6/10 with activity] & [$<$3/10] & Each session \\ \hline
+ROM - Hip Flexion & [70°] & [110°] & Biweekly \\ \hline
+Strength - Hip Abductors & [2+/5] & [4/5] & Biweekly \\ \hline
+\end{longtable}
+
+\subsection*{Progress Indicators}
+
+\textbf{Positive Progress}:
+\begin{itemize}[leftmargin=*]
+ \item Increasing ambulation distance
+ \item Reduced level of assistance for ADLs
+ \item Improved balance scores
+ \item Decreased pain with activity
+ \item Increased strength/ROM measurements
+ \item Patient confidence and self-efficacy improving
+\end{itemize}
+
+\textbf{Barriers to Progress}:
+\begin{itemize}[leftmargin=*]
+ \item Inadequate pain control
+ \item Poor therapy attendance or compliance
+ \item Medical complications or setbacks
+ \item Psychosocial factors (depression, anxiety, lack of support)
+ \item Cognitive impairment affecting learning
+\end{itemize}
+
+% ===== SECTION 7: EXPECTED OUTCOMES =====
+\section*{7. Expected Outcomes and Prognosis}
+
+\subsection*{Rehabilitation Potential}
+
+\textbf{Overall Prognosis}: [e.g., Good] - Patient is motivated, has good social support, no significant cognitive impairment, and appropriate medical management.
+
+\textbf{Expected Functional Outcome}:
+\begin{itemize}[leftmargin=*]
+ \item Independent or supervision level for all basic ADLs
+ \item Community ambulation with assistive device (walker or cane)
+ \item Ability to negotiate stairs for home access
+ \item Safe discharge home with DME and environmental modifications
+ \item Return to modified IADL participation
+\end{itemize}
+
+\subsection*{Timeline for Key Milestones}
+
+\begin{itemize}[leftmargin=*]
+ \item \textbf{Week 2}: Transfers with supervision, basic ADLs with minimal assist
+ \item \textbf{Week 4}: Ambulation 150 feet with walker/supervision, improved pain control
+ \item \textbf{Week 6}: Stairs with handrail/supervision, ADLs mostly independent with equipment
+ \item \textbf{Week 8}: Community ambulation 300+ feet, all ADLs independent, ready for discharge
+\end{itemize}
+
+% ===== SECTION 8: FOLLOW-UP AND DISCHARGE PLANNING =====
+\section*{8. Follow-Up and Discharge Planning}
+
+\subsection*{Discharge Criteria}
+
+Patient ready for discharge when:
+\begin{itemize}[leftmargin=*]
+ \item Safe for home environment (with or without DME)
+ \item Independent or supervision level for ADLs
+ \item Patient/caregiver educated on HEP and safety
+ \item DME obtained and home modifications completed
+ \item Functional goals achieved or plateau reached
+\end{itemize}
+
+\subsection*{Discharge Recommendations}
+
+\begin{itemize}[leftmargin=*]
+ \item Continue HEP as prescribed, progress as tolerated
+ \item Follow up with orthopedic surgeon at [timeframe]
+ \item Consider outpatient therapy if continued progress expected
+ \item Home health PT/OT if unable to access outpatient services
+ \item Transition to community exercise program (e.g., senior center, aquatics)
+\end{itemize}
+
+\subsection*{Home Modifications and Safety}
+
+\begin{itemize}[leftmargin=*]
+ \item Install grab bars in shower (vertical and horizontal)
+ \item Ensure adequate lighting, especially on stairs
+ \item Remove scatter rugs and clutter
+ \item Consider temporary bedroom on main floor if stairs difficult
+ \item Rearrange furniture to create clear pathways
+ \item Store frequently used items at accessible heights
+\end{itemize}
+
+\subsection*{Follow-Up Communication}
+
+\begin{itemize}[leftmargin=*]
+ \item Progress reports sent to referring physician biweekly
+ \item Final discharge summary to all providers
+ \item Home safety assessment completed
+ \item DME delivered and training completed
+ \item Emergency contact: Therapy department [phone]
+\end{itemize}
+
+% ===== SECTION 9: SAFETY AND PRECAUTIONS =====
+\section*{9. Safety Considerations and Precautions}
+
+\subsection*{Medical Precautions}
+
+\begin{itemize}[leftmargin=*]
+ \item \textbf{Hip Precautions} (post-ORIF):
+ \begin{itemize}
+ \item No hip flexion $>$90 degrees for 6-8 weeks
+ \item No hip adduction past midline
+ \item No internal rotation
+ \item Sleep with abduction pillow
+ \item Use elevated toilet seat and shower chair
+ \end{itemize}
+
+ \item \textbf{Weight-Bearing Status}: [e.g., WBAT - Weight-bearing as tolerated]
+
+ \item \textbf{Anticoagulation}: On enoxaparin - use fall precautions, report bruising/bleeding
+
+ \item \textbf{Pain Management}: Opioid use may cause drowsiness - schedule therapy before pain medication if possible
+\end{itemize}
+
+\subsection*{Fall Risk Management}
+
+\textbf{Fall Risk Factors}:
+\begin{itemize}[leftmargin=*]
+ \item Recent surgery/hospitalization
+ \item Impaired balance (Berg 38/56)
+ \item Use of walker
+ \item Pain medication (opioids)
+ \item Environmental hazards at home
+\end{itemize}
+
+\textbf{Fall Prevention Strategies}:
+\begin{itemize}[leftmargin=*]
+ \item Consistent use of walker
+ \item Non-slip footwear with closed heel
+ \item Call for assistance for transfers initially
+ \item Adequate lighting
+ \item Avoid carrying items while walking (use walker basket)
+ \item Balance training in therapy
+ \item Home safety modifications
+\end{itemize}
+
+\subsection*{Contraindications to Treatment}
+
+Hold or modify therapy if:
+\begin{itemize}[leftmargin=*]
+ \item Fever $>$101°F or signs of infection
+ \item Uncontrolled pain ($>$7/10)
+ \item Excessive swelling, warmth, redness at surgical site
+ \item Chest pain, severe shortness of breath
+ \item Dizziness, lightheadedness, abnormal vital signs
+ \item Patient refusal or excessive fatigue
+\end{itemize}
+
+\subsection*{Emergency Procedures}
+
+\begin{itemize}[leftmargin=*]
+ \item \textbf{Fall During Therapy}: Assess for injury, vital signs, notify physician, incident report
+ \item \textbf{Chest Pain/SOB}: Stop activity, call 911, notify physician
+ \item \textbf{Excessive Pain}: Stop activity, apply ice, notify physician, reassess treatment plan
+\end{itemize}
+
+% ===== SECTION 10: PROVIDER SIGNATURE =====
+\vspace{2em}
+
+\section*{10. Rehabilitation Team Signatures}
+
+\textbf{Physical Therapist}:\\[0.5em]
+Signature: \rule{6cm}{0.5pt} \quad Date: \rule{3cm}{0.5pt}\\
+Name/Credentials: \rule{6cm}{0.5pt}\\[1em]
+
+\textbf{Occupational Therapist}:\\[0.5em]
+Signature: \rule{6cm}{0.5pt} \quad Date: \rule{3cm}{0.5pt}\\
+Name/Credentials: \rule{6cm}{0.5pt}\\[1em]
+
+\textbf{Referring Physician Approval}:\\[0.5em]
+Signature: \rule{6cm}{0.5pt} \quad Date: \rule{3cm}{0.5pt}\\
+Name/Credentials: \rule{6cm}{0.5pt}\\
+
+\vspace{2em}
+\begin{center}
+\rule{\textwidth}{1pt}\\
+\textbf{End of Rehabilitation Treatment Plan}\\
+This document contains confidential patient information protected by HIPAA.
+\end{center}
+
+\end{document}
+
+% ========== NOTES FOR USERS ==========
+%
+% CUSTOMIZATION:
+% - Replace all bracketed placeholders with patient-specific information
+% - Adjust goals based on baseline assessment
+% - Modify exercises based on patient tolerance and precautions
+% - Update DME recommendations as needed
+%
+% COMPILATION:
+% pdflatex rehabilitation_treatment_plan.tex
+
diff --git a/scientific-skills/treatment-plans/references/goal_setting_frameworks.md b/scientific-skills/treatment-plans/references/goal_setting_frameworks.md
new file mode 100644
index 0000000..c57763e
--- /dev/null
+++ b/scientific-skills/treatment-plans/references/goal_setting_frameworks.md
@@ -0,0 +1,411 @@
+# Goal Setting Frameworks for Treatment Plans
+
+## Overview
+
+Effective treatment goals are the cornerstone of successful patient care. This reference provides comprehensive guidance on creating SMART goals, patient-centered outcome selection, and shared decision-making processes for treatment planning across all medical specialties.
+
+## SMART Goals Framework
+
+### Definition
+
+**SMART** is a mnemonic for goal criteria that ensure objectives are well-defined and achievable:
+- **S**pecific
+- **M**easurable
+- **A**chievable
+- **R**elevant
+- **T**ime-bound
+
+### 1. Specific
+
+Goals must be clear, well-defined, and unambiguous.
+
+**Components of Specificity**:
+- **What**: Exactly what will be accomplished
+- **Who**: Who is responsible (patient, provider, both)
+- **Where**: Context or setting if relevant
+- **Which**: Specific aspect of health/function addressed
+
+**Examples**:
+
+| Poor (Vague) | Good (Specific) |
+|--------------|-----------------|
+| "Feel better" | "Reduce depressive symptoms as measured by PHQ-9 score" |
+| "Improve diabetes" | "Reduce HbA1c from current 8.5% to less than 7%" |
+| "Get stronger" | "Increase right quadriceps strength from 3/5 to 4/5 on manual muscle testing" |
+| "Lose weight" | "Reduce body weight by 10 pounds (from 210 to 200 lbs)" |
+| "Exercise more" | "Walk 30 minutes, 5 days per week" |
+
+### 2. Measurable
+
+Goals must include quantifiable metrics or observable criteria to track progress.
+
+**Types of Measurement**:
+- **Quantitative**: Numbers, percentages, scores, scales
+ - Lab values: HbA1c, LDL cholesterol, eGFR
+ - Vital signs: BP, heart rate, weight
+ - Scales: Pain (0-10 NRS), PHQ-9, GAD-7, FIM
+ - Functional: Distance walked, ROM degrees, strength grades
+
+- **Qualitative Observable**: Behaviors that can be observed and verified
+ - "Patient demonstrates proper insulin injection technique"
+ - "Patient ambulates 150 feet with walker independently"
+ - "Patient follows 2-step commands"
+
+**Examples**:
+
+| Not Measurable | Measurable |
+|----------------|------------|
+| "Better blood pressure" | "Systolic BP <130 mmHg and diastolic BP <80 mmHg" |
+| "Less pain" | "Pain intensity reduced from 7/10 to ≤4/10 on numeric rating scale" |
+| "Improved mobility" | "Ambulate 300 feet with front-wheeled walker, supervision level" |
+| "Take medications regularly" | "Medication adherence >90% as measured by refill rates" |
+| "Sleep better" | "Sleep 7-8 hours nightly with <2 awakenings per night" |
+
+### 3. Achievable
+
+Goals must be realistic given patient's capabilities, resources, and circumstances.
+
+**Factors to Consider**:
+- **Patient capabilities**: Physical, cognitive, psychological capacity
+- **Severity of condition**: Advanced disease may have limited improvement potential
+- **Treatment efficacy**: What can realistically be achieved with available treatments
+- **Resources**: Access to care, medications, equipment, support
+- **Time available**: Adequate time to achieve the goal
+- **Motivation**: Patient's readiness to change and engagement
+
+**Setting Achievable Goals**:
+- Start with baseline assessment
+- Know expected treatment effects (e.g., metformin reduces HbA1c by 1-1.5%)
+- Set incremental goals for large changes (lose 5 lbs, then 10 lbs, rather than jump to 50 lbs)
+- Challenge but don't overwhelm patient
+- Adjust goals based on progress
+
+**Examples**:
+
+| Not Achievable | Achievable |
+|----------------|------------|
+| "Marathon ready in 1 month" (sedentary 70-year-old post-MI) | "Walk 1 mile continuously in 3 months" |
+| "HbA1c from 12% to <6% in 6 weeks" | "HbA1c from 12% to <9% in 3 months, <7% in 6 months" |
+| "Full knee ROM 0-140° by POD 3" (post-TKA) | "Knee ROM 0-90° by week 2, 0-110° by week 6" |
+| "Cure chronic pain" | "Reduce pain from 7/10 to 4/10 and improve function by 30%" |
+
+### 4. Relevant
+
+Goals must align with patient values, priorities, and overall treatment objectives.
+
+**Relevance Criteria**:
+- **Patient-centered**: Matters to the patient, reflects their priorities
+- **Clinically meaningful**: Achieving goal improves health or quality of life
+- **Aligned with diagnosis**: Goal addresses the condition being treated
+- **Appropriate timing**: Right goal for current phase of treatment
+- **Integrated**: Fits with other treatment goals
+
+**Assessing Relevance**:
+- Ask patient: "What's most important to you?" "What do you want to be able to do?"
+- Ensure goals address functional limitations that matter to patient
+- Connect clinical metrics to patient-meaningful outcomes (e.g., "HbA1c <7% reduces risk of vision loss")
+- Avoid provider-driven goals that don't resonate with patient
+
+**Examples**:
+
+| Less Relevant | More Relevant |
+|---------------|---------------|
+| "Reduce medication count" (when medications controlling symptoms well) | "Simplify regimen to improve adherence" (if missing doses due to complexity) |
+| "Perfect blood sugars" (patient's priority is energy) | "Improve energy levels through better glucose control" |
+| "Walk 5 miles" (patient just wants to shop independently) | "Walk through grocery store without assistance" |
+
+### 5. Time-Bound
+
+Goals must have specific deadlines or timeframes for achievement.
+
+**Timeframe Considerations**:
+- **Short-term goals**: Days to 3 months
+- **Intermediate goals**: 3-6 months
+- **Long-term goals**: 6-12 months or longer for chronic conditions
+- **Reassessment intervals**: Check progress at defined intervals
+
+**Time Elements to Include**:
+- Target date or timeframe
+- Checkpoint dates for progress review
+- Frequency of actions (e.g., "exercise 30 min, 5x/week")
+
+**Examples**:
+
+| Not Time-Bound | Time-Bound |
+|----------------|------------|
+| "Eventually lose weight" | "Lose 15 pounds within 6 months (approximately 1-2 lbs/week)" |
+| "Attend physical therapy" | "Complete 12 physical therapy sessions over 8 weeks, 1-2x weekly" |
+| "When ready, return to work" | "Return to modified duty work within 12 weeks post-surgery" |
+| "Improve depression symptoms" | "Reduce PHQ-9 score from 18 to <10 within 8 weeks of starting SSRI and CBT" |
+
+## Creating SMART Goals: Step-by-Step Process
+
+### Step 1: Assess Baseline
+- Identify current status: symptoms, lab values, functional level
+- Use standardized assessments when available
+- Document quantitative baseline
+
+### Step 2: Identify Desired Outcome
+- What needs to improve?
+- Engage patient: "What would you like to be different?"
+- Consider clinical needs and patient priorities
+
+### Step 3: Make It Specific
+- Define exact outcome
+- Eliminate vague language
+- Include all relevant details
+
+### Step 4: Add Measurement
+- How will progress be tracked?
+- What metric or observable behavior?
+- Baseline → Target value
+
+### Step 5: Reality Check (Achievable?)
+- Is this possible given patient's condition, resources, treatment effects?
+- May need to adjust expectations
+- Set incremental goals if needed
+
+### Step 6: Ensure Relevance
+- Does patient care about this goal?
+- Is it clinically meaningful?
+- Does it align with overall treatment plan?
+
+### Step 7: Set Timeline
+- When will goal be achieved?
+- When will progress be reviewed?
+- Break into short-term and long-term if needed
+
+### Step 8: Document and Communicate
+- Write goal in clear SMART format
+- Share with patient and care team
+- Ensure patient understanding
+
+## Goal Hierarchies and Levels
+
+### ICF Framework (International Classification of Functioning, Disability and Health)
+
+Useful for rehabilitation and functional goals:
+
+1. **Impairment-Level Goals**: Body structure/function
+ - Example: "Increase shoulder flexion ROM from 90° to 140°"
+
+2. **Activity-Level Goals**: Task performance
+ - Example: "Dress upper body independently"
+
+3. **Participation-Level Goals**: Life role engagement
+ - Example: "Return to work as teacher"
+
+### Medical Outcome Levels
+
+1. **Biological/Clinical Goals**: Lab values, vital signs, disease markers
+ - Example: "HbA1c <7%, BP <130/80, LDL <70 mg/dL"
+
+2. **Symptom Goals**: Patient-reported symptoms
+ - Example: "Pain ≤4/10, no dyspnea with ADLs"
+
+3. **Functional Goals**: What patient can do
+ - Example: "Walk 1 mile, climb 2 flights of stairs"
+
+4. **Quality of Life Goals**: Overall well-being
+ - Example: "Return to hobbies, improve sleep quality"
+
+## Patient-Centered Outcome Measures (PCOMs)
+
+### Definition
+Outcomes that matter most to patients, beyond traditional clinical metrics.
+
+### Common PCOMs
+
+**Patient-Reported Outcome Measures (PROMs)**:
+- SF-36 or SF-12 (general health-related quality of life)
+- PROMIS (Patient-Reported Outcomes Measurement Information System)
+- Disease-specific QoL scales (e.g., Kansas City Cardiomyopathy Questionnaire for HF)
+
+**Functional Outcomes**:
+- Activities of Daily Living (ADLs): Bathing, dressing, toileting, transferring, feeding, continence
+- Instrumental ADLs (IADLs): Shopping, cooking, housekeeping, managing finances, transportation
+- Occupational/educational functioning
+- Social functioning and relationships
+- Recreation and leisure participation
+
+**Patient Priorities**:
+- What matters most to individual patient
+- May differ from clinician priorities
+- Examples: "Play with grandchildren," "Travel to daughter's wedding," "Avoid nursing home"
+
+### Integrating PCOMs into Goals
+
+**Approach**:
+1. Ask patient about priorities early in assessment
+2. Link clinical goals to patient-meaningful outcomes
+3. Include at least some goals directly addressing patient priorities
+4. Use patient's language in documenting goals when possible
+
+**Example Integration**:
+- **Clinical goal**: "Reduce HbA1c from 8.5% to <7% in 3 months"
+- **Linked patient-centered goal**: "Improve energy levels to play with grandchildren without fatigue"
+- Both goals documented, progress on both tracked
+
+## Shared Decision-Making in Goal Setting
+
+### What is Shared Decision-Making (SDM)?
+
+Collaborative process where clinicians and patients jointly:
+- Discuss treatment options
+- Weigh risks and benefits
+- Consider patient values and preferences
+- Make decisions together
+
+### SDM in Treatment Goal Setting
+
+**Steps**:
+
+1. **Choice Awareness**: Acknowledge multiple possible goals/approaches
+ - "We could focus on aggressive HbA1c lowering vs. minimizing hypoglycemia risk. What's more important to you?"
+
+2. **Option Presentation**: Present goal options with pros/cons
+ - "Option A: Intensive BP control (<120/80) reduces stroke risk but requires more medications. Option B: Standard control (<140/90) is easier but slightly higher stroke risk."
+
+3. **Values Clarification**: Understand patient priorities
+ - "How do you feel about taking multiple medications?" "How much does avoiding injections matter to you?"
+
+4. **Preference Integration**: Incorporate preferences into goals
+ - If patient prioritizes avoiding medications → "Control BP with lifestyle changes and one medication if possible"
+
+5. **Decision**: Agree on goals together
+ - "It sounds like you'd like to try intensive lifestyle changes for 3 months before adding another medication. Let's plan for that."
+
+6. **Document**: Record shared decision-making process
+ - "Goals established through shared decision-making. Patient expressed preference for..."
+
+### Decision Aids
+
+Tools to facilitate SDM:
+- Option grids comparing approaches
+- Numerical risk/benefit data
+- Patient stories/testimonials
+- Visual aids (pictures, diagrams)
+- "What matters to you" worksheets
+
+## Special Considerations for Different Populations
+
+### Older Adults
+- Functional independence often priority over disease-specific metrics
+- Balance aggressive treatment vs. treatment burden
+- Consider life expectancy and time to benefit
+- Fall prevention, polypharmacy reduction may be key goals
+- Quality over quantity of life
+
+### Pediatric
+- Developmental stage-appropriate goals
+- Family-centered (involve parents/caregivers)
+- Growth and development milestones
+- School/social functioning
+- Transition planning (pediatric to adult care)
+
+### Chronic Disease
+- Long-term sustainable goals
+- Balance ambition with realistic expectations
+- Complication prevention
+- Quality of life maintenance
+- Adaptation and acceptance alongside improvement
+
+### Palliative/End-of-Life
+- Comfort and symptom management primary
+- Functional goals focused on valued activities
+- Psychosocial and spiritual needs
+- Caregiver support
+- Dignity and autonomy
+
+### Complex Multi-Morbidity
+- Prioritize most impactful goals
+- Coordinate goals across conditions (when treatments overlap, even better)
+- Avoid conflicting treatments
+- Minimize treatment burden
+- Realistic expectations with multiple conditions
+
+## Common Goal-Setting Pitfalls
+
+### Pitfall 1: Provider-Centric Goals
+**Problem**: Goals reflect what provider thinks is important, not patient priorities
+**Solution**: Ask patient early in visit what they hope to achieve, incorporate their language
+
+### Pitfall 2: Too Many Goals
+**Problem**: Overwhelming patient with 10+ goals
+**Solution**: Prioritize 3-5 key goals, build on success
+
+### Pitfall 3: All-or-Nothing Thinking
+**Problem**: Goal is "cure" or "perfection"
+**Solution**: Incremental goals, meaningful improvement valued
+
+### Pitfall 4: Ignoring Barriers
+**Problem**: Goals set without assessing feasibility (resources, support, access)
+**Solution**: Identify barriers during assessment, problem-solve or adjust goals
+
+### Pitfall 5: Static Goals
+**Problem**: Set goals and never revisit
+**Solution**: Regular reassessment, modify as patient progresses or circumstances change
+
+### Pitfall 6: Purely Clinical Metrics
+**Problem**: All goals are lab values, no functional or QoL goals
+**Solution**: Balance clinical markers with functional, symptom, and QoL outcomes
+
+### Pitfall 7: No Patient Buy-In
+**Problem**: Patient doesn't believe goal is achievable or important
+**Solution**: Shared decision-making, motivational interviewing to explore ambivalence
+
+## Examples of SMART Goals by Condition
+
+### Diabetes
+**Short-term**: "Reduce HbA1c from 8.5% to <7.5% within 3 months by initiating metformin 1000mg BID and reducing carbohydrate intake to 45-60g per meal."
+
+**Long-term**: "Maintain HbA1c <7% for 6+ months, prevent microvascular complications, and improve energy levels to engage in daily walking for 30 minutes."
+
+### Heart Failure
+**Short-term**: "Achieve euvolemia (no edema, stable weight within 2 lbs) within 2 weeks through furosemide dose optimization and sodium restriction <2000mg/day."
+
+**Long-term**: "Maintain NYHA Class II functional status, prevent HF hospitalizations, and walk 1/4 mile without dyspnea within 3 months."
+
+### Depression
+**Short-term**: "Reduce PHQ-9 score from 18 to <10 within 8 weeks by starting escitalopram 10mg daily and attending weekly CBT sessions."
+
+**Long-term**: "Achieve depression remission (PHQ-9 <5), return to work full-time, and re-engage in social activities with friends 2-3x/week within 4 months."
+
+### Post-Stroke Rehabilitation
+**Short-term**: "Increase right arm strength from 2/5 to 3+/5 and improve Functional Independence Measure (FIM) score from 85 to 100 within 4 weeks through PT/OT 5x/week."
+
+**Long-term**: "Achieve independence in all ADLs, ambulate 500 feet with cane on level surfaces, and return home (not nursing facility) within 3 months."
+
+### Chronic Low Back Pain
+**Short-term**: "Reduce pain intensity from 7/10 to 4/10 and increase walking tolerance from 10 minutes to 30 minutes within 6 weeks using multimodal analgesia (SNRI, NSAID, PT)."
+
+**Long-term**: "Return to modified duty work within 3 months, engage in hobbies (fishing, gardening with adaptations), and reduce pain interference on daily life by 50% (Brief Pain Inventory)."
+
+### Hypertension
+**Short-term**: "Reduce blood pressure from 152/94 to <140/90 mmHg within 4 weeks by initiating lisinopril 10mg daily and reducing sodium intake to <2300mg/day."
+
+**Long-term**: "Achieve and maintain BP <130/80 mmHg, reduce ASCVD 10-year risk from 15% to <10%, and prevent cardiovascular events."
+
+## Tools and Resources
+
+### Goal-Setting Templates
+- SMART goal worksheet (fill-in-the-blank format)
+- Goal-tracking sheets for patients
+- Motivational interviewing "change talk" to elicit goals
+
+### Assessment Tools
+- Goal Attainment Scaling (GAS): Personalized outcome measure
+- Canadian Occupational Performance Measure (COPM): Patient-identified functional goals
+- Patient-Reported Outcomes Measurement Information System (PROMIS)
+
+### Patient Education
+- "Setting Health Goals" handouts
+- Goal visualization exercises
+- Tracking apps and logs
+
+---
+
+**Document Version**: 1.0
+**Last Updated**: January 2025
+**Next Review**: January 2026
+
diff --git a/scientific-skills/treatment-plans/references/intervention_guidelines.md b/scientific-skills/treatment-plans/references/intervention_guidelines.md
new file mode 100644
index 0000000..2c29a7d
--- /dev/null
+++ b/scientific-skills/treatment-plans/references/intervention_guidelines.md
@@ -0,0 +1,507 @@
+# Evidence-Based Intervention Guidelines
+
+## Overview
+
+This reference provides comprehensive guidance on selecting, implementing, and documenting evidence-based interventions across pharmacological, non-pharmacological, and procedural treatment modalities. These guidelines support treatment plan development with current best practices and clinical recommendations.
+
+## Evidence Hierarchy
+
+### Levels of Evidence
+
+**Level I: Highest Quality**
+- Systematic reviews and meta-analyses of randomized controlled trials (RCTs)
+- Large multi-center RCTs
+
+**Level II: High Quality**
+- Individual RCTs
+- Systematic reviews of observational studies
+
+**Level III: Moderate Quality**
+- Cohort studies
+- Case-control studies
+- Well-designed observational studies
+
+**Level IV: Lower Quality**
+- Case series
+- Case reports
+- Expert opinion
+
+**Recommendation Strength**:
+- **Grade A**: Strong recommendation, high-quality evidence
+- **Grade B**: Moderate recommendation, moderate-quality evidence
+- **Grade C**: Weak recommendation, low-quality evidence
+- **Grade D**: Recommendation against (evidence of harm or no benefit)
+
+## Pharmacological Interventions
+
+### Medication Selection Principles
+
+#### 1. Evidence-Based Prescribing
+- Use medications with proven efficacy for indication
+- Follow clinical practice guidelines
+- Consider comparative effectiveness data
+- Prefer medications with better safety profiles when equivalent efficacy
+
+#### 2. Patient-Specific Factors
+- Comorbidities and contraindications
+- Organ function (renal, hepatic)
+- Drug allergies and intolerances
+- Concurrent medications (drug interactions)
+- Age, pregnancy status
+- Genetic factors (pharmacogenomics when available)
+- Cost and insurance coverage
+
+#### 3. Medication Safety
+- Start low, go slow (especially in elderly, multiple comorbidities)
+- Titrate to target dose based on response and tolerance
+- Monitor for adverse effects
+- Avoid potentially inappropriate medications (Beers Criteria for elderly)
+- Polypharmacy reduction when possible
+
+### Common Medication Classes by Indication
+
+#### Hypertension
+
+**First-Line Agents** (per JNC-8, ACC/AHA guidelines):
+- **ACE Inhibitors** (lisinopril, enalapril): Preferred if diabetes, CKD, or heart failure
+- **ARBs** (losartan, valsartan): Alternative to ACE if intolerant
+- **Calcium Channel Blockers** (amlodipine): Particularly effective in elderly, Black patients
+- **Thiazide Diuretics** (chlorthalidone, HCTZ): Cost-effective, good CV outcomes
+
+**Dosing Strategy**:
+- Start single agent at low dose
+- Titrate to maximum tolerated dose before adding second agent
+- Combination therapy often needed (2-3 agents)
+- Monitor BP response, adjust every 2-4 weeks
+
+#### Type 2 Diabetes Mellitus
+
+**First-Line** (ADA Standards of Care):
+- **Metformin**: First-line for all patients unless contraindicated (eGFR <30)
+ - Start 500-850mg daily or BID, titrate to 2000mg total daily
+
+**Second-Line** (individualize based on comorbidities):
+- **SGLT2 Inhibitors** (empagliflozin, dapagliflozin): If heart failure or CKD (strong cardio-renal benefits)
+- **GLP-1 Receptor Agonists** (semaglutide, dulaglutide): If ASCVD or high risk, weight loss needed
+- **DPP-4 Inhibitors** (sitagliptin): If low hypoglycemia risk desired
+- **Sulfonylureas** (glipizide): Cost-effective but hypoglycemia risk
+- **Insulin**: If HbA1c very elevated ($>$10%) or symptoms of hyperglycemia
+
+#### Depression
+
+**First-Line SSRIs** (APA guidelines):
+- Sertraline, escitalopram, fluoxetine, citalopram, paroxetine
+- Start low (e.g., sertraline 50mg, escitalopram 10mg)
+- Titrate after 2-4 weeks if partial response
+- Full trial: 6-8 weeks at therapeutic dose
+- Continue 6-12 months after remission (longer if recurrent)
+
+**Second-Line**:
+- **SNRIs** (venlafaxine, duloxetine): Especially if chronic pain comorbidity
+- **Bupropion**: If sexual dysfunction concern, smoking cessation
+- **Mirtazapine**: If insomnia/appetite stimulation needed
+
+**Augmentation** (if partial response):
+- Second antidepressant from different class
+- Atypical antipsychotic (aripiprazole, quetiapine) - FDA-approved augmentation
+- Lithium, thyroid hormone (triiodothyronine)
+
+#### Chronic Pain
+
+**Multimodal Analgesia** (WHO Pain Ladder, CDC Opioid Guidelines):
+
+**Non-Opioid Analgesics**:
+- **Acetaminophen**: 3-4g/day divided, safe if liver function normal
+- **NSAIDs**: Ibuprofen, naproxen, meloxicam - short-term or chronic with GI protection
+ - Monitor: Renal function, BP, GI bleeding risk
+
+**Adjuvant Analgesics for Neuropathic Pain**:
+- **Gabapentin**: 300mg titrated to 1800-3600mg/day divided TID
+- **Pregabalin**: 75mg BID titrated to 150-300mg BID (better bioavailability than gabapentin)
+- **SNRIs** (duloxetine): 60mg daily for diabetic neuropathy, chronic MSK pain
+- **TCAs** (amitriptyline, nortriptyline): Low-dose (10-75mg QHS) - second-line due to side effects
+
+**Topical Agents**:
+- Lidocaine patches 5%, diclofenac gel, capsaicin cream
+- Local effect, minimal systemic absorption
+
+**Opioids** (CDC guidelines - use cautiously):
+- Only after non-opioid multimodal therapies inadequate
+- Lowest effective dose, short-acting preferred initially
+- Avoid $>$90 MME/day if possible
+- UDS, PDMP monitoring, naloxone co-prescription
+- Reassess frequently, taper if not meeting functional goals
+
+#### Heart Failure with Reduced Ejection Fraction (HFrEF)
+
+**Guideline-Directed Medical Therapy (GDMT)** - "Foundational Four":
+
+1. **ACE Inhibitor or ARB or ARNI**
+ - ACE: Lisinopril 20-40mg daily, enalapril 10-20mg BID
+ - ARNI (Sacubitril/Valsartan): 24/26mg BID → 97/103mg BID (superior to ACE/ARB)
+ - Monitor: BP, renal function, potassium
+
+2. **Beta-Blocker**
+ - Carvedilol 3.125-6.25mg BID → 25mg BID (target)
+ - Metoprolol succinate 12.5-25mg daily → 200mg daily
+ - Bisoprolol 1.25mg → 10mg daily
+ - Titrate slowly, monitor HR, BP
+
+3. **Mineralocorticoid Receptor Antagonist (MRA)**
+ - Spironolactone 12.5-25mg daily (up to 50mg)
+ - Eplerenone 25mg daily → 50mg daily
+ - Monitor: Potassium, renal function (risk hyperkalemia)
+
+4. **SGLT2 Inhibitor**
+ - Dapagliflozin 10mg daily or empagliflozin 10mg daily
+ - Reduces HF hospitalizations and mortality
+ - Also beneficial for diabetes and CKD
+
+**Additional Therapies**:
+- Loop diuretic (furosemide) for volume management (not mortality benefit)
+- Hydralazine-isosorbide dinitrate (if African American or intolerant to ACE/ARB)
+- Ivabradine (if EF $\leq$35%, HR $>$70 on max beta-blocker)
+- Digoxin (symptomatic benefit, reduce hospitalizations)
+
+### Medication Documentation Best Practices
+
+**Include in Treatment Plan**:
+- Generic name (brand name optional)
+- Dose, route, frequency
+- Indication/rationale
+- Titration plan if applicable
+- Expected timeline for benefit
+- Key side effects to monitor
+- Drug interactions
+- When to adjust or discontinue
+
+**Example**: "Lisinopril 10mg PO daily - ACE inhibitor for hypertension and renal protection in diabetes. Titrate to 20mg in 2-4 weeks if BP not at goal and tolerating (monitor for cough, hyperkalemia). Target BP <130/80."
+
+## Non-Pharmacological Interventions
+
+### Lifestyle Modifications
+
+#### Diet and Nutrition
+
+**Mediterranean Diet** (Evidence: multiple RCTs, PREDIMED trial):
+- **Indications**: Cardiovascular disease prevention, diabetes management
+- **Components**:
+ - High intake: Fruits, vegetables, whole grains, legumes, nuts, olive oil
+ - Moderate: Fish, poultry
+ - Low: Red meat, sweets
+- **Evidence**: Reduces cardiovascular events by 30%, improves glucose control
+- **Implementation**: Dietitian referral for medical nutrition therapy
+
+**DASH Diet** (Dietary Approaches to Stop Hypertension):
+- **Indication**: Hypertension
+- **Components**: High fruits/vegetables, low-fat dairy, reduced sodium (<2300mg, ideally <1500mg)
+- **Evidence**: Reduces SBP by 8-14 mmHg
+- **Implementation**: DASH eating plan education, sodium tracking
+
+**Carbohydrate Counting** (for Diabetes):
+- Consistent carbohydrate intake: 45-60g per meal
+- Enables insulin dosing adjustment
+- Prevents glycemic variability
+- Dietitian teaches carb counting skills
+
+**Weight Management**:
+- Caloric deficit: 500-750 kcal/day for 1-2 lb/week weight loss
+- Behavior change strategies: Self-monitoring, stimulus control, goal-setting
+- Structured programs (Weight Watchers, MOVE!, etc.) more effective than self-directed
+- Pharmacotherapy (GLP-1 agonists, orlistat) or bariatric surgery for BMI $\geq$30-35 with comorbidities
+
+#### Physical Activity and Exercise
+
+**Aerobic Exercise**:
+- **Recommendation**: 150 min/week moderate intensity OR 75 min/week vigorous
+- **Moderate**: Brisk walking, cycling, swimming - can talk but not sing
+- **Vigorous**: Running, fast cycling - can say few words before pause
+- **Benefits**: Cardiovascular health, glucose control, weight management, mood
+- **Implementation**: Start with 10 min sessions, gradually increase
+
+**Resistance Training**:
+- **Recommendation**: 2-3 sessions/week, all major muscle groups
+- **Benefits**: Muscle strength, bone density, metabolic rate, glucose control
+- **Implementation**: Bodyweight exercises, resistance bands, free weights, machines
+
+**Balance and Flexibility**:
+- Important for fall prevention in elderly
+- Yoga, tai chi
+- Stretching routines
+
+**Exercise Prescription**:
+- FITT principle: **F**requency, **I**ntensity, **T**ime, **T**ype
+- Individualize based on fitness level, comorbidities, goals
+- Cardiac clearance if indicated (using ACSM or ACC/AHA guidelines)
+
+**Example**: "Aerobic exercise: Walk 30 minutes, 5 days/week at moderate intensity (target HR 50-70% max). Resistance training: Upper and lower body exercises 2x/week, 2 sets of 10-12 reps."
+
+#### Smoking Cessation
+
+**Evidence**: Strongest intervention for COPD, cardiovascular disease, cancer prevention
+
+**5 A's Approach**:
+1. **Ask**: Screen all patients for tobacco use
+2. **Advise**: Urge all tobacco users to quit
+3. **Assess**: Willingness to make quit attempt
+4. **Assist**: Aid in quitting (counseling + medication)
+5. **Arrange**: Follow-up contact
+
+**Pharmacotherapy** (doubles quit rates):
+- **Nicotine Replacement**: Patch, gum, lozenge - OTC, safe
+- **Varenicline**: Most effective (Chantix), start 1 week before quit date
+- **Bupropion**: Alternative, also treats depression
+- **Combination**: NRT + varenicline/bupropion more effective
+
+**Counseling**:
+- Quitline: 1-800-QUIT-NOW
+- Individual or group counseling
+- Cognitive-behavioral techniques
+
+**Implementation**: Set quit date within 30 days, prescribe pharmacotherapy + counseling referral, follow up within 1 week of quit date.
+
+#### Sleep Hygiene
+
+**Indications**: Insomnia, poor sleep quality
+
+**Components**:
+- Consistent sleep-wake schedule (same bedtime/wake time)
+- Bedroom: Dark, quiet, cool (60-67°F)
+- Avoid: Caffeine after 2 PM, alcohol, large meals before bed
+- Screen time: Stop 1 hour before bed
+- Wind-down routine: Reading, bath, relaxation
+- Use bed only for sleep (not TV, work)
+- If can't sleep after 20 min, get up and do quiet activity
+
+**Evidence**: Effective for chronic insomnia, often combined with CBT for insomnia (CBT-I)
+
+#### Stress Management
+
+**Techniques**:
+- **Mindfulness meditation**: 10-20 min daily, reduces anxiety, depression
+- **Progressive muscle relaxation**: Systematic tensing and relaxing muscle groups
+- **Deep breathing**: Diaphragmatic breathing, 4-7-8 technique
+- **Yoga, tai chi**: Mind-body practices
+- **Cognitive restructuring**: Challenge stress-inducing thoughts
+
+**Evidence**: Reduces stress hormones, improves mood, pain perception
+
+### Behavioral Interventions
+
+#### Cognitive Behavioral Therapy (CBT)
+
+**Indications**: Depression, anxiety, insomnia, chronic pain, substance use
+
+**Core Components**:
+- Psychoeducation
+- Cognitive restructuring (identify and challenge distorted thoughts)
+- Behavioral activation (increase rewarding activities)
+- Problem-solving skills
+- Relapse prevention
+
+**Evidence**: Equivalent to antidepressants for mild-moderate depression, first-line for anxiety, insomnia
+
+**Implementation**: 12-16 weekly 50-min sessions with trained therapist, homework between sessions
+
+**Variants**:
+- **CBT-I** (insomnia): Sleep restriction, stimulus control, cognitive therapy for sleep
+- **CBT-CP** (chronic pain): Pain education, activity pacing, cognitive restructuring of pain catastrophizing
+
+#### Motivational Interviewing (MI)
+
+**Indication**: Ambivalence about behavior change (diet, exercise, substance use, medication adherence)
+
+**Principles**:
+- Express empathy
+- Develop discrepancy (between current behavior and goals/values)
+- Roll with resistance (don't argue)
+- Support self-efficacy
+
+**Techniques**:
+- Open-ended questions
+- Affirmations
+- Reflective listening
+- Summarizing
+- Elicit "change talk"
+
+**Evidence**: Effective for initiating behavior change in multiple domains
+
+### Patient Education and Self-Management
+
+**Components**:
+- Disease education (pathophysiology, natural history, treatment)
+- Self-monitoring skills (blood glucose, BP, weight, symptoms)
+- Medication management (purpose, dosing, side effects)
+- Symptom recognition and action plans
+- Lifestyle modification skills
+- Problem-solving
+- When to seek care
+
+**Evidence**: Self-management education improves outcomes in diabetes, asthma, heart failure, chronic pain
+
+**Delivery**:
+- Individual education by clinician or educator
+- Structured programs (DSMES for diabetes, cardiac rehab for heart disease)
+- Group classes
+- Written materials, videos, apps
+
+## Procedural and Interventional Therapies
+
+### Rehabilitation Therapies
+
+#### Physical Therapy
+
+**Indications**: Musculoskeletal injuries, post-surgical rehabilitation, balance/gait disorders, chronic pain
+
+**Interventions**:
+- Therapeutic exercise: Strengthening, stretching, endurance
+- Manual therapy: Soft tissue mobilization, joint mobilization
+- Gait and balance training
+- Modalities: Heat, ice, ultrasound, electrical stimulation, TENS
+- Functional training: ADL retraining, body mechanics
+
+**Evidence**: Strong evidence for specific conditions (e.g., PT for knee OA reduces pain and improves function equivalent to NSAIDs)
+
+**Prescription**: Frequency (e.g., 2-3x/week), duration (e.g., 4-8 weeks), specific interventions/goals
+
+#### Occupational Therapy
+
+**Indications**: ADL limitations, upper extremity dysfunction, cognitive-perceptual deficits, work-related injuries
+
+**Interventions**:
+- ADL/IADL training
+- Adaptive equipment and environmental modifications
+- Upper extremity strengthening and coordination
+- Energy conservation techniques
+- Cognitive rehabilitation
+- Work hardening/conditioning
+
+**Evidence**: Improves independence post-stroke, post-injury, with chronic conditions
+
+#### Speech-Language Pathology
+
+**Indications**: Dysphagia, aphasia, dysarthria, cognitive-communication disorders
+
+**Interventions**:
+- Swallow therapy and diet modifications
+- Language therapy (aphasia)
+- Articulation therapy
+- Cognitive-linguistic therapy
+- Augmentative and alternative communication (AAC)
+
+### Interventional Pain Procedures
+
+#### Epidural Steroid Injections (ESI)
+
+**Indication**: Radicular pain from disc herniation or spinal stenosis
+
+**Evidence**: Moderate-quality evidence for short-term pain relief (3-6 weeks to 3 months), variable long-term benefit
+
+**Approach**: Fluoroscopy-guided, transforaminal, interlaminar, or caudal
+
+**Frequency**: Up to 3-4 injections per year
+
+**Risks**: Infection, bleeding, nerve injury (rare), dural puncture
+
+#### Radiofrequency Ablation (RFA)
+
+**Indication**: Facet joint-mediated pain (after positive diagnostic medial branch blocks)
+
+**Evidence**: Good evidence for lumbar facet pain relief for 6-12 months
+
+**Procedure**: Thermal lesioning of medial branch nerves supplying facet joints
+
+**Repeatable**: Can repeat when pain returns
+
+#### Spinal Cord Stimulation (SCS)
+
+**Indication**: Refractory chronic neuropathic pain (failed back surgery syndrome, CRPS, diabetic neuropathy)
+
+**Evidence**: 50-60% achieve $\geq$50% pain relief, improves function
+
+**Procedure**: Trial lead placement (5-7 days), if successful → permanent implant
+
+**Technologies**: Traditional, high-frequency, burst stimulation, dorsal root ganglion (DRG)
+
+### Surgical Interventions
+
+**When to Refer for Surgery**:
+- Failed conservative management (adequate trial - typically 6-12 weeks minimum)
+- Progressive neurologic deficit
+- Cauda equina syndrome (emergency)
+- Severe functional limitation affecting quality of life
+- Structural pathology amenable to surgical correction
+- Patient preference after risks/benefits discussion
+
+**Shared Decision-Making**: Discuss operative vs. non-operative management, risks, benefits, expected outcomes, recovery
+
+## Integrative and Complementary Therapies
+
+### Acupuncture
+
+**Evidence**:
+- **Moderate evidence** for chronic low back pain, osteoarthritis knee pain, tension headaches, migraine
+- **Mechanism**: Unclear (endorphin release, gate control theory, placebo)
+
+**Implementation**: 8-12 sessions by licensed acupuncturist
+
+### Massage Therapy
+
+**Evidence**: Modest benefit for chronic low back pain, anxiety, cancer-related symptoms
+
+**Types**: Swedish, deep tissue, myofascial release
+
+**Implementation**: 1-2x/week, 30-60 min sessions
+
+### Yoga
+
+**Evidence**: Improves back pain, balance, flexibility, reduces stress and anxiety
+
+**Types**: Hatha (gentle), Vinyasa (flowing), Iyengar (alignment-focused)
+
+**Implementation**: Group classes or home practice, 2-3x/week
+
+### Mindfulness-Based Stress Reduction (MBSR)
+
+**Evidence**: Reduces stress, anxiety, depression, chronic pain
+
+**Program**: 8-week structured program, weekly 2.5-hour sessions, daily home practice
+
+**Components**: Meditation, body scan, mindful movement (yoga)
+
+### Chiropractic Care
+
+**Evidence**: Effective for acute and chronic low back pain, neck pain
+
+**Techniques**: Spinal manipulation, mobilization, soft tissue therapy
+
+**Safety**: Generally safe, avoid high-velocity manipulation if osteoporosis, spinal instability
+
+## Intervention Selection and Documentation
+
+### Treatment Algorithm Approach
+
+1. **Diagnosis-Specific**: Follow evidence-based guidelines for condition
+2. **Severity-Appropriate**: Mild → conservative; severe → aggressive
+3. **Stepwise Intensification**: Start with first-line, add or switch if inadequate response
+4. **Multimodal**: Combine complementary interventions (pharmacologic + non-pharmacologic)
+5. **Individualized**: Adjust for patient factors (comorbidities, preferences, resources)
+
+### Documentation Template
+
+For each intervention, document:
+- **Intervention**: Specific name/type
+- **Indication**: Why this intervention for this patient
+- **Evidence**: Guideline-based, RCT data supporting use
+- **Dose/Frequency/Duration**: Specific parameters
+- **Expected Benefit**: What should improve, by how much, when
+- **Monitoring**: How will response be assessed
+- **Risks/Side Effects**: Key concerns to monitor
+- **Alternatives Considered**: What else was considered, why not chosen
+
+---
+
+**Document Version**: 1.0
+**Last Updated**: January 2025
+**Next Review**: January 2026
+
diff --git a/scientific-skills/treatment-plans/references/regulatory_compliance.md b/scientific-skills/treatment-plans/references/regulatory_compliance.md
new file mode 100644
index 0000000..95a2172
--- /dev/null
+++ b/scientific-skills/treatment-plans/references/regulatory_compliance.md
@@ -0,0 +1,476 @@
+# Regulatory Compliance for Treatment Plans
+
+## Overview
+
+Treatment plans must comply with multiple federal and state regulations governing healthcare documentation, patient privacy, billing practices, and quality standards. This reference provides comprehensive guidance on regulatory requirements affecting treatment plan development and implementation.
+
+## HIPAA Privacy and Security
+
+### Health Insurance Portability and Accountability Act (HIPAA)
+
+**Applicable Rules**:
+- Privacy Rule (45 CFR Part 164, Subpart E)
+- Security Rule (45 CFR Part 164, Subparts A and C)
+- Breach Notification Rule (45 CFR Part 164, Subpart D)
+
+### Protected Health Information (PHI)
+
+**Definition**: Any information about health status, provision of healthcare, or payment for healthcare that can be linked to a specific individual.
+
+**18 HIPAA Identifiers** (Safe Harbor Method):
+1. Names
+2. Geographic subdivisions smaller than state (street address, city, county, ZIP code if <20,000 people)
+3. Dates (birth, admission, discharge, death) - except year
+4. Telephone numbers
+5. Fax numbers
+6. Email addresses
+7. Social Security numbers
+8. Medical record numbers
+9. Health plan beneficiary numbers
+10. Account numbers
+11. Certificate/license numbers
+12. Vehicle identifiers and serial numbers (license plate)
+13. Device identifiers and serial numbers
+14. Web URLs
+15. IP addresses
+16. Biometric identifiers (fingerprints, voice prints)
+17. Full-face photographs
+18. Any other unique identifying number, characteristic, or code
+
+### De-identification for Sharing Treatment Plans
+
+**Safe Harbor Method**: Remove all 18 identifiers listed above
+
+**Practical De-identification**:
+- **Name**: Use "Patient" or de-identified code (e.g., "PT-001")
+- **Age**: Use age range (e.g., "60-65 years") instead of exact age
+- **Dates**: Use relative timelines (e.g., "3 months ago") or month/year only
+- **Location**: State only, remove city, address, specific facility names
+- **Identifiers**: Remove MRN, account numbers, SSN
+- **Dates of Service**: Refer to "Month/Year" or "recent visit"
+
+**Example**:
+- **Before**: "John Smith, DOB 3/15/1965 (58 years old), MRN 123456, address 123 Main St, Anytown, CA 12345, seen 1/15/2025"
+- **After**: "Patient, age range 55-60 years, seen Month/Year 2025, California"
+
+### Permitted Uses and Disclosures
+
+**Without Patient Authorization**:
+- **Treatment**: Sharing PHI among healthcare providers for patient care
+- **Payment**: Disclosing PHI to obtain payment for services
+- **Healthcare Operations**: Quality improvement, training, accreditation
+
+**With Patient Authorization**:
+- Marketing
+- Research (unless IRB waiver granted)
+- Sharing with non-covered entities (e.g., patient's employer)
+- Psychotherapy notes (special protection)
+
+### Minimum Necessary Standard
+
+Use, disclose, or request only the minimum amount of PHI necessary to accomplish the purpose.
+
+**Exception**: Does NOT apply to treatment - providers may share all relevant information for patient care.
+
+### Patient Rights Under HIPAA
+
+- Right to access own medical records (within 30 days)
+- Right to request amendments to records
+- Right to accounting of disclosures
+- Right to request restrictions on uses/disclosures (provider may deny)
+- Right to confidential communications
+- Right to be notified of privacy practices (Notice of Privacy Practices)
+
+### Breach Notification
+
+**Breach**: Unauthorized acquisition, access, use, or disclosure of PHI that compromises security or privacy.
+
+**Notification Requirements**:
+- **Individual**: Notify affected individuals within 60 days
+- **HHS**: If $\geq$500 individuals affected, notify HHS and media
+- **Business Associates**: Must notify covered entity of breaches
+
+### HIPAA Violations and Penalties
+
+**Civil Penalties**: $100 to $50,000 per violation (up to $1.5 million per year for identical violations)
+
+**Criminal Penalties**: Up to $250,000 fine and 10 years imprisonment for knowing misuse with intent to sell/transfer PHI
+
+## 42 CFR Part 2 (Substance Use Disorder Records)
+
+### Applicability
+
+**Scope**: Federally assisted substance use disorder (SUD) treatment programs
+
+**More Restrictive than HIPAA**: Provides additional confidentiality protections for SUD treatment records.
+
+### Key Requirements
+
+**Patient Consent Required** for most disclosures (even for treatment, payment, operations - differs from HIPAA).
+
+**Prohibition on Re-disclosure**: Recipients of 42 CFR Part 2-protected information cannot re-disclose without patient consent.
+
+**Documentation**: Patient consent must be written, specific to the information disclosed, and include expiration date.
+
+**Exceptions** (Disclosure without consent allowed):
+- Medical emergency
+- Court order (not subpoena alone)
+- Suspected child abuse/neglect (per state law)
+- Crime on premises or against personnel
+
+### Integration with HIPAA
+
+**HIPAA Compliance**: Covered entities must comply with both HIPAA and 42 CFR Part 2 (whichever is more protective applies).
+
+**Note in Treatment Plans**: If patient has SUD and received treatment at 42 CFR Part 2 program, annotate: "Substance use information subject to 42 CFR Part 2 confidentiality protections."
+
+## 21 CFR Part 11 (Electronic Records - FDA)
+
+### Applicability
+
+**Scope**: Clinical trials, research involving FDA-regulated products, drug/device manufacturers.
+
+**Requirements for Electronic Records and Signatures**:
+- Validation of systems
+- Audit trails (who accessed, when, what changed)
+- Electronic signatures equivalent to handwritten
+- Controls to prevent unauthorized access
+
+### Treatment Plan Implications
+
+**If part of clinical trial**: Treatment plans must meet 21 CFR Part 11 requirements for electronic documentation.
+
+**Non-Research Clinical Care**: Typically NOT subject to 21 CFR Part 11 (HIPAA Security Rule applies instead).
+
+## Medicare and Medicaid (CMS) Requirements
+
+### Conditions of Participation (CoPs)
+
+**Hospitals, Skilled Nursing Facilities, Home Health Agencies** must meet CoPs to receive Medicare/Medicaid reimbursement.
+
+**Documentation Requirements**:
+- Physician orders for treatments
+- Comprehensive care plans
+- Periodic reassessment and revision
+- Interdisciplinary team involvement
+- Patient/family involvement
+
+### Meaningful Use / Promoting Interoperability
+
+**EHR Requirements** (for eligible providers to receive incentive payments):
+- Use of certified EHR technology
+- Electronic prescribing
+- Clinical decision support
+- Patient portal access to health information
+- Care plan documentation with patient goals
+
+### Documentation for Billing
+
+**Medical Necessity**: Documentation must support the medical necessity of services billed.
+
+**Elements to Document**:
+- Diagnosis (ICD-10 codes)
+- Treatments provided (CPT codes)
+- Rationale for treatments
+- Patient response to treatment
+- Plans for ongoing care
+
+**E/M Coding Support**: Treatment plans support Evaluation and Management (E/M) coding levels:
+- Low complexity: Stable chronic conditions, limited treatment options
+- Moderate complexity: Multiple conditions, moderate-risk medications/procedures
+- High complexity: Severe conditions, high-risk treatments, poor response to therapy
+
+## Quality Measure Reporting
+
+### HEDIS (Healthcare Effectiveness Data and Information Set)
+
+**Used by**: Health plans to measure quality
+
+**Treatment Plan Elements Supporting HEDIS**:
+
+**Diabetes**:
+- HbA1c testing (at least annually, quarterly if not controlled)
+- Eye exam (annual dilated retinal exam)
+- Kidney disease monitoring (urine albumin-to-creatinine ratio annually)
+- BP control (<140/90)
+
+**Cardiovascular**:
+- Statin therapy for patients with diabetes or ASCVD
+- ACE/ARB for patients with diabetes and hypertension
+- Beta-blocker for patients with prior MI or HFrEF
+
+**Preventive Care**:
+- Flu vaccine annually
+- Colorectal cancer screening
+- Breast cancer screening
+- Cervical cancer screening
+
+### MIPS (Merit-Based Incentive Payment System)
+
+**Eligible Clinicians**: Medicare Part B providers
+
+**Performance Categories**:
+1. **Quality**: Reporting on quality measures relevant to specialty
+2. **Improvement Activities**: Participation in improvement activities
+3. **Promoting Interoperability**: EHR meaningful use
+4. **Cost**: Resource use/cost of care
+
+**Treatment Plan Documentation**: Supports quality measure reporting (e.g., diabetes HbA1c control, depression screening and follow-up).
+
+### Accountable Care Organizations (ACOs)
+
+**Quality Measures**: 33+ measures across patient experience, care coordination, preventive health, at-risk populations.
+
+**Treatment Plans**: Facilitate care coordination, chronic disease management to meet ACO quality benchmarks.
+
+## Opioid Prescribing Regulations
+
+### CDC Opioid Prescribing Guidelines (2022)
+
+**Recommendations**:
+- Non-opioid therapies preferred for chronic pain
+- If opioids used: Lowest effective dose, shortest duration
+- Assess risk before starting opioids (ORT, SOAPP)
+- Prescribe naloxone for patients at increased overdose risk
+- Urine drug testing before and during opioid therapy
+- Check PDMP (Prescription Drug Monitoring Program) before prescribing
+- Avoid concurrent benzodiazepines and opioids
+- Reassess risk/benefit at each increase in dose (especially if approaching $\geq$50 MME/day)
+
+**Treatment Plan Requirements**:
+- Document indication for opioid therapy
+- Informed consent discussion (risks, benefits, alternatives)
+- Treatment agreement/opioid contract
+- Plan for monitoring (UDS frequency, PDMP checks)
+- Functional goals (not just pain scores)
+- Exit strategy/tapering plan
+
+### State Opioid Regulations
+
+**Vary by State**, common elements:
+- MME limits (e.g., 90 MME/day max without exemption)
+- Prescription limits for acute pain (e.g., 7-day supply)
+- Mandatory PDMP checks before prescribing
+- Continuing medical education (CME) requirements for prescribers
+- Co-prescription of naloxone required in some states
+
+**Prescribers must know state-specific laws**.
+
+### PDMP (Prescription Drug Monitoring Program)
+
+**Purpose**: State databases tracking controlled substance prescriptions to identify doctor shopping, overprescribing.
+
+**Requirements**: Most states require PDMP check before initial opioid prescription and periodically during treatment (e.g., every 3-6 months).
+
+**Documentation**: Note in treatment plan that PDMP was checked and findings (e.g., "PDMP reviewed, no other controlled substances from other prescribers").
+
+## State Medical Board Requirements
+
+### Scope of Practice
+
+**Prescribers**: Must operate within scope of practice defined by state law.
+- Physicians (MD/DO): Full prescriptive authority
+- Nurse Practitioners (NP): Varies by state (full practice, reduced practice, or restricted practice authority)
+- Physician Assistants (PA): Supervision requirements vary
+
+**Controlled Substances**: DEA registration required, state regulations apply.
+
+### Standard of Care
+
+**Definition**: Degree of care and skill ordinarily employed by similar practitioners under similar circumstances.
+
+**Deviations from Standard**: Must be documented with rationale (e.g., patient-specific factors, shared decision-making, evidence supporting alternative approach).
+
+### Informed Consent Documentation
+
+**Required for**: Procedures, surgeries, medications with significant risks, research.
+
+**Elements to Document**:
+- Nature of condition and proposed treatment
+- Risks and benefits
+- Alternatives
+- Likely outcome if no treatment
+- Patient questions answered
+- Patient capacity to consent
+- Voluntary consent
+
+**In Treatment Plans**: Note informed consent discussion occurred, especially for high-risk treatments (e.g., opioids, chemotherapy, surgery).
+
+### Documentation Retention
+
+**Medical Records**: State laws vary (typically 7-10 years from last encounter; longer for minors - often until age of majority + statute of limitations).
+
+**Electronic Records**: Same retention requirements as paper.
+
+## Accreditation Standards
+
+### The Joint Commission
+
+**Applicable to**: Hospitals, ambulatory care, behavioral health, long-term care, laboratories.
+
+**Standards Relevant to Treatment Plans**:
+
+**Patient-Centered Care (PC)**:
+- Individualized care planning
+- Patient and family involvement
+- Cultural and language needs addressed
+- Patient preferences incorporated
+
+**Care Coordination (CC)**:
+- Comprehensive assessment
+- Care plan addresses all identified needs
+- Interdisciplinary coordination
+- Transitions of care managed
+
+**Medication Management (MM)**:
+- Medication reconciliation at transitions
+- High-risk medication monitoring (anticoagulants, opioids, insulin)
+- Patient education on medications
+
+**National Patient Safety Goals (NPSG)**:
+- Accurate patient identification
+- Effective communication among caregivers
+- Safe medication use
+- Reduce healthcare-associated infections
+- Prevent falls
+
+### CARF (Commission on Accreditation of Rehabilitation Facilities)
+
+**Applicable to**: Rehabilitation, behavioral health, employment services.
+
+**Standards for Treatment Plans**:
+- Comprehensive assessment drives plan
+- Individualized goals
+- Measurable, time-specific objectives
+- Regular team review and updates
+- Person-centered (patient directs goals)
+- Transition and discharge planning
+- Outcomes measurement
+
+## Billing and Reimbursement Compliance
+
+### Coding Accuracy
+
+**ICD-10-CM Diagnosis Codes**:
+- Code to highest level of specificity
+- Code all documented conditions affecting care during encounter
+- Primary diagnosis is reason for visit
+- Uncertain diagnoses coded as symptoms (outpatient); can code "probable" if inpatient
+
+**CPT Procedure Codes**:
+- Specific codes for services provided
+- Modifiers when appropriate
+- Unbundling prohibited (billing separately for bundled services)
+
+### Documentation Supports Billing
+
+**Medical Necessity**: Treatment must be medically appropriate for diagnosis, meet standard of care, expected to improve condition.
+
+**Treatment Plan Link**: Plan documents rationale for tests, treatments, referrals → supports medical necessity.
+
+**Avoid**:
+- Upcoding (billing higher level service than provided)
+- Duplicate billing
+- Billing for services not rendered
+
+**Anti-Kickback Statute**: Prohibits offering, paying, soliciting, or receiving remuneration for patient referrals for services reimbursed by federal healthcare programs.
+
+**Stark Law**: Prohibits physician self-referral for designated health services (DHS) covered by Medicare/Medicaid.
+
+## Clinical Research and Trials
+
+### Informed Consent (21 CFR Part 50)
+
+**Required Elements**:
+- Research procedures described
+- Risks and discomforts
+- Potential benefits
+- Alternative treatments
+- Confidentiality protections
+- Voluntary participation, can withdraw
+- Contact information for questions/problems
+
+**Documentation**: Signed consent form, copy given to participant.
+
+### IRB Review (21 CFR Part 56)
+
+**Institutional Review Board** reviews and approves research involving human subjects.
+
+**Treatment Plans in Research**: If part of clinical trial protocol, must be approved by IRB, follow protocol exactly, documented per 21 CFR Part 11.
+
+### Good Clinical Practice (ICH-GCP)
+
+**International Standard** for ethical and scientific quality in clinical trials.
+
+**Relevant to Treatment Plans**: Detailed protocol adherence, documentation of interventions, adverse event reporting.
+
+## Mental Health Specific Regulations
+
+### Duty to Warn/Protect
+
+**Tarasoff Rule** (varies by state): If patient poses credible threat to identifiable person, provider must:
+- Warn intended victim
+- Notify police
+- Take steps to protect
+
+**Documentation**: Document threat assessment, steps taken to protect.
+
+### Involuntary Commitment
+
+**Criteria** (vary by state): Typically requires patient to be:
+- Mentally ill, AND
+- Danger to self or others OR gravely disabled
+
+**Due Process**: Emergency hold (24-72 hours), followed by court hearing for longer commitment.
+
+**Documentation**: Clear documentation of dangerousness, efforts at least restrictive intervention.
+
+### Parity Laws
+
+**Mental Health Parity and Addiction Equity Act (MHPAEA)**: Health plans must provide mental health/substance use disorder benefits comparable to medical/surgical benefits.
+
+**Implications**: Cannot limit therapy visits or impose higher copays for mental health vs. medical care.
+
+## Compliance Best Practices
+
+### 1. Know Applicable Regulations
+- Federal (HIPAA, 42 CFR Part 2, CDC guidelines, CMS CoPs)
+- State (medical practice act, opioid laws, consent requirements)
+- Accreditation (Joint Commission, CARF if applicable)
+
+### 2. Document Thoroughly
+- Complete all required elements
+- Clear rationale for clinical decisions
+- Informed consent discussions
+- Regulatory compliance (PDMP checks, etc.)
+
+### 3. Privacy Protection
+- De-identify before sharing outside treatment team
+- Minimum necessary principle
+- Secure storage and transmission of records
+
+### 4. Quality Measure Integration
+- Include elements that support quality reporting (preventive care, chronic disease metrics)
+- Structured data enables measure extraction
+
+### 5. Regular Training
+- HIPAA training annually for all staff
+- Updates on regulation changes
+- Specialty-specific compliance (opioid prescribing, mental health)
+
+### 6. Audit and Monitor
+- Internal audits for documentation compliance
+- Billing compliance reviews
+- Privacy breach monitoring
+
+### 7. Policies and Procedures
+- Written policies on treatment planning, consent, privacy
+- Regularly reviewed and updated
+
+---
+
+**Document Version**: 1.0
+**Last Updated**: January 2025
+**Next Review**: January 2026
+**Note**: Regulations subject to change; verify current requirements.
+
diff --git a/scientific-skills/treatment-plans/references/specialty_specific_guidelines.md b/scientific-skills/treatment-plans/references/specialty_specific_guidelines.md
new file mode 100644
index 0000000..f13f6d1
--- /dev/null
+++ b/scientific-skills/treatment-plans/references/specialty_specific_guidelines.md
@@ -0,0 +1,655 @@
+# Specialty-Specific Treatment Plan Guidelines
+
+## Overview
+
+This reference provides detailed guidelines for developing treatment plans specific to each of the six template types: general medical, rehabilitation, mental health, chronic disease management, perioperative, and pain management. Each section includes specialty-specific considerations, clinical pearls, and best practices.
+
+## Concise Documentation Examples by Specialty
+
+### Foundation Medicine Model: Concise vs. Verbose
+
+**PRINCIPLE**: Focus on actionable information; eliminate redundancy; use bullet points and short paragraphs.
+
+### General Medical - Diabetes Example
+
+**VERBOSE (Avoid)**:
+> "Patient education was provided on the pathophysiology of Type 2 Diabetes Mellitus, including detailed explanation of insulin resistance, pancreatic beta-cell dysfunction, and the progressive nature of the disease. The patient was educated about the various potential complications of diabetes including microvascular complications such as diabetic retinopathy which can lead to blindness, diabetic nephropathy which can progress to end-stage renal disease requiring dialysis, and diabetic neuropathy which can cause pain and sensory loss. Additionally, macrovascular complications were discussed including increased risk of myocardial infarction, stroke, and peripheral arterial disease."
+
+**CONCISE (Preferred - 75% shorter)**:
+> "Key Education: Disease understanding, micro/macrovascular complication risks, self-monitoring techniques (glucose, BP), medication timing, diet basics, exercise safety, sick day management. Critical warnings: Hypoglycemia (shakiness, confusion - treat with 15g carbs), severe hyperglycemia >300 (call office), chest pain/stroke symptoms (911)."
+
+### Mental Health - Depression Example
+
+**VERBOSE (Avoid)**:
+> "The patient will participate in individual psychotherapy sessions utilizing Cognitive Behavioral Therapy techniques. Sessions will be scheduled on a weekly basis for a duration of 50 minutes each. The therapist will work with the patient to identify negative thought patterns, challenge cognitive distortions, develop behavioral activation strategies, and build coping skills for managing depressive symptoms."
+
+**CONCISE (Preferred - 60% shorter)**:
+> "CBT weekly × 16 sessions (50 min) focusing on: identifying/challenging negative thoughts, behavioral activation, coping skills development. Goals: PHQ-9 <10, return to work, 3 effective stress management strategies."
+
+### Rehabilitation - Post-Stroke Example
+
+**VERBOSE (Avoid)**:
+> "Expected outcomes include improvement in upper extremity function with anticipated achievement of the ability to perform self-care activities including bathing, dressing, and grooming with minimal assistance or independently. The patient is expected to demonstrate improved ambulation capabilities with progression from wheelchair mobility to ambulation with a rolling walker under supervision, with eventual goal of independent ambulation with a straight cane for distances up to 300 feet."
+
+**CONCISE (Preferred - 70% shorter)**:
+> "Expected outcomes (8 weeks): Independent ADLs with adaptive equipment, ambulation 300+ feet with walker/supervision, stair negotiation with handrail, safe home discharge. Timeline: Week 2 - transfers with supervision; Week 4 - ambulate 150 feet; Week 8 - community ambulation, discharge ready."
+
+### Perioperative - Laparoscopic Surgery Example
+
+**VERBOSE (Avoid)**:
+> "Postoperative pain management will utilize a multimodal approach to analgesia in order to minimize opioid consumption and reduce the risk of opioid-related adverse effects including nausea, vomiting, constipation, and respiratory depression. The multimodal regimen will include scheduled acetaminophen administered at a dose of 1000 milligrams every 6 hours, ibuprofen 600 milligrams every 6 hours as needed, and opioid analgesics reserved for breakthrough pain only."
+
+**CONCISE (Preferred - 65% shorter)**:
+> "Multimodal analgesia: Acetaminophen 1000mg Q6H scheduled, ibuprofen 600mg Q6H PRN, opioids for breakthrough only. Goal: Pain <4/10, minimize opioid use, early mobilization."
+
+### Key Principles for Concise Documentation
+
+1. **Use abbreviations appropriately**: Q6H, PRN, ADLs, BP (define on first use if uncommon)
+2. **Bullet points over paragraphs**: Easier to scan, more actionable
+3. **Combine related information**: Group similar items together
+4. **Eliminate filler words**: "The patient will...", "It is anticipated that..."
+5. **Focus on "what, when, why"**: Action, timing, rationale in minimal words
+6. **Use tables for complex data**: Medication lists, monitoring schedules
+7. **Prioritize critical information**: Safety warnings, emergency actions
+
+## 1. General Medical Treatment Plans
+
+### Applicable Conditions
+- Chronic diseases: Diabetes, hypertension, heart failure, COPD, asthma
+- Common acute conditions requiring structured follow-up
+- Primary care management of stable chronic conditions
+
+### Key Assessment Components
+
+**Baseline Status**:
+- Vital signs, BMI, functional status
+- Disease-specific metrics (HbA1c, BP, lipids, PFTs)
+- Comorbidity assessment
+- Medication reconciliation
+- Social determinants of health screening
+
+**Disease Severity Staging**:
+- Use validated staging systems when available
+- Examples: CKD stages 1-5, GOLD COPD stages I-IV, NYHA heart failure classes I-IV, ADA diabetes complications
+- Document severity to guide treatment intensity
+
+### Treatment Goal Specifics
+
+**Guideline-Based Targets**:
+- HbA1c <7% for most diabetics (<8% if elderly, limited life expectancy)
+- BP <130/80 for most; <140/90 if elderly or low cardiovascular risk
+- LDL <70 mg/dL if ASCVD, <100 mg/dL moderate risk
+- Use individualized targets based on patient factors
+
+**Functional Goals**:
+- Maintain independence in ADLs
+- Return to work if applicable
+- Engage in valued activities
+- Quality of life improvement
+
+### Pharmacotherapy Considerations
+
+**Polypharmacy Management**:
+- Consider deprescribing when possible (Beers Criteria for elderly)
+- Medication reconciliation at each visit
+- Simplify regimens (once-daily dosing, combination pills)
+- Address adherence barriers (cost, side effects, complexity)
+
+**Drug-Disease Interactions**:
+- Avoid NSAIDs if CKD, heart failure
+- Caution with metformin if eGFR <30
+- Beta-blockers contraindicated in severe COPD/asthma (use cardioselective if needed)
+
+### Monitoring Schedules by Condition
+
+**Diabetes**:
+- HbA1c every 3 months if not at goal, every 6 months if stable
+- Annual: dilated eye exam, foot exam, urine ACR, lipids
+- Each visit: BP, weight, medication adherence
+
+**Hypertension**:
+- Home BP monitoring (HBPM) - most accurate, average of multiple readings
+- Office BP at each visit
+- Labs (BMP for K+, creatinine) 1-2 weeks after ACE/ARB initiation, then annually
+
+**Heart Failure**:
+- Daily weights (report gain >2-3 lbs in 2 days)
+- BNP/NT-proBNP when clinically changing
+- Echo annually or if EF change suspected
+- Medication titration every 2 weeks during optimization phase
+
+### Primary Care Integration
+
+**Preventive Care**:
+- Include age-appropriate cancer screenings
+- Vaccination schedule (flu, pneumococcal, zoster, COVID)
+- Lifestyle counseling (tobacco, alcohol, diet, exercise)
+
+**Chronic Disease Management Models**:
+- Chronic Care Model components: Self-management support, delivery system redesign, clinical information systems, decision support
+- Team-based care: Involvement of nurses, pharmacists, dietitians, care coordinators
+
+---
+
+## 2. Rehabilitation Treatment Plans
+
+### Applicable Settings
+- Post-acute inpatient rehabilitation
+- Outpatient PT/OT/SLP
+- Home health therapy
+- Skilled nursing facility rehabilitation
+
+### Key Assessment Components
+
+**Functional Assessments (use validated tools)**:
+- **FIM** (Functional Independence Measure): 18 items, 7-point scale, 126 total - most widely used
+- **Barthel Index**: 10 ADLs, 100-point scale - simpler than FIM
+- **Berg Balance Scale**: 14 tasks, 56 points - fall risk (score <45 = high risk)
+- **6-Minute Walk Test**: Distance walked in 6 minutes - cardiopulmonary endurance
+- **Timed Up and Go (TUG)**: Time to stand, walk 3 meters, turn, return, sit - fall risk (>12 sec = high risk)
+- **9-Hole Peg Test**: Upper extremity fine motor speed
+- **ROM**: Goniometric measurement for each joint
+- **Manual Muscle Testing**: 0-5 scale (0=no contraction, 5=normal strength)
+
+**ICF Framework Goals**:
+- **Body Functions/Structures**: Impairments (ROM, strength, balance)
+- **Activity**: Task performance (walk 150 feet, dress independently)
+- **Participation**: Life roles (return to work, community engagement)
+
+### Rehabilitation Goals Specifics
+
+**Goal Levels**:
+1. **Impairment Goals**: Increase knee ROM 90→110°, improve MMT 3/5→4/5
+2. **Activity Goals**: Ambulate 300 feet with walker, transfer bed-chair independently
+3. **Participation Goals**: Return to work, resume hobbies, live independently
+
+**Assistance Levels** (document current and goal):
+- I = Independent
+- SV = Supervision (cues, no physical assist)
+- CG = Contact Guard (hands close, no assist)
+- Min A = Minimal Assist (patient does 75%+)
+- Mod A = Moderate Assist (patient does 50-74%)
+- Max A = Maximal Assist (patient does 25-49%)
+- Total A = Total Assist (patient does <25%)
+
+### Therapy Interventions
+
+**Physical Therapy**:
+- Therapeutic exercise dose: Specify sets, reps, resistance, frequency
+- Gait training: Distance, assistive device, supervision level
+- Balance training: Static, dynamic, perturbation-based
+- Modalities: Heat, ice, TENS, E-stim - adjuncts only, not primary intervention
+
+**Occupational Therapy**:
+- ADL training: Use of adaptive equipment (reacher, sock aid, built-up utensils)
+- Upper extremity strengthening: Functional tasks, fine motor activities
+- Cognitive retraining: Memory strategies, attention training, executive function
+
+**Speech-Language Pathology**:
+- Dysphagia: Diet texture modifications (IDDSI levels), swallow strategies (chin tuck, multiple swallows)
+- Aphasia therapy: Constraint-induced language therapy, semantic feature analysis
+- Dysarthria: Articulation drills, rate control, augmentative communication
+
+### Home Exercise Program (HEP)
+
+**Essentials**:
+- Illustrated handout with pictures/descriptions
+- Specific dosage (e.g., "2 sets x 10 reps, daily")
+- Progression criteria
+- Safety precautions
+- Patient/caregiver demonstrates understanding
+
+### DME and Environmental Modifications
+
+**Common DME**:
+- Ambulation: Walker, cane, crutches (specify type, e.g., front-wheeled walker)
+- Bathroom: Raised toilet seat, shower chair, grab bars
+- Dressing: Reacher, sock aid, long shoe horn, button hook, elastic laces
+- Mobility: Hospital bed, wheelchair (if needed)
+
+**Home Modifications**:
+- Ramp for stairs
+- Stair lift if multiple levels
+- Remove scatter rugs (fall hazard)
+- Improve lighting
+- Rearrange for accessibility
+
+### Discharge Planning
+
+**Discharge Criteria**:
+- Functional plateau reached or goals met
+- Safe for discharge setting
+- Patient/caregiver educated
+- DME obtained and home modifications complete
+- Follow-up arranged
+
+**Discharge Destination**:
+- Home with outpatient therapy
+- Home with home health
+- Skilled nursing facility
+- Long-term acute care hospital (if medically complex)
+
+---
+
+## 3. Mental Health Treatment Plans
+
+### Applicable Conditions
+- Major depressive disorder, dysthymia
+- Anxiety disorders (GAD, panic, social anxiety, specific phobias)
+- Bipolar disorder
+- Schizophrenia and psychotic disorders
+- PTSD and trauma-related disorders
+- Eating disorders
+- Substance use disorders
+- Personality disorders
+
+### Key Assessment Components
+
+**Diagnostic Assessment**:
+- Meet DSM-5 criteria for diagnosis
+- Symptom severity assessment (use validated scales)
+- Functional impairment (work, relationships, self-care)
+- Psychiatric history (prior episodes, treatments, hospitalizations)
+- Substance use assessment (AUDIT, DAST)
+- Trauma history
+- Family psychiatric history
+
+**Validated Assessment Tools**:
+- **PHQ-9**: Depression severity (0-27, scores ≥10 indicate moderate-severe depression)
+- **GAD-7**: Anxiety severity (0-21, scores ≥10 indicate moderate-severe anxiety)
+- **MDQ** (Mood Disorder Questionnaire): Bipolar screening
+- **PC-PTSD-5**: PTSD screening, then full PCL-5 if positive
+- **AUDIT**: Alcohol use (0-40, ≥8 indicates hazardous drinking)
+- **PHQ-15**: Somatic symptoms
+- **WHODAS 2.0**: Functional disability
+
+**Risk Assessment**:
+- **Suicide Risk**: Use Columbia Suicide Severity Rating Scale (C-SSRS)
+ - Ideation (passive, active, plan, intent)
+ - Protective factors (reasons for living, social support)
+ - Risk factors (prior attempts, impulsivity, access to means)
+- **Violence/Homicide Risk**: History of violence, current ideation, access to weapons
+
+### Treatment Goals Specifics
+
+**Symptom Goals**:
+- Reduction in standardized scale scores (e.g., PHQ-9 from 18→<10→<5 for remission)
+- Specific symptom targets (sleep 7 hours, reduce panic attacks from 3/week→0)
+
+**Functional Goals**:
+- Return to work/school
+- Resume social activities
+- Improve relationships
+- Self-care independence
+
+**Recovery-Oriented Goals**:
+- Personal meaning and purpose
+- Hope and empowerment
+- Social connections and community integration
+- Independent living
+
+### Evidence-Based Psychotherapies
+
+**Depression**:
+- **CBT**: 12-16 sessions, homework between sessions
+- **Behavioral Activation**: Focus on increasing rewarding activities
+- **Interpersonal Therapy (IPT)**: 12-16 sessions, focus on relationships
+- **Problem-Solving Therapy**: Brief (6-8 sessions), structured approach
+
+**Anxiety**:
+- **CBT with exposure**: Gold standard for anxiety disorders
+- **Panic Control Therapy**: Interoceptive exposure, cognitive restructuring
+- **Social skills training**: For social anxiety
+
+**PTSD**:
+- **Prolonged Exposure (PE)**: 8-15 sessions, imaginal and in vivo exposure
+- **Cognitive Processing Therapy (CPT)**: 12 sessions, challenge trauma-related cognitions
+- **EMDR** (Eye Movement Desensitization and Reprocessing): Alternative, less evidence than PE/CPT
+
+**Bipolar**:
+- **Family-Focused Therapy**: Psychoeducation, communication, problem-solving
+- **Interpersonal and Social Rhythm Therapy**: Stabilize daily routines, sleep
+
+**Borderline Personality Disorder**:
+- **DBT** (Dialectical Behavior Therapy): 1 year program, individual + group + phone coaching
+- Skills: Mindfulness, distress tolerance, emotion regulation, interpersonal effectiveness
+
+### Psychopharmacology Specifics
+
+**Antidepressants**:
+- First-line: SSRIs (sertraline, escitalopram, fluoxetine)
+- 2-4 weeks for initial response, 6-8 weeks for full effect
+- Titrate after 2-4 weeks if partial response
+- Switch if no response after full trial
+- Augmentation strategies if partial response (second antidepressant, atypical antipsychotic, lithium)
+- Continue 6-12 months after remission (longer if recurrent)
+
+**Antipsychotics**:
+- First-generation (typical): Haloperidol - high EPS risk, use second-generation preferred
+- Second-generation (atypical): Risperidone, olanzapine, quetiapine, aripiprazole, lurasidone
+- Monitoring: Metabolic syndrome (weight, glucose, lipids), EPS, prolactin, QTc
+
+**Mood Stabilizers**:
+- Lithium: Narrow therapeutic window, monitor levels (0.6-1.2 mEq/L), TSH, renal function
+- Valproic acid: Monitor levels, LFTs, CBC (thrombocytopenia)
+- Lamotrigine: Titrate slowly (risk of Stevens-Johnson syndrome if too fast)
+
+### Safety Planning
+
+**Essential for All Mental Health Plans**:
+- Warning signs (thoughts, feelings, behaviors)
+- Internal coping strategies
+- Social support contacts
+- Professional contacts (therapist, psychiatrist, crisis line)
+- Means restriction (firearms removed, medications limited)
+- Reason for living
+
+**Crisis Resources**:
+- 988 Suicide & Crisis Lifeline
+- Crisis Text Line (text HOME to 741741)
+- Local mobile crisis team
+- Emergency department
+
+---
+
+## 4. Chronic Disease Management Plans
+
+### Multiple Comorbidities Management
+
+**Common Clusters**:
+- Cardiometabolic: Diabetes + hypertension + hyperlipidemia + obesity
+- Cardiopulmonary: Heart failure + COPD
+- Renal-cardiovascular: CKD + hypertension + diabetes
+- Mental-physical: Depression + chronic pain + chronic disease
+
+### Prioritization Strategies
+
+**When Multiple Goals Compete**:
+1. **Life-threatening issues first**: Unstable angina, uncontrolled heart failure
+2. **High-impact, modifiable conditions**: Diabetes with HbA1c 10% (significant reduction possible)
+3. **Synergistic treatments**: Medications that help multiple conditions (SGLT2i for diabetes + heart failure + CKD)
+4. **Patient priorities**: What matters most to patient
+
+### Medication Optimization for Multimorbidity
+
+**Synergistic Medications** (dual/triple benefit):
+- **SGLT2 inhibitors**: Diabetes + heart failure + CKD
+- **ACE inhibitors/ARBs**: Hypertension + diabetes (renal protection) + heart failure
+- **Beta-blockers**: Hypertension + heart failure + CAD
+- **Statins**: Hyperlipidemia + ASCVD prevention + diabetes
+- **GLP-1 agonists**: Diabetes + weight loss + cardiovascular benefit
+
+**Deprescribing**:
+- Identify medications with limited benefit (e.g., strict glycemic control in limited life expectancy)
+- Discontinue medications with more harm than benefit
+- Simplify regimens (reduce pill burden)
+
+### Care Coordination
+
+**Team-Based Care**:
+- Primary care coordinates
+- Specialists co-manage (cardiologist for HF, endocrinologist for diabetes)
+- Care coordinator facilitates (schedules, education, barrier identification)
+- Pharmacist reviews medications, optimizes therapy
+- Dietitian provides medical nutrition therapy
+- Social worker addresses social needs
+
+**Communication**:
+- Shared EHR when possible
+- Care plan accessible to all team members
+- Medication reconciliation after specialist visits
+- Regular team meetings or e-consultations
+
+### Population Health Integration
+
+**Registry Management**:
+- Identify patients due for care (HbA1c testing, diabetic eye exam)
+- Outreach for overdue preventive care
+- Risk stratification (high-utilizers, complex patients)
+
+**Transition Management**:
+- Hospital discharge follow-up within 7 days
+- Medication reconciliation post-discharge
+- Red flags review
+- Escalation plan if decompensating
+
+---
+
+## 5. Perioperative Care Plans
+
+### Preoperative Risk Assessment
+
+**Cardiac Risk** (Revised Cardiac Risk Index - RCRI):
+- High-risk surgery, ischemic heart disease, heart failure, CVD, diabetes on insulin, creatinine >2
+- 0 points = <1% risk, 1 point = 1%, 2 points = 2.4%, ≥3 points = 5.4% risk of cardiac event
+
+**If High Risk**: Consider further testing (stress test, echo), cardiology consultation, perioperative beta-blockade.
+
+**Pulmonary Risk** (ARISCAT score):
+- Age, SpO2, respiratory infection recent, preop anemia, surgical incision, duration, emergency
+- Higher risk: Smoking cessation, incentive spirometry, early mobilization
+
+**VTE Risk** (Caprini Score):
+- Age, surgery type, mobility, prior VTE, obesity, cancer
+- Stratify to guide prophylaxis (none, mechanical, pharmacologic, or both)
+
+### Preoperative Optimization
+
+**Diabetes**:
+- Target HbA1c <8% for elective surgery (delay if >9%)
+- Hold metformin 24-48 hours before (risk of lactic acidosis)
+- Hold SGLT2i 3-4 days before (DKA risk)
+- Insulin: Reduce long-acting by 20-25% day of surgery, hold short-acting
+
+**Hypertension**:
+- Continue most medications through surgery
+- Hold ACE/ARB morning of surgery (avoid intraop hypotension)
+- Continue beta-blocker (avoid withdrawal)
+
+**Anticoagulation**:
+- Warfarin: Hold 5 days before, bridge with LMWH if high VTE risk
+- DOACs: Hold 24-48 hours (based on renal function and bleeding risk)
+- Antiplatelet: Continue aspirin for most surgeries, hold P2Y12 inhibitors (clopidogrel) 5-7 days if high bleeding risk
+
+**Anemia**:
+- Optimize iron stores preop (IV iron if time limited)
+- Avoid transfusion triggers if possible (restrictive strategy)
+
+### Enhanced Recovery After Surgery (ERAS)
+
+**Preoperative**:
+- Patient education, expectation setting
+- No prolonged fasting (clear liquids 2 hours before)
+- Carbohydrate loading (reduces insulin resistance)
+- No routine premedication
+
+**Intraoperative**:
+- Multimodal analgesia (minimize opioids)
+- Goal-directed fluid therapy (avoid overhydration)
+- Normothermia (prevent hypothermia)
+- Antiemetic prophylaxis
+
+**Postoperative**:
+- Early mobilization (out of bed day of surgery)
+- Early oral nutrition (resume diet POD 0-1)
+- Multimodal analgesia (acetaminophen, NSAIDs, regional blocks)
+- Remove tubes/drains early (Foley, NG tube, surgical drains)
+- DVT prophylaxis
+
+### Postoperative Milestones
+
+**Day of Surgery (POD 0)**:
+- Out of bed to chair 4-6 hours post-op
+- Sips of clear liquids if appropriate
+- Pain controlled on multimodal regimen
+
+**POD 1**:
+- Ambulate in hallway
+- Regular diet
+- Foley catheter removed
+- Transition to oral pain medications
+
+**POD 2-3** (typical discharge for many surgeries):
+- Ambulate 150+ feet
+- Adequate oral intake
+- Pain controlled on oral meds
+- No complications requiring hospitalization
+
+### Discharge Readiness
+
+**Criteria**:
+- Adequate pain control on oral medications
+- Tolerating regular diet
+- Mobile (ambulate, transfers)
+- Voiding spontaneously
+- Stable vital signs
+- No active complications
+- Safe discharge plan (home support, DME arranged)
+
+---
+
+## 6. Pain Management Plans
+
+### Pain Assessment
+
+**Comprehensive Pain Evaluation**:
+- Location, radiation
+- Quality (sharp, dull, burning, aching, shooting)
+- Intensity (0-10 NRS)
+- Temporal pattern (constant, intermittent, episodic)
+- Aggravating/alleviating factors
+- Functional impact (Brief Pain Inventory - BPI interference items)
+- Prior treatments and responses
+
+**Pain Classification**:
+- **Nociceptive**: Somatic (MSK) or visceral (organ)
+- **Neuropathic**: Nerve injury/dysfunction (burning, shooting, electric, numbness/tingling)
+- **Nociplastic**: Central sensitization, fibromyalgia
+- **Mixed**: Combination
+
+### Multimodal Analgesia Principles
+
+**Goal**: Additive/synergistic pain relief from multiple mechanisms, opioid-sparing.
+
+**Components**:
+1. Non-opioid analgesics (acetaminophen, NSAIDs)
+2. Adjuvant analgesics (gabapentinoids, SNRIs, TCAs for neuropathic)
+3. Topical agents (lidocaine patches, diclofenac gel, capsaicin)
+4. Interventional procedures (injections, nerve blocks, RFA, SCS)
+5. Physical therapies (PT, exercise, TENS)
+6. Psychological therapies (CBT-CP, mindfulness, biofeedback)
+7. Complementary therapies (acupuncture, massage, yoga)
+8. Opioids (if other modalities insufficient) - lowest dose, reassess frequently
+
+### Neuropathic Pain Specific Treatments
+
+**First-Line**:
+- Gabapentin 300mg titrate to 1800-3600mg/day divided TID
+- Pregabalin 75mg BID titrate to 150-300mg BID
+- Duloxetine 60mg daily (also for fibromyalgia, chronic MSK pain)
+- TCAs (amitriptyline, nortriptyline) 10-75mg QHS - second-line due to side effects
+
+**Topical**:
+- Lidocaine patches 5% (localized neuropathic pain)
+- Capsaicin 8% patch (high-concentration, applied by provider)
+
+**Refractory**:
+- Tramadol (dual mechanism - opioid + SNRI)
+- Opioids (if severe and function-limiting despite above)
+
+### Opioid Prescribing (CDC Guidelines)
+
+**Before Initiating**:
+- Non-opioid multimodal therapies tried and inadequate
+- Functional goals established (not just pain scores)
+- Risks vs. benefits discussed and documented
+- Opioid risk assessment (ORT, SOAPP)
+- Informed consent discussion
+- Treatment agreement signed
+- PDMP checked
+- Baseline UDS
+
+**During Opioid Therapy**:
+- Start low dose (<50 MME/day), short-acting
+- Reassess frequently (every 1-3 months)
+- Functional improvement expected (not just pain scores)
+- UDS every 3-6 months (check for adherence and illicit substances)
+- PDMP check each prescription or at least every 3 months
+- Naloxone co-prescribed
+- Avoid concurrent benzodiazepines
+- If dose approaching 50 MME, reassess; avoid >90 MME if possible
+
+**Tapering**:
+- If not meeting functional goals
+- Serious adverse effects
+- Aberrant behaviors
+- Patient request
+- Slow taper: 10-25% dose reduction per week to month (faster if safety concern)
+
+### Interventional Pain Procedures
+
+**Indications and Evidence**:
+- **Epidural Steroid Injection**: Radicular pain from disc herniation/stenosis - short-term benefit
+- **Facet Joint Injections**: Diagnostic (if >50% relief, proceed to RFA)
+- **Radiofrequency Ablation**: 6-12 months relief for facet-mediated pain
+- **Spinal Cord Stimulation**: Refractory neuropathic pain (FBSS, CRPS) - 50-60% success
+- **Intrathecal Pump**: Severe refractory pain, cancer pain - delivers medication to CSF
+
+**Documentation for Procedures**:
+- Indication, prior conservative treatments tried
+- Expected benefit and duration
+- Risks discussed
+- Number of injections/procedures allowed per year
+
+### Functional Goals Emphasis
+
+**Shift from Pain Scores to Function**:
+- "Reduce pain to 3/10" is less meaningful than "Walk 1 mile, return to work, play with grandchildren"
+- BPI interference scores track functional impact
+- SMART functional goals (see Goal Setting reference)
+
+### Psychological Integration
+
+**CBT for Chronic Pain (CBT-CP)**:
+- Pain education and reconceptualization (pain ≠ harm)
+- Cognitive restructuring (challenge catastrophizing, all-or-nothing thinking)
+- Activity pacing and graded exposure (increase activity without flares)
+- Relaxation techniques
+- Acceptance and mindfulness
+
+**Essential for Chronic Pain**: Psychological factors (depression, anxiety, catastrophizing) perpetuate pain; must be addressed.
+
+---
+
+## Cross-Cutting Considerations for All Treatment Plans
+
+### Cultural Competence
+- Ask about cultural health beliefs, practices
+- Use interpreter services when language barriers exist
+- Respect religious/spiritual practices in treatment
+- Adapt interventions to cultural context when possible
+
+### Health Literacy
+- Assess understanding (teach-back method)
+- Use plain language, avoid jargon
+- Visual aids, written materials at 5th-6th grade reading level
+- Confirm patient can execute plan (demonstrate inhaler use, insulin injection, etc.)
+
+### Social Determinants of Health (SDOH)
+- Screen for food insecurity, housing instability, transportation barriers
+- Connect to community resources (SNAP, Medicaid, patient assistance programs)
+- Address barriers in treatment plan (e.g., medication cost → generic alternatives, patient assistance)
+
+### Advance Care Planning
+- Appropriate for serious illness, elderly, declining function
+- Goals of care discussion
+- Healthcare proxy designation
+- Advance directive completion
+- Preferences for resuscitation, intubation, dialysis, etc.
+
+---
+
+**Document Version**: 1.0
+**Last Updated**: January 2025
+**Next Review**: January 2026
+
diff --git a/scientific-skills/treatment-plans/references/treatment_plan_standards.md b/scientific-skills/treatment-plans/references/treatment_plan_standards.md
new file mode 100644
index 0000000..21126d4
--- /dev/null
+++ b/scientific-skills/treatment-plans/references/treatment_plan_standards.md
@@ -0,0 +1,485 @@
+% Treatment Plan Standards and Best Practices
+% Professional guidelines for treatment plan documentation
+% Last updated: 2025
+
+# Treatment Plan Standards
+
+## Overview
+
+Treatment plans are comprehensive documents that outline systematic approaches to addressing patient health conditions through evidence-based interventions, measurable goals, and structured follow-up. This reference provides professional standards, documentation requirements, and legal considerations for creating high-quality treatment plans across all medical specialties.
+
+## Core Documentation Standards
+
+### 1. Executive Summary Best Practices (Foundation Medicine Model)
+
+**CRITICAL: All treatment plans MUST include a prominent "Treatment Plan Highlights" summary box on the first page.**
+
+Following the Foundation Medicine model for genomic profiling reports, treatment plans should begin with a concise, bulletin-style summary that provides immediate access to key actionable information:
+
+**Components of Treatment Plan Highlights Box:**
+- **Key Diagnosis**: Primary condition with ICD-10 code, severity/stage (1 line)
+- **Primary Treatment Goals**: 2-3 SMART goals in bullet format
+- **Main Interventions**: 2-3 key interventions (pharmacological, non-pharmacological, monitoring)
+- **Timeline Overview**: Brief treatment duration/phases (1 line)
+
+**Format Requirements:**
+- Use colored box (tcolorbox in LaTeX) to make it visually prominent
+- Place immediately after title, before Patient Information section
+- Summary must fit on first page with patient demographics
+- Use concise, actionable language
+- Focus on what clinicians need to know immediately
+
+**Optimal Document Length:**
+- **Preferred**: 1 page for most treatment plans (quick-reference format)
+- **Standard**: 3-4 pages for moderate complexity cases
+- **Extended**: 5-6 pages maximum for highly complex cases only
+- Prioritize brevity, clarity, and actionability over comprehensive detail
+- Think "clinical decision support card" not "comprehensive textbook"
+
+**Design Philosophy:**
+The highlights box enables efficient clinical decision-making by providing critical information upfront, following evidence-based practices from precision medicine reporting. This approach improves care coordination, reduces time to treatment initiation, and ensures key information is never overlooked.
+
+### 2. Essential Components
+
+All treatment plans must include:
+
+#### Patient Information (De-identified for Sharing)
+- Unique patient identifier (not name or MRN)
+- Age range (not exact birth date)
+- Relevant demographics
+- Date of plan creation
+- Provider name and credentials
+- HIPAA compliance statement
+
+#### Diagnosis and Assessment
+- Primary diagnosis with ICD-10 code
+- Secondary diagnoses and comorbidities
+- Severity classification or staging
+- Functional assessment and baseline status
+- Risk stratification
+- Prognostic considerations
+
+#### Treatment Goals (SMART Format)
+- **Specific**: Clearly defined outcomes
+- **Measurable**: Quantifiable metrics or observable criteria
+- **Achievable**: Realistic given patient circumstances
+- **Relevant**: Aligned with patient values and priorities
+- **Time-bound**: Defined timeframe for achievement
+
+Short-term goals (weeks to 3 months) and long-term goals (3-12+ months) should be distinguished.
+
+#### Interventions
+- **Pharmacological**: Specific medications, doses, frequencies, rationales
+- **Non-pharmacological**: Lifestyle modifications, behavioral interventions, education
+- **Procedural**: Planned procedures, specialist referrals, diagnostic testing
+
+#### Timeline and Schedule
+- Treatment phases with durations
+- Appointment frequency
+- Milestone assessments
+- Expected treatment duration
+
+#### Monitoring Parameters
+- Clinical outcomes to track
+- Assessment tools and scales
+- Monitoring frequency
+- Intervention thresholds
+
+#### Expected Outcomes
+- Primary outcome measures
+- Success criteria
+- Timeline for improvement
+- Criteria for treatment modification
+
+#### Follow-up Plan
+- Scheduled appointments
+- Communication protocols
+- Emergency procedures
+- Transition planning
+
+#### Patient Education
+- Condition understanding
+- Self-management skills
+- Warning signs
+- Resources and support
+
+#### Risk Mitigation
+- Potential adverse effects
+- Safety monitoring
+- Emergency action plans
+- Complication prevention
+
+### 2. Professional Documentation Standards
+
+#### Clarity and Precision
+- Use professional medical terminology appropriately
+- Define abbreviations on first use
+- Avoid ambiguous language
+- Specific rather than vague descriptions
+
+**Good Example**: "Reduce HbA1c from 8.5% to <7% within 3 months"
+**Poor Example**: "Improve diabetes control"
+
+#### Completeness
+- Address all relevant aspects of condition
+- Include rationale for treatment choices
+- Document shared decision-making
+- Address patient preferences and concerns
+
+#### Accuracy
+- Factually correct information
+- Current evidence-based recommendations
+- Appropriate dosing and frequencies
+- Correct ICD-10 and CPT codes
+
+#### Timeliness
+- Plans created at diagnosis or treatment initiation
+- Updated after significant clinical changes
+- Regular scheduled updates (quarterly to annually)
+- Dated and signed promptly
+
+#### Legibility and Organization
+- Professional formatting
+- Logical flow and structure
+- Consistent use of headings and sections
+- Easy to locate key information
+
+### 3. Legal and Regulatory Requirements
+
+#### Medical Necessity Documentation
+Treatment plans must demonstrate:
+- Appropriateness of interventions for diagnosis
+- Evidence supporting treatment choices
+- Expected outcomes justify costs and risks
+- Frequency and duration are reasonable
+- Less invasive options considered
+
+#### Informed Consent Documentation
+Record that patient:
+- Understands diagnosis and prognosis
+- Aware of treatment options, risks, and benefits
+- Knows alternatives to proposed treatment
+- Had opportunity to ask questions
+- Voluntarily agrees to treatment plan
+
+#### Privacy and Confidentiality (HIPAA)
+- Protected Health Information (PHI) safeguarded
+- De-identification for sharing:
+ - Remove 18 HIPAA identifiers per Safe Harbor method
+ - Names, dates (except year), geographic subdivisions smaller than state
+ - Contact information (phone, fax, email, addresses)
+ - Social Security numbers, medical record numbers, account numbers
+ - Biometric identifiers, photos, other unique identifiers
+- Access limited to those with treatment, payment, or operations need
+- Patient authorization for non-routine disclosures
+
+#### Billing and Reimbursement Support
+- ICD-10 diagnosis codes for all conditions
+- CPT codes for procedures
+- Documentation of medical necessity
+- Justification for level of service
+- Compliance with payer-specific requirements
+
+#### Quality Measure Reporting
+Enable extraction of quality metrics:
+- HEDIS measures (diabetes HbA1c testing, BP control, etc.)
+- CMS quality reporting (MIPS, ACO measures)
+- Disease-specific quality indicators
+- Patient safety indicators
+
+#### Liability Protection
+Defensible documentation includes:
+- Rationale for clinical decisions
+- Consideration of differential diagnosis
+- Risk-benefit analysis
+- Patient education and warnings
+- Follow-up plan for abnormal findings
+- Addressing non-adherence or patient refusal
+
+## Professional Practice Standards
+
+### Joint Commission Standards
+
+#### Patient-Centered Care
+- Treatment plans developed with patient participation
+- Goals reflect patient values and preferences
+- Cultural and linguistic needs addressed
+- Health literacy appropriate communication
+
+#### Multidisciplinary Coordination
+- Input from relevant disciplines
+- Clear role delineation
+- Communication among team members
+- Coordinated interventions
+
+#### Evidence-Based Practice
+- Interventions based on current evidence
+- Clinical practice guidelines followed
+- Variation from guidelines documented and justified
+- Literature supports treatment choices
+
+### Commission on Accreditation of Rehabilitation Facilities (CARF)
+
+For rehabilitation treatment plans:
+- Individualized based on comprehensive assessment
+- Measurable, achievable, time-specific goals
+- Regular team review and modification
+- Patient and family involvement
+- Transition and discharge planning
+
+### Centers for Medicare & Medicaid Services (CMS)
+
+#### Conditions of Participation
+- Physician orders for treatment
+- Periodic review and revision
+- Progress toward goals documented
+- Care plan accessible to all team members
+
+#### Documentation Requirements
+- Legible (typed or clear handwriting)
+- Dated and authenticated (signed)
+- Amendments/corrections properly marked
+- Retention per state law (typically 7-10 years, longer for minors)
+
+## Medical Specialty Standards
+
+### Primary Care
+- Annual comprehensive assessment and plan update
+- Chronic disease management protocols
+- Preventive care integration
+- Medication reconciliation
+- Care coordination with specialists
+
+### Behavioral Health
+- Mental status examination
+- Psychiatric diagnoses per DSM-5 criteria
+- Suicide/homicide risk assessment and safety planning
+- Measurable behavioral outcomes
+- Crisis intervention plan
+- Substance use assessment
+- 42 CFR Part 2 compliance for substance use treatment
+
+### Rehabilitation
+- Functional assessments (FIM, Barthel Index, etc.)
+- Activity limitations and participation restrictions
+- Short-term and long-term functional goals
+- Therapy frequency, intensity, duration
+- Home exercise program
+- Assistive devices and DME
+- Discharge criteria
+
+### Surgical/Perioperative
+- Indication for surgery documented
+- Preoperative risk assessment (ASA, RCRI)
+- Medical optimization plan
+- Enhanced Recovery After Surgery (ERAS) protocols when applicable
+- Postoperative milestones
+- Discharge criteria and planning
+
+### Pain Management
+- Comprehensive pain assessment (location, intensity, quality, temporal pattern, impact)
+- Pain type (nociceptive, neuropathic, mixed)
+- Multimodal analgesia approach
+- Opioid risk assessment (ORT, SOAPP)
+- If opioids: CDC guidelines compliance, treatment agreement, UDS, PDMP
+- Functional goals (not just pain scores)
+- Psychological screening and intervention
+
+## Quality Indicators for Treatment Plans
+
+### Completeness Metrics
+- All required sections present (100%)
+- Goals meet SMART criteria ($\geq$90%)
+- Interventions have clear rationales ($\geq$95%)
+- Monitoring plan includes frequency ($\geq$95%)
+- Patient education documented (100%)
+
+### Clinical Quality Metrics
+- Evidence-based interventions ($\geq$90%)
+- Guideline-concordant care ($\geq$85%)
+- Avoidance of low-value care (100%)
+- Appropriate preventive care included ($\geq$95%)
+
+### Patient-Centered Metrics
+- Patient preferences documented ($\geq$90%)
+- Shared decision-making noted ($\geq$85%)
+- Culturally appropriate care (100%)
+- Health literacy addressed ($\geq$90%)
+
+### Safety Metrics
+- Risk mitigation strategies present (100%)
+- Medication safety addressed (100%)
+- Emergency procedures documented (100%)
+- Red flags/warning signs communicated (100%)
+
+## Common Documentation Deficiencies and Solutions
+
+### Problem: Vague Goals
+**Deficiency**: "Improve diabetes"
+**Solution**: "Reduce HbA1c from 8.5% to <7% within 3 months through medication intensification and lifestyle modification"
+
+### Problem: Missing Rationales
+**Deficiency**: Lists medications without explanation
+**Solution**: "Metformin 1000mg BID - first-line therapy for T2DM, reduces hepatic glucose production, target dose for HbA1c reduction"
+
+### Problem: No Timeline
+**Deficiency**: Goals without timeframes
+**Solution**: "Short-term (3 months): HbA1c <7.5%; Long-term (6 months): HbA1c <7%"
+
+### Problem: Incomplete Monitoring
+**Deficiency**: "Monitor labs"
+**Solution**: "HbA1c every 3 months until at goal, then every 6 months; CMP every 6 months to monitor renal function on metformin and ACE inhibitor"
+
+### Problem: Absent Patient Education
+**Deficiency**: No documentation of education provided
+**Solution**: Dedicated section documenting: condition education, self-management skills taught, warning signs communicated, resources provided
+
+### Problem: Missing Safety Planning
+**Deficiency**: No risk mitigation
+**Solution**: Specific safety concerns addressed (e.g., hypoglycemia risk with insulin, monitoring plan, patient taught recognition and treatment)
+
+## Electronic Health Record (EHR) Integration
+
+### Structured Data Entry
+- Use templates for consistency
+- Coded diagnoses (ICD-10), procedures (CPT)
+- Structured goals enable outcome tracking
+- Discrete medication fields (name, dose, route, frequency)
+
+### Clinical Decision Support
+- Evidence-based order sets
+- Drug-drug interaction alerts
+- Guideline reminders
+- Quality measure tracking
+
+### Care Plan Sharing
+- Patient portal access (patient-friendly version)
+- Interoperability standards (C-CDA)
+- Shared with care team
+- Transitions of care summary
+
+## Audit and Peer Review
+
+### Internal Quality Review
+- Random sample chart audits (e.g., 5% quarterly)
+- Checklist-based review (completeness, quality)
+- Feedback to providers
+- Continuous quality improvement
+
+### External Review
+- Payer audits (documentation supports billing)
+- Regulatory surveys (Joint Commission, CMS)
+- Malpractice case review
+- Peer review for privileging/credentialing
+
+### Audit Criteria
+- Documentation completeness
+- Clinical appropriateness
+- Regulatory compliance
+- Billing integrity
+- Patient safety
+
+## Treatment Plan Revision and Updates
+
+### When to Update Treatment Plans
+
+**Scheduled Updates**:
+- Chronic disease management: Every 3-6 months minimum
+- Behavioral health: Every 30-90 days depending on acuity
+- Rehabilitation: Weekly to biweekly during active therapy
+- Annual comprehensive update for all chronic conditions
+
+**Triggered Updates**:
+- Significant change in clinical status
+- New diagnosis
+- Treatment goals achieved or not progressing
+- Patient request or preference change
+- Hospitalization or emergency department visit
+- Medication changes or adverse events
+
+### Documentation of Changes
+- Date of revision
+- Reason for update
+- What changed (goals, interventions, timeline)
+- Provider signature
+- Maintain prior versions for record
+
+## Specialty-Specific Requirements
+
+### Diabetes Management Plans
+- HbA1c targets individualized
+- Complication screening schedule (eyes, feet, kidneys)
+- Self-monitoring blood glucose frequency
+- Hypoglycemia recognition and treatment
+- Sick day management
+
+### Heart Failure Plans
+- GDMT (guideline-directed medical therapy) checklist
+- Volume management (daily weights, fluid/sodium restriction)
+- NYHA functional class documentation
+- Device therapy consideration
+- Hospitalization triggers
+
+### Mental Health Treatment Plans
+- DSM-5 diagnostic criteria met
+- Suicide/violence risk assessment
+- Safety planning
+- Psychotherapy modality and frequency
+- Medication trials and responses
+- Functional goals (return to work, relationships)
+
+### Chronic Pain Plans
+- Comprehensive pain assessment
+- Functional goals (not just pain scores)
+- Multimodal analgesia
+- Opioid risk assessment if prescribing
+- Physical and psychological interventions
+- Activity modification and pacing
+
+## Cultural Competence and Health Equity
+
+### Culturally Appropriate Care
+- Recognize cultural health beliefs and practices
+- Address language barriers (interpreter services)
+- Respect religious and cultural preferences in treatment
+- Consider social determinants of health (housing, food security, transportation)
+- Avoid assumptions based on stereotypes
+
+### Health Literacy
+- Assess patient understanding (teach-back method)
+- Use plain language, avoid medical jargon
+- Visual aids and written materials at appropriate reading level
+- Tailor education to patient's learning style
+
+### Addressing Disparities
+- Screen for social needs and barriers
+- Connect to community resources
+- Culturally tailored interventions when evidence supports
+- Track outcomes by demographic groups, address disparities
+
+## References and Guidelines
+
+### General Standards
+- Joint Commission Standards Manual
+- CMS Conditions of Participation
+- State medical board documentation requirements
+
+### Specialty Guidelines
+- American College of Physicians (ACP)
+- American Academy of Family Physicians (AAFP)
+- American Psychiatric Association (APA)
+- American Physical Therapy Association (APTA)
+- Disease-specific societies (ADA, AHA, ACC, etc.)
+
+### Regulatory
+- HIPAA Privacy Rule (45 CFR Part 160, 164)
+- 42 CFR Part 2 (Substance Use Disorder Confidentiality)
+- 21 CFR Part 11 (Electronic Records, applicable for research/trials)
+- State scope of practice laws
+
+---
+
+**Document Version**: 1.0
+**Last Updated**: January 2025
+**Next Review**: January 2026
+
diff --git a/scientific-skills/treatment-plans/scripts/check_completeness.py b/scientific-skills/treatment-plans/scripts/check_completeness.py
new file mode 100644
index 0000000..0585278
--- /dev/null
+++ b/scientific-skills/treatment-plans/scripts/check_completeness.py
@@ -0,0 +1,318 @@
+#!/usr/bin/env python3
+"""
+Check Treatment Plan Completeness
+Validates that all required sections are present in a treatment plan.
+"""
+
+import sys
+import re
+import argparse
+from pathlib import Path
+from typing import List, Tuple
+
+# Required sections for all treatment plans
+REQUIRED_SECTIONS = [
+ r'\\section\*\{.*Patient Information',
+ r'\\section\*\{.*Diagnosis.*Assessment',
+ r'\\section\*\{.*Goals',
+ r'\\section\*\{.*Interventions',
+ r'\\section\*\{.*Timeline.*Schedule',
+ r'\\section\*\{.*Monitoring',
+ r'\\section\*\{.*Outcomes',
+ r'\\section\*\{.*Follow[- ]?up',
+ r'\\section\*\{.*Education',
+ r'\\section\*\{.*Risk.*Safety',
+]
+
+# Section descriptions for user-friendly output
+SECTION_DESCRIPTIONS = {
+ 0: 'Patient Information (de-identified)',
+ 1: 'Diagnosis and Assessment',
+ 2: 'Treatment Goals (SMART format)',
+ 3: 'Interventions (pharmacological, non-pharmacological, procedural)',
+ 4: 'Timeline and Schedule',
+ 5: 'Monitoring Parameters',
+ 6: 'Expected Outcomes',
+ 7: 'Follow-up Plan',
+ 8: 'Patient Education',
+ 9: 'Risk Mitigation and Safety'
+}
+
+
+def read_file(filepath: Path) -> str:
+ """Read and return file contents."""
+ try:
+ with open(filepath, 'r', encoding='utf-8') as f:
+ return f.read()
+ except FileNotFoundError:
+ print(f"Error: File not found: {filepath}", file=sys.stderr)
+ sys.exit(1)
+ except Exception as e:
+ print(f"Error reading file: {e}", file=sys.stderr)
+ sys.exit(1)
+
+
+def check_sections(content: str) -> Tuple[List[bool], List[str]]:
+ """
+ Check which required sections are present.
+ Returns tuple of (checklist, missing_sections).
+ """
+ checklist = []
+ missing = []
+
+ for i, pattern in enumerate(REQUIRED_SECTIONS):
+ if re.search(pattern, content, re.IGNORECASE):
+ checklist.append(True)
+ else:
+ checklist.append(False)
+ missing.append(SECTION_DESCRIPTIONS[i])
+
+ return checklist, missing
+
+
+def check_smart_goals(content: str) -> Tuple[bool, List[str]]:
+ """
+ Check if SMART goal criteria are mentioned.
+ Returns (has_smart, missing_criteria).
+ """
+ smart_criteria = {
+ 'Specific': r'\bspecific\b',
+ 'Measurable': r'\bmeasurable\b',
+ 'Achievable': r'\bachievable\b',
+ 'Relevant': r'\brelevant\b',
+ 'Time-bound': r'\btime[- ]?bound\b'
+ }
+
+ missing = []
+ for criterion, pattern in smart_criteria.items():
+ if not re.search(pattern, content, re.IGNORECASE):
+ missing.append(criterion)
+
+ has_smart = len(missing) == 0
+ return has_smart, missing
+
+
+def check_hipaa_notice(content: str) -> bool:
+ """Check if HIPAA de-identification notice is present."""
+ pattern = r'HIPAA|de-identif|protected health information|PHI'
+ return bool(re.search(pattern, content, re.IGNORECASE))
+
+
+def check_provider_signature(content: str) -> bool:
+ """Check if provider signature section is present."""
+ pattern = r'\\section\*\{.*Signature|Provider Signature|Signature'
+ return bool(re.search(pattern, content, re.IGNORECASE))
+
+
+def check_placeholders_remaining(content: str) -> Tuple[int, List[str]]:
+ """
+ Check for uncustomized placeholders [like this].
+ Returns (count, sample_placeholders).
+ """
+ placeholders = re.findall(r'\[([^\]]+)\]', content)
+
+ # Filter out LaTeX commands and references
+ filtered = []
+ for p in placeholders:
+ # Skip if it's a LaTeX command, number, or citation
+ if not (p.startswith('\\') or p.isdigit() or 'cite' in p.lower() or 'ref' in p.lower()):
+ filtered.append(p)
+
+ count = len(filtered)
+ samples = filtered[:5] # Return up to 5 examples
+
+ return count, samples
+
+
+def display_results(filepath: Path, checklist: List[bool], missing: List[str],
+ smart_complete: bool, smart_missing: List[str],
+ has_hipaa: bool, has_signature: bool,
+ placeholder_count: int, placeholder_samples: List[str]):
+ """Display completeness check results."""
+
+ total_sections = len(REQUIRED_SECTIONS)
+ present_count = sum(checklist)
+ completeness_pct = (present_count / total_sections) * 100
+
+ print("\n" + "="*70)
+ print("TREATMENT PLAN COMPLETENESS CHECK")
+ print("="*70)
+ print(f"\nFile: {filepath}")
+ print(f"File size: {filepath.stat().st_size:,} bytes")
+
+ # Overall completeness
+ print("\n" + "-"*70)
+ print("OVERALL COMPLETENESS")
+ print("-"*70)
+ print(f"Required sections present: {present_count}/{total_sections} ({completeness_pct:.0f}%)")
+
+ if completeness_pct == 100:
+ print("✓ All required sections present")
+ else:
+ print(f"✗ {len(missing)} section(s) missing")
+
+ # Section details
+ print("\n" + "-"*70)
+ print("SECTION CHECKLIST")
+ print("-"*70)
+
+ for i, (present, desc) in enumerate(zip(checklist, SECTION_DESCRIPTIONS.values())):
+ status = "✓" if present else "✗"
+ print(f"{status} {desc}")
+
+ # Missing sections
+ if missing:
+ print("\n" + "-"*70)
+ print("MISSING SECTIONS")
+ print("-"*70)
+ for section in missing:
+ print(f" • {section}")
+
+ # SMART goals
+ print("\n" + "-"*70)
+ print("SMART GOALS CHECK")
+ print("-"*70)
+
+ if smart_complete:
+ print("✓ All SMART criteria mentioned in document")
+ else:
+ print(f"✗ {len(smart_missing)} SMART criterion/criteria not found:")
+ for criterion in smart_missing:
+ print(f" • {criterion}")
+ print("\nNote: Goals should be Specific, Measurable, Achievable, Relevant, Time-bound")
+
+ # HIPAA notice
+ print("\n" + "-"*70)
+ print("PRIVACY AND COMPLIANCE")
+ print("-"*70)
+
+ if has_hipaa:
+ print("✓ HIPAA/de-identification notice present")
+ else:
+ print("✗ HIPAA de-identification notice not found")
+ print(" Recommendation: Include HIPAA Safe Harbor de-identification guidance")
+
+ if has_signature:
+ print("✓ Provider signature section present")
+ else:
+ print("✗ Provider signature section not found")
+
+ # Placeholders
+ print("\n" + "-"*70)
+ print("CUSTOMIZATION STATUS")
+ print("-"*70)
+
+ if placeholder_count == 0:
+ print("✓ No uncustomized placeholders detected")
+ else:
+ print(f"⚠ {placeholder_count} placeholder(s) may need customization")
+ print("\nExamples:")
+ for sample in placeholder_samples:
+ print(f" • [{sample}]")
+ print("\nRecommendation: Replace all [bracketed placeholders] with patient-specific information")
+
+ # Summary
+ print("\n" + "="*70)
+ print("SUMMARY")
+ print("="*70)
+
+ # Calculate overall score
+ score_components = [
+ completeness_pct / 100, # Section completeness (0-1)
+ 1.0 if smart_complete else 0.6, # SMART goals (full or partial credit)
+ 1.0 if has_hipaa else 0.0, # HIPAA notice (binary)
+ 1.0 if has_signature else 0.0, # Signature (binary)
+ 1.0 if placeholder_count == 0 else 0.5 # Customization (full or partial)
+ ]
+
+ overall_score = (sum(score_components) / len(score_components)) * 100
+
+ print(f"\nOverall completeness score: {overall_score:.0f}%")
+
+ if overall_score >= 90:
+ print("Status: ✓ EXCELLENT - Treatment plan is comprehensive")
+ elif overall_score >= 75:
+ print("Status: ✓ GOOD - Minor improvements needed")
+ elif overall_score >= 60:
+ print("Status: ⚠ FAIR - Several sections need attention")
+ else:
+ print("Status: ✗ INCOMPLETE - Significant work needed")
+
+ print("\n" + "="*70)
+
+ # Return exit code based on completeness
+ return 0 if completeness_pct >= 80 else 1
+
+
+def main():
+ parser = argparse.ArgumentParser(
+ description='Check treatment plan completeness',
+ formatter_class=argparse.RawDescriptionHelpFormatter,
+ epilog="""
+Examples:
+ # Check a treatment plan file
+ python check_completeness.py my_treatment_plan.tex
+
+ # Check and exit with error code if incomplete (for CI/CD)
+ python check_completeness.py plan.tex && echo "Complete"
+
+This script checks for:
+ - All required sections (10 core sections)
+ - SMART goal criteria
+ - HIPAA de-identification notice
+ - Provider signature section
+ - Uncustomized placeholders
+
+Exit codes:
+ 0 - All required sections present (≥80% complete)
+ 1 - Missing required sections (<80% complete)
+ 2 - File error or invalid arguments
+ """
+ )
+
+ parser.add_argument(
+ 'file',
+ type=Path,
+ help='Treatment plan file to check (.tex format)'
+ )
+
+ parser.add_argument(
+ '-v', '--verbose',
+ action='store_true',
+ help='Show detailed output'
+ )
+
+ args = parser.parse_args()
+
+ # Check file exists and is .tex
+ if not args.file.exists():
+ print(f"Error: File not found: {args.file}", file=sys.stderr)
+ sys.exit(2)
+
+ if args.file.suffix.lower() not in ['.tex', '.txt']:
+ print(f"Warning: Expected .tex file, got {args.file.suffix}", file=sys.stderr)
+
+ # Read file
+ content = read_file(args.file)
+
+ # Perform checks
+ checklist, missing = check_sections(content)
+ smart_complete, smart_missing = check_smart_goals(content)
+ has_hipaa = check_hipaa_notice(content)
+ has_signature = check_provider_signature(content)
+ placeholder_count, placeholder_samples = check_placeholders_remaining(content)
+
+ # Display results
+ exit_code = display_results(
+ args.file, checklist, missing,
+ smart_complete, smart_missing,
+ has_hipaa, has_signature,
+ placeholder_count, placeholder_samples
+ )
+
+ sys.exit(exit_code)
+
+
+if __name__ == '__main__':
+ main()
+
diff --git a/scientific-skills/treatment-plans/scripts/generate_template.py b/scientific-skills/treatment-plans/scripts/generate_template.py
new file mode 100644
index 0000000..a5860c5
--- /dev/null
+++ b/scientific-skills/treatment-plans/scripts/generate_template.py
@@ -0,0 +1,244 @@
+#!/usr/bin/env python3
+"""
+Generate Treatment Plan Template
+Interactive script to select and generate treatment plan templates.
+"""
+
+import os
+import sys
+import shutil
+import argparse
+from pathlib import Path
+from datetime import datetime
+
+# Template types and descriptions
+TEMPLATES = {
+ 'general_medical': {
+ 'name': 'General Medical Treatment Plan',
+ 'file': 'general_medical_treatment_plan.tex',
+ 'description': 'For primary care and chronic disease management (diabetes, hypertension, etc.)'
+ },
+ 'rehabilitation': {
+ 'name': 'Rehabilitation Treatment Plan',
+ 'file': 'rehabilitation_treatment_plan.tex',
+ 'description': 'For physical therapy, occupational therapy, and rehabilitation services'
+ },
+ 'mental_health': {
+ 'name': 'Mental Health Treatment Plan',
+ 'file': 'mental_health_treatment_plan.tex',
+ 'description': 'For psychiatric and behavioral health treatment'
+ },
+ 'chronic_disease': {
+ 'name': 'Chronic Disease Management Plan',
+ 'file': 'chronic_disease_management_plan.tex',
+ 'description': 'For complex multimorbidity and long-term care coordination'
+ },
+ 'perioperative': {
+ 'name': 'Perioperative Care Plan',
+ 'file': 'perioperative_care_plan.tex',
+ 'description': 'For surgical and procedural patient management'
+ },
+ 'pain_management': {
+ 'name': 'Pain Management Plan',
+ 'file': 'pain_management_plan.tex',
+ 'description': 'For acute and chronic pain treatment (multimodal approach)'
+ }
+}
+
+
+def get_templates_dir():
+ """Get the path to the templates directory."""
+ # Assume script is in .claude/skills/treatment-plans/scripts/
+ script_dir = Path(__file__).parent
+ templates_dir = script_dir.parent / 'assets'
+ return templates_dir
+
+
+def list_templates():
+ """Display available templates."""
+ print("\n" + "="*70)
+ print("AVAILABLE TREATMENT PLAN TEMPLATES")
+ print("="*70)
+
+ for i, (key, info) in enumerate(TEMPLATES.items(), 1):
+ print(f"\n{i}. {info['name']}")
+ print(f" Type: {key}")
+ print(f" File: {info['file']}")
+ print(f" Description: {info['description']}")
+
+ print("\n" + "="*70)
+
+
+def interactive_selection():
+ """Interactive template selection."""
+ list_templates()
+
+ while True:
+ try:
+ choice = input("\nSelect template number (1-6) or 'q' to quit: ").strip().lower()
+
+ if choice == 'q':
+ print("Exiting...")
+ sys.exit(0)
+
+ choice_num = int(choice)
+
+ if 1 <= choice_num <= len(TEMPLATES):
+ template_key = list(TEMPLATES.keys())[choice_num - 1]
+ return template_key
+ else:
+ print(f"Please enter a number between 1 and {len(TEMPLATES)}.")
+ except ValueError:
+ print("Invalid input. Please enter a number or 'q' to quit.")
+
+
+def get_output_filename(template_key, custom_name=None):
+ """Generate output filename."""
+ if custom_name:
+ # Ensure .tex extension
+ if not custom_name.endswith('.tex'):
+ custom_name += '.tex'
+ return custom_name
+
+ # Default: template_key_YYYYMMDD.tex
+ timestamp = datetime.now().strftime('%Y%m%d')
+ return f"{template_key}_plan_{timestamp}.tex"
+
+
+def copy_template(template_key, output_path):
+ """Copy template to output location."""
+ templates_dir = get_templates_dir()
+ template_file = TEMPLATES[template_key]['file']
+ source_path = templates_dir / template_file
+
+ if not source_path.exists():
+ raise FileNotFoundError(f"Template not found: {source_path}")
+
+ # Create output directory if it doesn't exist
+ output_path = Path(output_path)
+ output_path.parent.mkdir(parents=True, exist_ok=True)
+
+ # Copy template
+ shutil.copy2(source_path, output_path)
+
+ return output_path
+
+
+def display_success(output_path, template_key):
+ """Display success message with next steps."""
+ template_info = TEMPLATES[template_key]
+
+ print("\n" + "="*70)
+ print("✓ TEMPLATE GENERATED SUCCESSFULLY")
+ print("="*70)
+ print(f"\nTemplate: {template_info['name']}")
+ print(f"Output file: {output_path}")
+ print(f"File size: {os.path.getsize(output_path):,} bytes")
+
+ print("\n" + "-"*70)
+ print("NEXT STEPS:")
+ print("-"*70)
+
+ print("\n1. CUSTOMIZE THE TEMPLATE:")
+ print(" - Open the .tex file in your LaTeX editor")
+ print(" - Replace all [bracketed placeholders] with patient-specific information")
+ print(" - Remove or modify sections as appropriate for your patient")
+
+ print("\n2. COMPILE TO PDF:")
+ print(f" $ pdflatex {output_path.name}")
+
+ print("\n3. VALIDATE (optional):")
+ print(f" $ python check_completeness.py {output_path.name}")
+ print(f" $ python validate_treatment_plan.py {output_path.name}")
+
+ print("\n4. DE-IDENTIFY BEFORE SHARING:")
+ print(" - Remove all HIPAA identifiers (18 identifiers)")
+ print(" - See regulatory_compliance.md reference for details")
+
+ print("\n" + "="*70)
+
+
+def main():
+ parser = argparse.ArgumentParser(
+ description='Generate treatment plan template',
+ formatter_class=argparse.RawDescriptionHelpFormatter,
+ epilog="""
+Examples:
+ # Interactive mode (recommended for first-time users)
+ python generate_template.py
+
+ # Direct generation with type specification
+ python generate_template.py --type general_medical --output diabetes_plan.tex
+
+ # Generate with default filename
+ python generate_template.py --type mental_health
+
+ # List available templates
+ python generate_template.py --list
+
+Available template types:
+ general_medical, rehabilitation, mental_health, chronic_disease,
+ perioperative, pain_management
+ """
+ )
+
+ parser.add_argument(
+ '--type',
+ choices=list(TEMPLATES.keys()),
+ help='Template type to generate'
+ )
+
+ parser.add_argument(
+ '--output',
+ help='Output filename (default: auto-generated with timestamp)'
+ )
+
+ parser.add_argument(
+ '--list',
+ action='store_true',
+ help='List available templates and exit'
+ )
+
+ args = parser.parse_args()
+
+ # List templates and exit
+ if args.list:
+ list_templates()
+ return
+
+ # Determine template type
+ if args.type:
+ template_key = args.type
+ print(f"\nGenerating template: {TEMPLATES[template_key]['name']}")
+ else:
+ # Interactive mode
+ template_key = interactive_selection()
+
+ # Determine output filename
+ if args.output:
+ output_filename = args.output
+ else:
+ output_filename = get_output_filename(template_key)
+
+ # Default output to current directory
+ output_path = Path.cwd() / output_filename
+
+ # Confirm overwrite if file exists
+ if output_path.exists():
+ response = input(f"\nFile {output_filename} already exists. Overwrite? (y/n): ").strip().lower()
+ if response != 'y':
+ print("Cancelled.")
+ return
+
+ # Copy template
+ try:
+ output_path = copy_template(template_key, output_path)
+ display_success(output_path, template_key)
+ except Exception as e:
+ print(f"\n✗ ERROR: {e}", file=sys.stderr)
+ sys.exit(1)
+
+
+if __name__ == '__main__':
+ main()
+
diff --git a/scientific-skills/treatment-plans/scripts/timeline_generator.py b/scientific-skills/treatment-plans/scripts/timeline_generator.py
new file mode 100644
index 0000000..b311804
--- /dev/null
+++ b/scientific-skills/treatment-plans/scripts/timeline_generator.py
@@ -0,0 +1,369 @@
+#!/usr/bin/env python3
+"""
+Treatment Timeline Generator
+Generates visual treatment timelines from treatment plan files.
+"""
+
+import sys
+import re
+import argparse
+from pathlib import Path
+from datetime import datetime, timedelta
+from typing import List, Dict, Tuple
+
+# Try to import matplotlib, but make it optional
+try:
+ import matplotlib.pyplot as plt
+ import matplotlib.dates as mdates
+ from matplotlib.patches import Rectangle
+ HAS_MATPLOTLIB = True
+except ImportError:
+ HAS_MATPLOTLIB = False
+
+
+def extract_timeline_info(content: str) -> Dict[str, List[Tuple[str, str]]]:
+ """
+ Extract timeline and schedule information from treatment plan.
+ Returns dict with phases, appointments, milestones.
+ """
+ timeline_data = {
+ 'phases': [],
+ 'appointments': [],
+ 'milestones': []
+ }
+
+ # Extract treatment phases
+ # Look for patterns like "Week 1-4: Description" or "Months 1-3: Description"
+ phase_patterns = [
+ r'(Week[s]?\s*\d+[-–]\d+|Month[s]?\s*\d+[-–]\d+)[:\s]+([^\n]+)',
+ r'(POD\s*\d+[-–]\d+)[:\s]+([^\n]+)',
+ r'(\d+[-–]\d+\s*week[s]?)[:\s]+([^\n]+)'
+ ]
+
+ for pattern in phase_patterns:
+ matches = re.findall(pattern, content, re.IGNORECASE)
+ for timeframe, description in matches:
+ timeline_data['phases'].append((timeframe.strip(), description.strip()))
+
+ # Extract appointments
+ # Look for patterns like "Week 2: Visit" or "Month 3: Follow-up"
+ apt_patterns = [
+ r'(Week\s*\d+|Month\s*\d+|POD\s*\d+)[:\s]+(Visit|Appointment|Follow-up|Check-up|Consultation)([^\n]*)',
+ r'(Every\s+\d+\s+\w+)[:\s]+(Visit|Appointment|therapy|session)([^\n]*)'
+ ]
+
+ for pattern in apt_patterns:
+ matches = re.findall(pattern, content, re.IGNORECASE)
+ for timeframe, visit_type, details in matches:
+ timeline_data['appointments'].append((timeframe.strip(), f"{visit_type}{details}".strip()))
+
+ # Extract milestones/assessments
+ # Look for "reassessment", "goal evaluation", "milestone" mentions
+ milestone_patterns = [
+ r'(Week\s*\d+|Month\s*\d+)[:\s]+(reassess|evaluation|assessment|milestone)([^\n]*)',
+ r'(\w+\s*\d+)[:\s]+(HbA1c|labs?|imaging|test)([^\n]*)'
+ ]
+
+ for pattern in milestone_patterns:
+ matches = re.findall(pattern, content, re.IGNORECASE)
+ for timeframe, event_type, details in matches:
+ timeline_data['milestones'].append((timeframe.strip(), f"{event_type}{details}".strip()))
+
+ return timeline_data
+
+
+def parse_timeframe_to_days(timeframe: str) -> Tuple[int, int]:
+ """
+ Parse timeframe string to start and end days.
+ Examples: "Week 1-4" -> (0, 28), "Month 3" -> (60, 90)
+ """
+ timeframe = timeframe.lower()
+
+ # Week patterns
+ if 'week' in timeframe:
+ weeks = re.findall(r'\d+', timeframe)
+ if len(weeks) == 2:
+ start_week = int(weeks[0])
+ end_week = int(weeks[1])
+ return ((start_week - 1) * 7, end_week * 7)
+ elif len(weeks) == 1:
+ week = int(weeks[0])
+ return ((week - 1) * 7, week * 7)
+
+ # Month patterns
+ if 'month' in timeframe:
+ months = re.findall(r'\d+', timeframe)
+ if len(months) == 2:
+ start_month = int(months[0])
+ end_month = int(months[1])
+ return ((start_month - 1) * 30, end_month * 30)
+ elif len(months) == 1:
+ month = int(months[0])
+ return ((month - 1) * 30, month * 30)
+
+ # POD (post-operative day) patterns
+ if 'pod' in timeframe:
+ days = re.findall(r'\d+', timeframe)
+ if len(days) == 2:
+ return (int(days[0]), int(days[1]))
+ elif len(days) == 1:
+ day = int(days[0])
+ return (day, day + 1)
+
+ # Default fallback
+ return (0, 7)
+
+
+def create_text_timeline(timeline_data: Dict, output_file: Path = None):
+ """Create a text-based timeline representation."""
+
+ lines = []
+ lines.append("="*70)
+ lines.append("TREATMENT TIMELINE")
+ lines.append("="*70)
+
+ # Treatment phases
+ if timeline_data['phases']:
+ lines.append("\nTREATMENT PHASES:")
+ lines.append("-"*70)
+ for timeframe, description in timeline_data['phases']:
+ lines.append(f"{timeframe:20s} | {description}")
+
+ # Appointments
+ if timeline_data['appointments']:
+ lines.append("\nSCHEDULED APPOINTMENTS:")
+ lines.append("-"*70)
+ for timeframe, details in timeline_data['appointments']:
+ lines.append(f"{timeframe:20s} | {details}")
+
+ # Milestones
+ if timeline_data['milestones']:
+ lines.append("\nMILESTONES & ASSESSMENTS:")
+ lines.append("-"*70)
+ for timeframe, event in timeline_data['milestones']:
+ lines.append(f"{timeframe:20s} | {event}")
+
+ lines.append("\n" + "="*70)
+
+ # Output
+ output_text = "\n".join(lines)
+
+ if output_file:
+ with open(output_file, 'w') as f:
+ f.write(output_text)
+ print(f"\nText timeline saved to: {output_file}")
+ else:
+ print(output_text)
+
+ return output_text
+
+
+def create_visual_timeline(timeline_data: Dict, output_file: Path, start_date: str = None):
+ """Create a visual Gantt-chart style timeline (requires matplotlib)."""
+
+ if not HAS_MATPLOTLIB:
+ print("Error: matplotlib not installed. Install with: pip install matplotlib", file=sys.stderr)
+ print("Generating text timeline instead...", file=sys.stderr)
+ text_output = output_file.with_suffix('.txt')
+ create_text_timeline(timeline_data, text_output)
+ return
+
+ # Parse start date
+ if start_date:
+ try:
+ start = datetime.strptime(start_date, '%Y-%m-%d')
+ except ValueError:
+ print(f"Invalid date format: {start_date}. Using today.", file=sys.stderr)
+ start = datetime.now()
+ else:
+ start = datetime.now()
+
+ # Prepare data for plotting
+ phases = []
+ for timeframe, description in timeline_data['phases']:
+ start_day, end_day = parse_timeframe_to_days(timeframe)
+ phases.append({
+ 'name': f"{timeframe}: {description[:40]}",
+ 'start': start + timedelta(days=start_day),
+ 'end': start + timedelta(days=end_day),
+ 'type': 'phase'
+ })
+
+ # Add appointments as events
+ events = []
+ for timeframe, details in timeline_data['appointments']:
+ start_day, _ = parse_timeframe_to_days(timeframe)
+ events.append({
+ 'name': f"{timeframe}: {details[:40]}",
+ 'date': start + timedelta(days=start_day),
+ 'type': 'appointment'
+ })
+
+ # Add milestones
+ for timeframe, event in timeline_data['milestones']:
+ start_day, _ = parse_timeframe_to_days(timeframe)
+ events.append({
+ 'name': f"{timeframe}: {event[:40]}",
+ 'date': start + timedelta(days=start_day),
+ 'type': 'milestone'
+ })
+
+ # Create figure
+ fig, ax = plt.subplots(figsize=(12, 8))
+
+ # Plot phases as horizontal bars
+ y_position = len(phases) + len(events)
+
+ for i, phase in enumerate(phases):
+ duration = (phase['end'] - phase['start']).days
+ ax.barh(y_position - i, duration, left=mdates.date2num(phase['start']),
+ height=0.6, color='steelblue', alpha=0.7, edgecolor='black')
+ ax.text(mdates.date2num(phase['start']) + duration/2, y_position - i,
+ phase['name'], va='center', ha='center', fontsize=9, color='white', weight='bold')
+
+ # Plot events as markers
+ event_y = y_position - len(phases) - 1
+
+ for i, event in enumerate(events):
+ marker = 'o' if event['type'] == 'appointment' else 's'
+ color = 'green' if event['type'] == 'appointment' else 'orange'
+ ax.plot(mdates.date2num(event['date']), event_y - i, marker=marker,
+ markersize=10, color=color, markeredgecolor='black')
+ ax.text(mdates.date2num(event['date']) + 2, event_y - i, event['name'],
+ va='center', ha='left', fontsize=8)
+
+ # Format x-axis as dates
+ ax.xaxis.set_major_formatter(mdates.DateFormatter('%b %Y'))
+ ax.xaxis.set_major_locator(mdates.MonthLocator())
+ plt.xticks(rotation=45, ha='right')
+
+ # Labels and title
+ ax.set_xlabel('Date', fontsize=12, weight='bold')
+ ax.set_title('Treatment Plan Timeline', fontsize=14, weight='bold', pad=20)
+ ax.set_yticks([])
+ ax.grid(axis='x', alpha=0.3, linestyle='--')
+
+ # Legend
+ from matplotlib.lines import Line2D
+ legend_elements = [
+ Rectangle((0, 0), 1, 1, fc='steelblue', alpha=0.7, edgecolor='black', label='Treatment Phase'),
+ Line2D([0], [0], marker='o', color='w', markerfacecolor='green', markersize=10,
+ markeredgecolor='black', label='Appointment'),
+ Line2D([0], [0], marker='s', color='w', markerfacecolor='orange', markersize=10,
+ markeredgecolor='black', label='Milestone/Assessment')
+ ]
+ ax.legend(handles=legend_elements, loc='upper right', framealpha=0.9)
+
+ plt.tight_layout()
+
+ # Save
+ plt.savefig(output_file, dpi=300, bbox_inches='tight')
+ print(f"\nVisual timeline saved to: {output_file}")
+
+ # Close plot
+ plt.close()
+
+
+def main():
+ parser = argparse.ArgumentParser(
+ description='Generate treatment timeline visualization',
+ formatter_class=argparse.RawDescriptionHelpFormatter,
+ epilog="""
+Examples:
+ # Generate text timeline
+ python timeline_generator.py --plan my_plan.tex
+
+ # Generate visual timeline (requires matplotlib)
+ python timeline_generator.py --plan my_plan.tex --output timeline.png --visual
+
+ # Specify start date for visual timeline
+ python timeline_generator.py --plan my_plan.tex --output timeline.pdf --visual --start 2025-02-01
+
+Output formats:
+ Text: .txt
+ Visual: .png, .pdf, .svg (requires matplotlib)
+
+Note: Visual timeline generation requires matplotlib.
+ Install with: pip install matplotlib
+ """
+ )
+
+ parser.add_argument(
+ '--plan',
+ type=Path,
+ required=True,
+ help='Treatment plan file to analyze (.tex format)'
+ )
+
+ parser.add_argument(
+ '--output',
+ type=Path,
+ help='Output file (default: timeline.txt or timeline.png if --visual)'
+ )
+
+ parser.add_argument(
+ '--visual',
+ action='store_true',
+ help='Generate visual timeline (requires matplotlib)'
+ )
+
+ parser.add_argument(
+ '--start',
+ help='Start date for timeline (YYYY-MM-DD format, default: today)'
+ )
+
+ args = parser.parse_args()
+
+ # Check plan file exists
+ if not args.plan.exists():
+ print(f"Error: File not found: {args.plan}", file=sys.stderr)
+ sys.exit(1)
+
+ # Read plan
+ try:
+ with open(args.plan, 'r', encoding='utf-8') as f:
+ content = f.read()
+ except Exception as e:
+ print(f"Error reading file: {e}", file=sys.stderr)
+ sys.exit(1)
+
+ # Extract timeline information
+ print("Extracting timeline information from treatment plan...")
+ timeline_data = extract_timeline_info(content)
+
+ # Check if any timeline info found
+ total_items = (len(timeline_data['phases']) +
+ len(timeline_data['appointments']) +
+ len(timeline_data['milestones']))
+
+ if total_items == 0:
+ print("\nWarning: No timeline information detected in treatment plan.", file=sys.stderr)
+ print("The plan may not contain structured timeline/schedule sections.", file=sys.stderr)
+ print("\nTip: Include sections with timeframes like:", file=sys.stderr)
+ print(" - Week 1-4: Initial phase", file=sys.stderr)
+ print(" - Month 3: Follow-up visit", file=sys.stderr)
+ sys.exit(1)
+
+ print(f"Found {len(timeline_data['phases'])} phase(s), "
+ f"{len(timeline_data['appointments'])} appointment(s), "
+ f"{len(timeline_data['milestones'])} milestone(s)")
+
+ # Determine output file
+ if not args.output:
+ if args.visual:
+ args.output = Path('timeline.png')
+ else:
+ args.output = Path('timeline.txt')
+
+ # Generate timeline
+ if args.visual:
+ create_visual_timeline(timeline_data, args.output, args.start)
+ else:
+ create_text_timeline(timeline_data, args.output)
+
+ print(f"\nTimeline generation complete!")
+
+
+if __name__ == '__main__':
+ main()
+
diff --git a/scientific-skills/treatment-plans/scripts/validate_treatment_plan.py b/scientific-skills/treatment-plans/scripts/validate_treatment_plan.py
new file mode 100644
index 0000000..742f9c4
--- /dev/null
+++ b/scientific-skills/treatment-plans/scripts/validate_treatment_plan.py
@@ -0,0 +1,367 @@
+#!/usr/bin/env python3
+"""
+Validate Treatment Plan Quality
+Comprehensive validation of treatment plan content quality and compliance.
+"""
+
+import sys
+import re
+import argparse
+from pathlib import Path
+from typing import Dict, List, Tuple
+
+# Validation criteria and patterns
+VALIDATION_CHECKS = {
+ 'smart_goals': {
+ 'name': 'SMART Goals Criteria',
+ 'patterns': [
+ (r'\bspecific\b', 'Specific criterion'),
+ (r'\bmeasurable\b', 'Measurable criterion'),
+ (r'\bachievable\b', 'Achievable criterion'),
+ (r'\brelevant\b', 'Relevant criterion'),
+ (r'\btime[- ]?bound\b', 'Time-bound criterion')
+ ]
+ },
+ 'evidence_based': {
+ 'name': 'Evidence-Based Practice',
+ 'patterns': [
+ (r'guideline|evidence|study|trial|research', 'Evidence/guideline references'),
+ (r'\\cite\{|\\bibitem\{|\\bibliography\{', 'Citations present')
+ ]
+ },
+ 'patient_centered': {
+ 'name': 'Patient-Centered Care',
+ 'patterns': [
+ (r'patient.*preference|shared decision|patient.*value|patient.*priority', 'Patient preferences'),
+ (r'quality of life|functional.*goal|patient.*goal', 'Functional/QoL goals')
+ ]
+ },
+ 'safety': {
+ 'name': 'Safety and Risk Mitigation',
+ 'patterns': [
+ (r'adverse.*effect|side effect|risk|complication', 'Adverse effects mentioned'),
+ (r'monitoring|warning sign|emergency|when to call', 'Safety monitoring plan')
+ ]
+ },
+ 'medication': {
+ 'name': 'Medication Documentation',
+ 'patterns': [
+ (r'\\d+\s*mg|\\d+\s*mcg|dose|dosage', 'Specific doses'),
+ (r'daily|BID|TID|QID|once|twice', 'Frequency specified'),
+ (r'rationale|indication|because|for', 'Rationale provided')
+ ]
+ }
+}
+
+
+def read_file(filepath: Path) -> str:
+ """Read and return file contents."""
+ try:
+ with open(filepath, 'r', encoding='utf-8') as f:
+ return f.read()
+ except Exception as e:
+ print(f"Error reading file: {e}", file=sys.stderr)
+ sys.exit(2)
+
+
+def validate_content(content: str) -> Dict[str, Tuple[int, int, List[str]]]:
+ """
+ Validate content against criteria.
+ Returns dict with results: {category: (passed, total, missing_items)}
+ """
+ results = {}
+
+ for category, checks in VALIDATION_CHECKS.items():
+ patterns = checks['patterns']
+ passed = 0
+ missing = []
+
+ for pattern, description in patterns:
+ if re.search(pattern, content, re.IGNORECASE):
+ passed += 1
+ else:
+ missing.append(description)
+
+ total = len(patterns)
+ results[category] = (passed, total, missing)
+
+ return results
+
+
+def check_icd10_codes(content: str) -> Tuple[bool, int]:
+ """Check for ICD-10 code presence."""
+ # ICD-10 format: Letter followed by 2 digits, optionally more digits/letters
+ pattern = r'\b[A-TV-Z]\d{2}\.?[\dA-TV-Z]*\b'
+ matches = re.findall(pattern, content)
+
+ has_codes = len(matches) > 0
+ count = len(matches)
+
+ return has_codes, count
+
+
+def check_timeframes(content: str) -> Tuple[bool, List[str]]:
+ """Check for specific timeframes in goals."""
+ timeframe_patterns = [
+ r'\d+\s*week',
+ r'\d+\s*month',
+ r'\d+\s*day',
+ r'within\s+\d+',
+ r'by\s+\w+\s+\d+'
+ ]
+
+ found_timeframes = []
+ for pattern in timeframe_patterns:
+ matches = re.findall(pattern, content, re.IGNORECASE)
+ found_timeframes.extend(matches[:3]) # Limit to avoid too many
+
+ has_timeframes = len(found_timeframes) > 0
+
+ return has_timeframes, found_timeframes[:5]
+
+
+def check_quantitative_goals(content: str) -> Tuple[bool, List[str]]:
+ """Check for quantitative/measurable goals."""
+ # Look for numbers with units in goal context
+ patterns = [
+ r'\d+\s*%', # Percentages (HbA1c 7%)
+ r'\d+/\d+', # Ratios (BP 130/80)
+ r'\d+\s*mg/dL', # Lab values
+ r'\d+\s*mmHg', # Blood pressure
+ r'\d+\s*feet|meters', # Distance
+ r'\d+\s*pounds|lbs|kg', # Weight
+ r'\d+/10', # Pain scales
+ r'\d+\s*minutes|hours' # Time
+ ]
+
+ found_metrics = []
+ for pattern in patterns:
+ matches = re.findall(pattern, content, re.IGNORECASE)
+ found_metrics.extend(matches[:2])
+
+ has_metrics = len(found_metrics) > 0
+
+ return has_metrics, found_metrics[:5]
+
+
+def assess_readability(content: str) -> str:
+ """Basic readability assessment (very simplified)."""
+ # Remove LaTeX commands for word count
+ text_content = re.sub(r'\\[a-zA-Z]+(\{[^}]*\})?', '', content)
+ text_content = re.sub(r'[{}%\\]', '', text_content)
+
+ words = text_content.split()
+ word_count = len(words)
+
+ # Very rough sentences (periods followed by space/newline)
+ sentences = re.split(r'[.!?]+\s+', text_content)
+ sentence_count = len([s for s in sentences if s.strip()])
+
+ if sentence_count > 0:
+ avg_words_per_sentence = word_count / sentence_count
+
+ if avg_words_per_sentence < 15:
+ return "Simple (good for patient materials)"
+ elif avg_words_per_sentence < 25:
+ return "Moderate (appropriate for professional documentation)"
+ else:
+ return "Complex (may be difficult for some readers)"
+
+ return "Unable to assess"
+
+
+def display_validation_results(filepath: Path, results: Dict,
+ has_icd10: bool, icd10_count: int,
+ has_timeframes: bool, timeframe_examples: List[str],
+ has_metrics: bool, metric_examples: List[str],
+ readability: str):
+ """Display comprehensive validation results."""
+
+ print("\n" + "="*70)
+ print("TREATMENT PLAN QUALITY VALIDATION")
+ print("="*70)
+ print(f"\nFile: {filepath}")
+ print(f"File size: {filepath.stat().st_size:,} bytes")
+
+ # Overall quality score
+ total_passed = sum(r[0] for r in results.values())
+ total_checks = sum(r[1] for r in results.values())
+ quality_pct = (total_passed / total_checks) * 100 if total_checks > 0 else 0
+
+ print("\n" + "-"*70)
+ print("OVERALL QUALITY SCORE")
+ print("-"*70)
+ print(f"Validation checks passed: {total_passed}/{total_checks} ({quality_pct:.0f}%)")
+
+ # Detailed category results
+ print("\n" + "-"*70)
+ print("QUALITY CRITERIA ASSESSMENT")
+ print("-"*70)
+
+ for category, (passed, total, missing) in results.items():
+ category_name = VALIDATION_CHECKS[category]['name']
+ pct = (passed / total) * 100 if total > 0 else 0
+ status = "✓" if passed == total else "⚠" if passed > 0 else "✗"
+
+ print(f"\n{status} {category_name}: {passed}/{total} ({pct:.0f}%)")
+
+ if missing:
+ print(" Missing:")
+ for item in missing:
+ print(f" • {item}")
+
+ # Specific checks
+ print("\n" + "-"*70)
+ print("SPECIFIC VALIDATION CHECKS")
+ print("-"*70)
+
+ # ICD-10 codes
+ if has_icd10:
+ print(f"✓ ICD-10 diagnosis codes present ({icd10_count} found)")
+ else:
+ print("✗ No ICD-10 diagnosis codes detected")
+ print(" Recommendation: Include ICD-10 codes for all diagnoses")
+
+ # Timeframes
+ if has_timeframes:
+ print(f"✓ Time-bound goals present")
+ if timeframe_examples:
+ print(" Examples:", ", ".join(timeframe_examples[:3]))
+ else:
+ print("✗ No specific timeframes found in goals")
+ print(" Recommendation: Add specific timeframes (e.g., 'within 3 months', '8 weeks')")
+
+ # Measurable metrics
+ if has_metrics:
+ print(f"✓ Quantitative/measurable goals present")
+ if metric_examples:
+ print(" Examples:", ", ".join(metric_examples[:3]))
+ else:
+ print("⚠ Limited quantitative metrics found")
+ print(" Recommendation: Include specific measurable targets (HbA1c <7%, BP <130/80)")
+
+ # Readability
+ print(f"\nReadability assessment: {readability}")
+
+ # Summary and recommendations
+ print("\n" + "="*70)
+ print("SUMMARY AND RECOMMENDATIONS")
+ print("="*70)
+
+ if quality_pct >= 90:
+ print("\n✓ EXCELLENT quality - Treatment plan meets high standards")
+ elif quality_pct >= 75:
+ print("\n✓ GOOD quality - Treatment plan is well-developed with minor areas for improvement")
+ elif quality_pct >= 60:
+ print("\n⚠ FAIR quality - Several important elements need strengthening")
+ else:
+ print("\n✗ NEEDS IMPROVEMENT - Significant quality issues to address")
+
+ # Specific recommendations
+ print("\nKey Recommendations:")
+
+ recommendations = []
+
+ # SMART goals
+ if results['smart_goals'][0] < results['smart_goals'][1]:
+ recommendations.append("Ensure all goals meet SMART criteria (Specific, Measurable, Achievable, Relevant, Time-bound)")
+
+ # Evidence-based
+ if results['evidence_based'][0] == 0:
+ recommendations.append("Add evidence-based rationale and cite clinical practice guidelines")
+
+ # Patient-centered
+ if results['patient_centered'][0] < results['patient_centered'][1]:
+ recommendations.append("Incorporate patient preferences and functional quality-of-life goals")
+
+ # Safety
+ if results['safety'][0] < results['safety'][1]:
+ recommendations.append("Include comprehensive safety monitoring and risk mitigation strategies")
+
+ # Medication documentation
+ if results['medication'][0] < results['medication'][1]:
+ recommendations.append("Document medications with specific doses, frequencies, and rationales")
+
+ if not has_icd10:
+ recommendations.append("Add ICD-10 diagnosis codes for billing and documentation support")
+
+ if not has_timeframes:
+ recommendations.append("Add specific timeframes to all treatment goals")
+
+ if recommendations:
+ for i, rec in enumerate(recommendations, 1):
+ print(f"{i}. {rec}")
+ else:
+ print("None - Treatment plan demonstrates excellent quality across all criteria!")
+
+ print("\n" + "="*70)
+
+ # Return exit code
+ return 0 if quality_pct >= 70 else 1
+
+
+def main():
+ parser = argparse.ArgumentParser(
+ description='Validate treatment plan quality and compliance',
+ formatter_class=argparse.RawDescriptionHelpFormatter,
+ epilog="""
+Examples:
+ # Validate a treatment plan
+ python validate_treatment_plan.py my_plan.tex
+
+ # Use in automated workflows (exits with error if quality <70%)
+ python validate_treatment_plan.py plan.tex && echo "Quality check passed"
+
+Validation Categories:
+ - SMART goals criteria (Specific, Measurable, Achievable, Relevant, Time-bound)
+ - Evidence-based practice (guidelines, citations)
+ - Patient-centered care (preferences, functional goals)
+ - Safety and risk mitigation (adverse effects, monitoring)
+ - Medication documentation (doses, frequencies, rationales)
+ - ICD-10 coding, timeframes, measurable metrics
+
+Exit Codes:
+ 0 - Quality ≥70% (acceptable)
+ 1 - Quality <70% (needs improvement)
+ 2 - File error or invalid arguments
+ """
+ )
+
+ parser.add_argument(
+ 'file',
+ type=Path,
+ help='Treatment plan file to validate (.tex format)'
+ )
+
+ args = parser.parse_args()
+
+ # Check file exists
+ if not args.file.exists():
+ print(f"Error: File not found: {args.file}", file=sys.stderr)
+ sys.exit(2)
+
+ # Read and validate
+ content = read_file(args.file)
+
+ # Run validation checks
+ results = validate_content(content)
+ has_icd10, icd10_count = check_icd10_codes(content)
+ has_timeframes, timeframe_examples = check_timeframes(content)
+ has_metrics, metric_examples = check_quantitative_goals(content)
+ readability = assess_readability(content)
+
+ # Display results
+ exit_code = display_validation_results(
+ args.file, results,
+ has_icd10, icd10_count,
+ has_timeframes, timeframe_examples,
+ has_metrics, metric_examples,
+ readability
+ )
+
+ sys.exit(exit_code)
+
+
+if __name__ == '__main__':
+ main()
+
diff --git a/scientific-skills/venue-templates/SKILL.md b/scientific-skills/venue-templates/SKILL.md
new file mode 100644
index 0000000..e636e6c
--- /dev/null
+++ b/scientific-skills/venue-templates/SKILL.md
@@ -0,0 +1,626 @@
+---
+name: venue-templates
+description: Access comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
+allowed-tools: [Read, Write, Edit, Bash]
+---
+
+# Venue Templates
+
+## Overview
+
+Access comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues, academic conferences, research posters, and grant proposals. This skill provides ready-to-use templates and detailed specifications for successful academic submissions across disciplines.
+
+Use this skill when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
+
+## When to Use This Skill
+
+This skill should be used when:
+- Preparing a manuscript for submission to a specific journal (Nature, Science, PLOS, IEEE, etc.)
+- Writing a conference paper with specific formatting requirements (NeurIPS, ICML, CHI, etc.)
+- Creating an academic research poster for conferences
+- Drafting grant proposals for federal agencies (NSF, NIH, DOE, DARPA) or private foundations
+- Checking formatting requirements and page limits for target venues
+- Customizing templates with author information and project details
+- Verifying document compliance with venue specifications
+
+## Visual Enhancement with Scientific Schematics
+
+**When creating documents with this skill, always consider adding scientific diagrams and schematics to enhance visual communication.**
+
+If your document does not already contain schematics or diagrams:
+- Use the **scientific-schematics** skill to generate AI-powered publication-quality diagrams
+- Simply describe your desired diagram in natural language
+- Nano Banana Pro will automatically generate, review, and refine the schematic
+
+**For new documents:** Scientific schematics should be generated by default to visually represent key concepts, workflows, architectures, or relationships described in the text.
+
+**How to generate schematics:**
+```bash
+python scripts/generate_schematic.py "your diagram description" -o figures/output.png
+```
+
+The AI will automatically:
+- Create publication-quality images with proper formatting
+- Review and refine through multiple iterations
+- Ensure accessibility (colorblind-friendly, high contrast)
+- Save outputs in the figures/ directory
+
+**When to add schematics:**
+- Methodology flowcharts for papers
+- Conceptual framework diagrams
+- System architecture illustrations
+- Data flow diagrams
+- Experimental design visualizations
+- Research workflow diagrams
+- Any complex concept that benefits from visualization
+
+For detailed guidance on creating schematics, refer to the scientific-schematics skill documentation.
+
+---
+
+## Core Capabilities
+
+### 1. Journal Article Templates
+
+Access LaTeX templates and formatting guidelines for 50+ major scientific journals across disciplines:
+
+**Nature Portfolio**:
+- Nature, Nature Methods, Nature Biotechnology, Nature Machine Intelligence
+- Nature Communications, Nature Protocols
+- Scientific Reports
+
+**Science Family**:
+- Science, Science Advances, Science Translational Medicine
+- Science Immunology, Science Robotics
+
+**PLOS (Public Library of Science)**:
+- PLOS ONE, PLOS Biology, PLOS Computational Biology
+- PLOS Medicine, PLOS Genetics
+
+**Cell Press**:
+- Cell, Neuron, Immunity, Cell Reports
+- Molecular Cell, Developmental Cell
+
+**IEEE Publications**:
+- IEEE Transactions (various disciplines)
+- IEEE Access, IEEE Journal templates
+
+**ACM Publications**:
+- ACM Transactions, Communications of the ACM
+- ACM conference proceedings
+
+**Other Major Publishers**:
+- Springer journals (various disciplines)
+- Elsevier journals (custom templates)
+- Wiley journals
+- BMC journals
+- Frontiers journals
+
+### 2. Conference Paper Templates
+
+Conference-specific templates with proper formatting for major academic conferences:
+
+**Machine Learning & AI**:
+- NeurIPS (Neural Information Processing Systems)
+- ICML (International Conference on Machine Learning)
+- ICLR (International Conference on Learning Representations)
+- CVPR (Computer Vision and Pattern Recognition)
+- AAAI (Association for the Advancement of Artificial Intelligence)
+
+**Computer Science**:
+- ACM CHI (Human-Computer Interaction)
+- SIGKDD (Knowledge Discovery and Data Mining)
+- EMNLP (Empirical Methods in Natural Language Processing)
+- SIGIR (Information Retrieval)
+- USENIX conferences
+
+**Biology & Bioinformatics**:
+- ISMB (Intelligent Systems for Molecular Biology)
+- RECOMB (Research in Computational Molecular Biology)
+- PSB (Pacific Symposium on Biocomputing)
+
+**Engineering**:
+- IEEE conference templates (various disciplines)
+- ASME, AIAA conferences
+
+### 3. Research Poster Templates
+
+Academic poster templates for conference presentations:
+
+**Standard Formats**:
+- A0 (841 × 1189 mm / 33.1 × 46.8 in)
+- A1 (594 × 841 mm / 23.4 × 33.1 in)
+- 36" × 48" (914 × 1219 mm) - Common US size
+- 42" × 56" (1067 × 1422 mm)
+- 48" × 36" (landscape orientation)
+
+**Template Packages**:
+- **beamerposter**: Classic academic poster template
+- **tikzposter**: Modern, colorful poster design
+- **baposter**: Structured multi-column layout
+
+**Design Features**:
+- Optimal font sizes for readability at distance
+- Color schemes (colorblind-safe palettes)
+- Grid layouts and column structures
+- QR code integration for supplementary materials
+
+### 4. Grant Proposal Templates
+
+Templates and formatting requirements for major funding agencies:
+
+**NSF (National Science Foundation)**:
+- Full proposal template (15-page project description)
+- Project Summary (1 page: Overview, Intellectual Merit, Broader Impacts)
+- Budget and budget justification
+- Biographical sketch (3-page limit)
+- Facilities, Equipment, and Other Resources
+- Data Management Plan
+
+**NIH (National Institutes of Health)**:
+- R01 Research Grant (multi-year)
+- R21 Exploratory/Developmental Grant
+- K Awards (Career Development)
+- Specific Aims Page (1 page, most critical component)
+- Research Strategy (Significance, Innovation, Approach)
+- Biographical sketches (5-page limit)
+
+**DOE (Department of Energy)**:
+- Office of Science proposals
+- ARPA-E templates
+- Technology Readiness Level (TRL) descriptions
+- Commercialization and impact sections
+
+**DARPA (Defense Advanced Research Projects Agency)**:
+- BAA (Broad Agency Announcement) responses
+- Heilmeier Catechism framework
+- Technical approach and milestones
+- Transition planning
+
+**Private Foundations**:
+- Gates Foundation
+- Wellcome Trust
+- Howard Hughes Medical Institute (HHMI)
+- Chan Zuckerberg Initiative (CZI)
+
+## Workflow: Finding and Using Templates
+
+### Step 1: Identify Target Venue
+
+Determine the specific publication venue, conference, or funding agency:
+
+```
+Example queries:
+- "I need to submit to Nature"
+- "What are the requirements for NeurIPS 2025?"
+- "Show me NSF proposal formatting"
+- "I'm creating a poster for ISMB"
+```
+
+### Step 2: Query Template and Requirements
+
+Access venue-specific templates and formatting guidelines:
+
+**For Journals**:
+```bash
+# Load journal formatting requirements
+Reference: references/journals_formatting.md
+Search for: "Nature" or specific journal name
+
+# Retrieve template
+Template: assets/journals/nature_article.tex
+```
+
+**For Conferences**:
+```bash
+# Load conference formatting
+Reference: references/conferences_formatting.md
+Search for: "NeurIPS" or specific conference
+
+# Retrieve template
+Template: assets/journals/neurips_article.tex
+```
+
+**For Posters**:
+```bash
+# Load poster guidelines
+Reference: references/posters_guidelines.md
+
+# Retrieve template
+Template: assets/posters/beamerposter_academic.tex
+```
+
+**For Grants**:
+```bash
+# Load grant requirements
+Reference: references/grants_requirements.md
+Search for: "NSF" or specific agency
+
+# Retrieve template
+Template: assets/grants/nsf_proposal_template.tex
+```
+
+### Step 3: Review Formatting Requirements
+
+Check critical specifications before customizing:
+
+**Key Requirements to Verify**:
+- Page limits (varies by venue)
+- Font size and family
+- Margin specifications
+- Line spacing
+- Citation style (APA, Vancouver, Nature, etc.)
+- Figure/table requirements
+- File format (PDF, Word, LaTeX source)
+- Anonymization (for double-blind review)
+- Supplementary material limits
+
+### Step 4: Customize Template
+
+Use helper scripts or manual customization:
+
+**Option 1: Helper Script (Recommended)**:
+```bash
+python scripts/customize_template.py \
+ --template assets/journals/nature_article.tex \
+ --title "Your Paper Title" \
+ --authors "First Author, Second Author" \
+ --affiliations "University Name" \
+ --output my_nature_paper.tex
+```
+
+**Option 2: Manual Editing**:
+- Open template file
+- Replace placeholder text (marked with comments)
+- Fill in title, authors, affiliations, abstract
+- Add your content to each section
+
+### Step 5: Validate Format
+
+Check compliance with venue requirements:
+
+```bash
+python scripts/validate_format.py \
+ --file my_paper.pdf \
+ --venue "Nature" \
+ --check-all
+```
+
+**Validation Checks**:
+- Page count within limits
+- Font sizes correct
+- Margins meet specifications
+- References formatted correctly
+- Figures meet resolution requirements
+
+### Step 6: Compile and Review
+
+Compile LaTeX and review output:
+
+```bash
+# Compile LaTeX
+pdflatex my_paper.tex
+bibtex my_paper
+pdflatex my_paper.tex
+pdflatex my_paper.tex
+
+# Or use latexmk for automated compilation
+latexmk -pdf my_paper.tex
+```
+
+Review checklist:
+- [ ] All sections present and properly formatted
+- [ ] Citations render correctly
+- [ ] Figures appear with proper captions
+- [ ] Page count within limits
+- [ ] Author guidelines followed
+- [ ] Supplementary materials prepared (if needed)
+
+## Integration with Other Skills
+
+This skill works seamlessly with other scientific skills:
+
+### Scientific Writing
+- Use **scientific-writing** skill for content guidance (IMRaD structure, clarity, precision)
+- Apply venue-specific templates from this skill for formatting
+- Combine for complete manuscript preparation
+
+### Literature Review
+- Use **literature-review** skill for systematic literature search and synthesis
+- Apply appropriate citation style from venue requirements
+- Format references according to template specifications
+
+### Peer Review
+- Use **peer-review** skill to evaluate manuscript quality
+- Use this skill to verify formatting compliance
+- Ensure adherence to reporting guidelines (CONSORT, STROBE, etc.)
+
+### Research Grants
+- Cross-reference with **research-grants** skill for content strategy
+- Use this skill for agency-specific templates and formatting
+- Combine for comprehensive grant proposal preparation
+
+### LaTeX Posters
+- This skill provides venue-agnostic poster templates
+- Use for conference-specific poster requirements
+- Integrate with visualization skills for figure creation
+
+## Template Categories
+
+### By Document Type
+
+| Category | Template Count | Common Venues |
+|----------|---------------|---------------|
+| **Journal Articles** | 30+ | Nature, Science, PLOS, IEEE, ACM, Cell Press |
+| **Conference Papers** | 20+ | NeurIPS, ICML, CVPR, CHI, ISMB |
+| **Research Posters** | 10+ | A0, A1, 36×48, various packages |
+| **Grant Proposals** | 15+ | NSF, NIH, DOE, DARPA, foundations |
+
+### By Discipline
+
+| Discipline | Supported Venues |
+|------------|------------------|
+| **Life Sciences** | Nature, Cell Press, PLOS, ISMB, RECOMB |
+| **Physical Sciences** | Science, Physical Review, ACS, APS |
+| **Engineering** | IEEE, ASME, AIAA, ACM |
+| **Computer Science** | ACM, IEEE, NeurIPS, ICML, ICLR |
+| **Medicine** | NEJM, Lancet, JAMA, BMJ |
+| **Interdisciplinary** | PNAS, Nature Communications, Science Advances |
+
+## Helper Scripts
+
+### query_template.py
+
+Search and retrieve templates by venue name, type, or keywords:
+
+```bash
+# Find templates for a specific journal
+python scripts/query_template.py --venue "Nature" --type "article"
+
+# Search by keyword
+python scripts/query_template.py --keyword "machine learning"
+
+# List all available templates
+python scripts/query_template.py --list-all
+
+# Get requirements for a venue
+python scripts/query_template.py --venue "NeurIPS" --requirements
+```
+
+### customize_template.py
+
+Customize templates with author and project information:
+
+```bash
+# Basic customization
+python scripts/customize_template.py \
+ --template assets/journals/nature_article.tex \
+ --output my_paper.tex
+
+# With author information
+python scripts/customize_template.py \
+ --template assets/journals/nature_article.tex \
+ --title "Novel Approach to Protein Folding" \
+ --authors "Jane Doe, John Smith, Alice Johnson" \
+ --affiliations "MIT, Stanford, Harvard" \
+ --email "[email protected]" \
+ --output my_paper.tex
+
+# Interactive mode
+python scripts/customize_template.py --interactive
+```
+
+### validate_format.py
+
+Check document compliance with venue requirements:
+
+```bash
+# Validate a compiled PDF
+python scripts/validate_format.py \
+ --file my_paper.pdf \
+ --venue "Nature" \
+ --check-all
+
+# Check specific aspects
+python scripts/validate_format.py \
+ --file my_paper.pdf \
+ --venue "NeurIPS" \
+ --check page-count,margins,fonts
+
+# Generate validation report
+python scripts/validate_format.py \
+ --file my_paper.pdf \
+ --venue "Science" \
+ --report validation_report.txt
+```
+
+## Best Practices
+
+### Template Selection
+1. **Verify currency**: Check template date and compare with latest author guidelines
+2. **Check official sources**: Many journals provide official LaTeX classes
+3. **Test compilation**: Compile template before adding content
+4. **Read comments**: Templates include helpful inline comments
+
+### Customization
+1. **Preserve structure**: Don't remove required sections or packages
+2. **Follow placeholders**: Replace marked placeholder text systematically
+3. **Maintain formatting**: Don't override venue-specific formatting
+4. **Keep backups**: Save original template before customization
+
+### Compliance
+1. **Check page limits**: Verify before final submission
+2. **Validate citations**: Use correct citation style for venue
+3. **Test figures**: Ensure figures meet resolution requirements
+4. **Review anonymization**: Remove identifying information if required
+
+### Submission
+1. **Follow instructions**: Read complete author guidelines
+2. **Include all files**: LaTeX source, figures, bibliography
+3. **Generate properly**: Use recommended compilation method
+4. **Check output**: Verify PDF matches expectations
+
+## Common Formatting Requirements
+
+### Page Limits (Typical)
+
+| Venue Type | Typical Limit | Notes |
+|------------|---------------|-------|
+| **Nature Article** | 5 pages | ~3000 words excluding refs |
+| **Science Report** | 5 pages | Figures count toward limit |
+| **PLOS ONE** | No limit | Unlimited length |
+| **NeurIPS** | 8 pages | + unlimited refs/appendix |
+| **ICML** | 8 pages | + unlimited refs/appendix |
+| **NSF Proposal** | 15 pages | Project description only |
+| **NIH R01** | 12 pages | Research strategy |
+
+### Citation Styles by Venue
+
+| Venue | Citation Style | Format |
+|-------|---------------|--------|
+| **Nature** | Numbered (superscript) | Nature style |
+| **Science** | Numbered (superscript) | Science style |
+| **PLOS** | Numbered (brackets) | Vancouver |
+| **Cell Press** | Author-year | Cell style |
+| **ACM** | Numbered | ACM style |
+| **IEEE** | Numbered (brackets) | IEEE style |
+| **APA journals** | Author-year | APA 7th |
+
+### Figure Requirements
+
+| Venue | Resolution | Format | Color |
+|-------|-----------|--------|-------|
+| **Nature** | 300+ dpi | TIFF, EPS, PDF | RGB or CMYK |
+| **Science** | 300+ dpi | TIFF, PDF | RGB |
+| **PLOS** | 300-600 dpi | TIFF, EPS | RGB |
+| **IEEE** | 300+ dpi | EPS, PDF | RGB or Grayscale |
+
+## Resources
+
+### Bundled Resources
+
+**References** (in `references/`):
+- `journals_formatting.md`: Comprehensive journal formatting requirements
+- `conferences_formatting.md`: Conference paper specifications
+- `posters_guidelines.md`: Research poster design and sizing
+- `grants_requirements.md`: Grant proposal requirements by agency
+
+**Templates** (in `assets/`):
+- `journals/`: Journal article LaTeX templates
+- `posters/`: Research poster templates
+- `grants/`: Grant proposal templates
+
+**Scripts** (in `scripts/`):
+- `query_template.py`: Search and retrieve templates
+- `customize_template.py`: Customize with author info
+- `validate_format.py`: Check compliance with requirements
+
+### External Resources
+
+**Journal Author Guidelines**:
+- Nature: https://www.nature.com/nature/for-authors
+- Science: https://www.science.org/content/page/instructions-authors
+- PLOS: https://plos.org/resources/for-authors/
+- Cell Press: https://www.cell.com/author-guidelines
+
+**Conference Formatting**:
+- NeurIPS: https://neurips.cc/Conferences/2024/CallForPapers
+- ICML: https://icml.cc/Conferences/2024/StyleAuthorInstructions
+- CVPR: https://cvpr.thecvf.com/Conferences/2024/AuthorGuidelines
+
+**Grant Resources**:
+- NSF PAPPG: https://www.nsf.gov/publications/pub_summ.jsp?ods_key=pappg
+- NIH Forms: https://grants.nih.gov/grants/how-to-apply-application-guide.html
+- DOE Funding: https://science.osti.gov/grants
+
+## Example Usage
+
+### Example 1: Nature Article Submission
+
+```markdown
+User: "I need to prepare a manuscript for Nature"
+
+Response:
+1. Load Nature formatting requirements (references/journals_formatting.md)
+2. Retrieve Nature template (assets/journals/nature_article.tex)
+3. Key requirements:
+ - Length: ~3000 words, ~5 pages
+ - Format: Single column, 12pt font
+ - Citations: Numbered superscript (Nature style)
+ - Figures: 300+ dpi, RGB color
+4. Customize template with your title, authors, affiliations
+5. Compile and validate against requirements
+```
+
+### Example 2: NeurIPS Conference Paper
+
+```markdown
+User: "What are the formatting requirements for NeurIPS?"
+
+Response:
+From references/conferences_formatting.md:
+- Page limit: 8 pages main text + unlimited references/appendix
+- Format: Two-column, 10pt font
+- Template: neurips_2024.sty (official style file)
+- Anonymization: Required for initial submission
+- Citations: Numbered (brackets)
+- Figures: High resolution, colorblind-safe recommended
+```
+
+### Example 3: NSF Proposal
+
+```markdown
+User: "Help me format an NSF proposal"
+
+Response:
+NSF requirements (from references/grants_requirements.md):
+- Project Description: 15 pages maximum
+- Project Summary: 1 page (Overview, Intellectual Merit, Broader Impacts)
+- Budget Justification: 3-5 pages
+- Biographical Sketch: 3 pages per senior personnel
+- Font: Minimum 10pt, Times Roman or similar
+- Margins: 1 inch all sides
+Template: assets/grants/nsf_proposal_template.tex
+```
+
+### Example 4: Conference Poster
+
+```markdown
+User: "I need to create a poster for ISMB"
+
+Response:
+ISMB poster specifications:
+- Size: Typically A0 portrait (33.1 × 46.8 inches)
+- Recommended template: beamerposter or tikzposter
+- Font sizes: Title 60-85pt, Headers 36-48pt, Body 24-32pt
+- Include: QR code for paper/supplementary materials
+Available templates:
+- assets/posters/beamerposter_academic.tex
+- assets/posters/tikzposter_research.tex
+```
+
+## Updates and Maintenance
+
+**Template Currency**:
+- Templates updated annually or when venues release new guidelines
+- Last updated: 2024
+- Check official venue sites for most current requirements
+
+**Reporting Issues**:
+- Template compilation errors
+- Outdated formatting requirements
+- Missing venue templates
+- Incorrect specifications
+
+## Summary
+
+The venue-templates skill provides comprehensive access to:
+
+1. **50+ publication venue templates** across disciplines
+2. **Detailed formatting requirements** for journals, conferences, posters, grants
+3. **Helper scripts** for template discovery, customization, and validation
+4. **Integration** with other scientific writing skills
+5. **Best practices** for successful academic submissions
+
+Use this skill whenever you need venue-specific formatting guidance or templates for academic publishing.
+
diff --git a/scientific-skills/venue-templates/assets/grants/nih_specific_aims.tex b/scientific-skills/venue-templates/assets/grants/nih_specific_aims.tex
new file mode 100644
index 0000000..be46fa9
--- /dev/null
+++ b/scientific-skills/venue-templates/assets/grants/nih_specific_aims.tex
@@ -0,0 +1,235 @@
+% NIH Specific Aims Page Template
+% THE MOST CRITICAL PAGE OF YOUR NIH PROPOSAL
+% 1 page maximum - strictly enforced
+% Last updated: 2024
+
+\documentclass[11pt,letterpaper]{article}
+
+% Formatting
+\usepackage[margin=0.5in]{geometry} % 0.5 inch minimum margins
+\usepackage{helvet} % Arial-like font
+\renewcommand{\familydefault}{\sfdefault}
+
+\usepackage{setspace}
+\usepackage{color}
+\usepackage{soul} % For highlighting (remove in final version)
+
+% Remove page numbers (optional)
+\pagestyle{empty}
+
+\begin{document}
+
+% Optional: Highlight template text to remind yourself to replace
+% Remove \hl{} and color in final version
+\definecolor{highlight}{RGB}{255,255,200}
+\sethlcolor{highlight}
+
+% ====================
+% SPECIFIC AIMS PAGE
+% ====================
+
+\begin{center}
+\textbf{\large Your Project Title Here: Concise and Descriptive}
+\end{center}
+
+\vspace{0.3cm}
+
+% OPENING PARAGRAPH: The Hook and Gap
+% 2-3 sentences establishing significance and the knowledge gap
+
+\textbf{[Disease/condition]} affects \textbf{[number]} people worldwide and results in \textbf{[burden: mortality, morbidity, cost]}. \textbf{[Current treatment/understanding]} has improved outcomes, but \textbf{[limitation/gap]} remains a critical barrier to \textbf{[desired outcome]}. Understanding \textbf{[specific mechanism/relationship]} is essential for \textbf{[future advance: therapy, prevention, diagnosis]}.
+
+\vspace{0.2cm}
+
+% LONG-TERM GOAL
+% 1 sentence on your overarching research vision
+
+Our \textbf{long-term goal} is to \textbf{[overarching vision: develop cure, understand mechanism, improve treatment]} for \textbf{[disease/population]}.
+
+\vspace{0.2cm}
+
+% OBJECTIVE AND CENTRAL HYPOTHESIS
+% 1-2 sentences on what THIS proposal will accomplish
+
+The \textbf{objective} of this proposal is to \textbf{[specific objective for this project]}. Our \textbf{central hypothesis} is that \textbf{[clearly stated, testable hypothesis]}.
+
+\vspace{0.2cm}
+
+% RATIONALE
+% 2-3 sentences explaining WHY you expect success (preliminary data!)
+
+This hypothesis is based on our \textbf{preliminary data} showing that \textbf{[key preliminary finding 1]} and \textbf{[key preliminary finding 2]}. These findings suggest that \textbf{[mechanistic explanation or expected outcome]}.
+
+\vspace{0.2cm}
+
+% TRANSITION TO AIMS
+% 1 sentence introducing the specific aims
+
+To test this hypothesis and achieve our objective, we will pursue the following \textbf{Specific Aims}:
+
+\vspace{0.3cm}
+
+% ====================
+% SPECIFIC AIM 1
+% ====================
+
+\noindent\textbf{Specific Aim 1: [Concise, active verb title describing what you'll do].}
+
+\textit{Working Hypothesis:} \hl{State testable hypothesis for this aim.}
+
+We will \textbf{[approach/method]} to determine \textbf{[what you'll learn]}. We will use \textbf{[model system/approach]} to test whether \textbf{[specific prediction]}.
+
+\textbf{Expected Outcome:} We expect to find that \textbf{[predicted result]}. This outcome will demonstrate that \textbf{[significance of finding]} and will be \textbf{[positive/negative/innovative/transformative]} because \textbf{[why it matters]}.
+
+\vspace{0.3cm}
+
+% ====================
+% SPECIFIC AIM 2
+% ====================
+
+\noindent\textbf{Specific Aim 2: [Title of second aim].}
+
+\textit{Working Hypothesis:} \hl{Testable hypothesis for Aim 2.}
+
+Building on Aim 1, we will \textbf{[approach]} to \textbf{[objective]}. We will employ \textbf{[method/technique]} in \textbf{[model/population]} to test the hypothesis that \textbf{[specific prediction]}.
+
+\textbf{Expected Outcome:} These studies will reveal \textbf{[predicted finding]}. This is significant because \textbf{[impact on field/understanding]}.
+
+\vspace{0.3cm}
+
+% ====================
+% SPECIFIC AIM 3 (OPTIONAL)
+% ====================
+
+\noindent\textbf{Specific Aim 3: [Title of third aim].}
+
+\textit{Working Hypothesis:} \hl{Testable hypothesis for Aim 3.}
+
+To translate findings from Aims 1-2, we will \textbf{[approach]} to determine \textbf{[translational objective]}. We will \textbf{[method]} using \textbf{[clinically relevant model/patient samples]} to test whether \textbf{[translational prediction]}.
+
+\textbf{Expected Outcome:} We anticipate that \textbf{[result]}, which will provide \textbf{[proof-of-concept/validation/mechanism]} for \textbf{[therapeutic/diagnostic/preventive strategy]}.
+
+\vspace{0.3cm}
+
+% ====================
+% PAYOFF PARAGRAPH
+% ====================
+
+% 2-3 sentences on IMPACT, INNOVATION, and FUTURE DIRECTIONS
+
+\textbf{Impact and Innovation:} This project is \textbf{innovative} because it \textbf{[novel aspect: new concept, method, approach, application]}. The proposed research is \textbf{significant} because it will \textbf{[advance the field by...]} and will ultimately lead to \textbf{[long-term impact: improved treatment, new therapeutic target, diagnostic tool]}. Upon completion of these studies, we will be positioned to \textbf{[next steps: clinical trial, mechanistic studies, therapeutic development]}.
+
+\vspace{0.5cm}
+
+% ====================
+% ALTERNATIVE STRUCTURE (if preferred)
+% ====================
+
+% Some successful Specific Aims pages use this alternative structure:
+% - Open with hook (same as above)
+% - State long-term goal and objective (same)
+% - Present central hypothesis with 2-3 supporting pieces of preliminary data
+% - Then state: "We will test this hypothesis through three Specific Aims:"
+% - List aims more concisely (1-2 sentences each, plus expected outcome)
+% - Conclude with payoff paragraph emphasizing innovation, significance, impact
+
+\end{document}
+
+% ====================
+% TIPS FOR WRITING SPECIFIC AIMS
+% ====================
+
+% 1. START WITH A HOOK
+% - Open with the big picture: disease burden, societal cost, mortality
+% - Use compelling statistics
+% - Make it clear why anyone should care
+
+% 2. IDENTIFY THE GAP
+% - What's currently known?
+% - What's the critical barrier or unknown?
+% - Why does it matter?
+
+% 3. STATE YOUR HYPOTHESIS EXPLICITLY
+% - Clear, testable hypothesis
+% - Not "We hypothesize that we will study..." (that's not a hypothesis!)
+% - "We hypothesize that [mechanism] causes [outcome]"
+
+% 4. SHOW PRELIMINARY DATA
+% - Demonstrate feasibility
+% - Prove you're not starting from scratch
+% - Build confidence in your approach
+
+% 5. THREE AIMS (TYPICALLY)
+% - Can be 2 or 4, but 3 is most common
+% - Aims should be related but somewhat independent
+% - Failure of one aim shouldn't sink the whole project
+% - Aims can build on each other (Aim 1 → Aim 2 → Aim 3)
+
+% 6. EACH AIM SHOULD HAVE:
+% - Clear title (active verb)
+% - Working hypothesis
+% - Approach/method
+% - Expected outcome
+% - Significance/impact
+
+% 7. END WITH PAYOFF
+% - Innovation: What's new/different?
+% - Significance: Why does it matter?
+% - Impact: What will change?
+% - Future: Where does this lead?
+
+% 8. COMMON MISTAKES TO AVOID
+% - Too much background (this is not a mini-review)
+% - Vague hypotheses or objectives
+% - Missing expected outcomes
+% - No preliminary data mentioned
+% - Too ambitious (can't do it all in 5 years)
+% - Not addressing innovation and significance
+% - Poor logical flow between aims
+% - Exceeding 1 page (auto-reject!)
+
+% 9. FORMATTING RULES (STRICTLY ENFORCED)
+% - 1 page maximum (including all text, no figures typically)
+% - Arial 11pt minimum (or equivalent)
+% - 0.5 inch margins minimum
+% - Any spacing (single, 1.5, double acceptable)
+% - No smaller fonts allowed (even for superscripts/subscripts)
+
+% 10. REVISION STRATEGY
+% - Write, get feedback, revise 10+ times
+% - Every word must earn its place
+% - Test on non-specialist colleagues
+% - Read aloud to check flow
+% - Have it reviewed by successful R01 holders
+% - Mock study section review
+
+% ====================
+% EXAMPLES OF STRONG OPENING SENTENCES
+% ====================
+
+% DISEASE BURDEN APPROACH:
+% "Alzheimer's disease (AD) affects 6.7 million Americans and will cost $345 billion in 2023,
+% yet no disease-modifying therapies exist."
+
+% MECHANISTIC GAP APPROACH:
+% "Despite decades of research, the molecular mechanisms driving metastasis remain poorly understood,
+% limiting our ability to develop effective therapies for the 90% of cancer deaths caused by metastatic disease."
+
+% TRANSLATIONAL APPROACH:
+% "Current immunotherapies fail in 70% of patients with melanoma, largely because we cannot predict
+% who will respond, highlighting an urgent need for biomarkers of treatment response."
+
+% ====================
+% REMEMBER
+% ====================
+
+% The Specific Aims page is often the ONLY page reviewers read carefully before
+% forming their initial opinion. A weak Specific Aims page can doom an otherwise
+% excellent proposal. Invest the time to make it compelling, clear, and concise.
+
+% Get feedback from:
+% - Successful R01 awardees in your field
+% - Grant writing office at your institution
+% - Colleagues who've served on NIH study sections
+% - Non-specialists (if they can't understand it, reviewers may struggle too)
+
diff --git a/scientific-skills/venue-templates/assets/grants/nsf_proposal_template.tex b/scientific-skills/venue-templates/assets/grants/nsf_proposal_template.tex
new file mode 100644
index 0000000..83d45a3
--- /dev/null
+++ b/scientific-skills/venue-templates/assets/grants/nsf_proposal_template.tex
@@ -0,0 +1,375 @@
+% NSF Research Proposal Template
+% For NSF Standard Grant Proposals
+% Last updated: 2024
+% Based on NSF PAPPG (Proposal & Award Policies & Procedures Guide)
+
+\documentclass[11pt,letterpaper]{article}
+
+% Required formatting
+\usepackage[margin=1in]{geometry} % 1 inch margins required
+\usepackage{times} % Times Roman font (11pt minimum)
+\usepackage{graphicx}
+\usepackage{amsmath}
+\usepackage{amssymb}
+\usepackage{cite}
+\usepackage{hyperref}
+
+% Single spacing (NSF allows single spacing)
+\usepackage{setspace}
+\singlespacing
+
+% Page numbers
+\usepackage{fancyhdr}
+\pagestyle{fancy}
+\fancyhf{}
+\rhead{\thepage}
+\renewcommand{\headrulewidth}{0pt}
+
+\begin{document}
+
+% ====================
+% PROJECT SUMMARY (1 page maximum)
+% ====================
+
+\section*{Project Summary}
+
+\subsection*{Overview}
+Provide a concise 1-2 paragraph description of the proposed research. This should be understandable to a scientifically literate reader who is not a specialist in your field.
+
+\subsection*{Intellectual Merit}
+Describe how the project advances knowledge within its field and across different fields. Address:
+\begin{itemize}
+ \item How the project advances understanding in the field
+ \item Innovative aspects of the research
+ \item Qualifications of the research team
+ \item Adequacy of resources
+\end{itemize}
+
+\subsection*{Broader Impacts}
+Describe the potential benefits to society and contributions to desired societal outcomes. Address one or more of the following:
+\begin{itemize}
+ \item Advancing discovery and understanding while promoting teaching and learning
+ \item Broadening participation of underrepresented groups in STEM
+ \item Disseminating broadly to enhance scientific and technological understanding
+ \item Benefits to society (economic development, health, quality of life, national security, etc.)
+ \item Developing the scientific workforce and enhancing research infrastructure
+\end{itemize}
+
+\newpage
+
+% ====================
+% PROJECT DESCRIPTION (15 pages maximum)
+% ====================
+
+\section*{Project Description}
+
+\section{Introduction and Background}
+\subsection{Current State of Knowledge}
+Provide context for your proposed research. Review relevant literature and establish what is currently known in the field.
+
+\subsection{Knowledge Gap}
+Clearly identify the gap in current knowledge or understanding that your project will address. Explain why this gap is significant.
+
+\subsection{Preliminary Work and Feasibility}
+Describe any preliminary work that demonstrates the feasibility of your approach. Highlight your team's qualifications and prior accomplishments.
+
+\section{Research Objectives and Hypotheses}
+\subsection{Overall Goal}
+State the overarching long-term goal of your research program.
+
+\subsection{Specific Objectives}
+List 2-4 specific, measurable objectives for this project:
+\begin{enumerate}
+ \item \textbf{Objective 1:} Clearly stated objective
+ \item \textbf{Objective 2:} Second objective
+ \item \textbf{Objective 3:} Third objective
+\end{enumerate}
+
+\subsection{Hypotheses}
+State your testable hypotheses explicitly.
+
+\section{Research Plan}
+\subsection{Objective 1: [Title]}
+\subsubsection{Rationale}
+Explain why this objective is important and how it addresses the knowledge gap.
+
+\subsubsection{Approach and Methods}
+Describe in detail how you will accomplish this objective. Include:
+\begin{itemize}
+ \item Experimental design or computational approach
+ \item Methods and procedures
+ \item Data collection and analysis
+ \item Controls and validation
+\end{itemize}
+
+\subsubsection{Expected Outcomes}
+Describe what results you expect and how they will advance the field.
+
+\subsubsection{Potential Challenges and Alternatives}
+Identify potential obstacles and describe alternative approaches.
+
+\subsection{Objective 2: [Title]}
+[Repeat same structure as Objective 1]
+
+\subsection{Objective 3: [Title]}
+[Repeat same structure as Objective 1]
+
+\section{Timeline and Milestones}
+Provide a detailed timeline showing when each objective will be addressed:
+
+\begin{center}
+\begin{tabular}{|l|p{3cm}|p{3cm}|p{3cm}|}
+\hline
+\textbf{Activity} & \textbf{Year 1} & \textbf{Year 2} & \textbf{Year 3} \\
+\hline
+Objective 1 activities & Months 1-6: ... & & \\
+\hline
+Objective 2 activities & Months 7-12: ... & Months 13-18: ... & \\
+\hline
+Objective 3 activities & & Months 19-24: ... & Months 25-36: ... \\
+\hline
+Publications & & Submit paper 1 & Submit papers 2-3 \\
+\hline
+\end{tabular}
+\end{center}
+
+\section{Broader Impacts}
+\textit{Note: Broader Impacts must be substantive, not perfunctory. Integrate throughout proposal.}
+
+\subsection{Educational Activities}
+Describe specific educational activities integrated with the research:
+\begin{itemize}
+ \item Curriculum development
+ \item Training of graduate and undergraduate students
+ \item K-12 outreach programs
+ \item Public science communication
+\end{itemize}
+
+\subsection{Broadening Participation}
+Describe concrete efforts to broaden participation of underrepresented groups:
+\begin{itemize}
+ \item Recruitment strategies
+ \item Mentoring programs
+ \item Partnerships with minority-serving institutions
+ \item Measurable outcomes
+\end{itemize}
+
+\subsection{Dissemination and Outreach}
+Describe plans for broad dissemination:
+\begin{itemize}
+ \item Open-access publications
+ \item Data and code sharing (repositories, licenses)
+ \item Conference presentations and workshops
+ \item Public engagement activities
+\end{itemize}
+
+\subsection{Societal Benefits}
+Explain potential benefits to society:
+\begin{itemize}
+ \item Economic development
+ \item Health and quality of life improvements
+ \item Environmental sustainability
+ \item National security (if applicable)
+\end{itemize}
+
+\subsection{Assessment of Broader Impacts}
+Describe how you will measure the success of broader impacts activities. Include specific, measurable outcomes.
+
+\section{Results from Prior NSF Support}
+\textit{Required if PI or co-PI has received NSF funding in the past 5 years}
+
+\subsection{Award Title and Number}
+Award Number: NSF-XXXXX, Amount: \$XXX,XXX, Period: MM/YY - MM/YY
+
+\subsection{Intellectual Merit}
+Summarize research accomplishments and findings from prior award.
+
+\subsection{Broader Impacts}
+Describe broader impacts activities and outcomes from prior award.
+
+\subsection{Publications}
+List publications resulting from prior NSF support (up to 5 most significant):
+\begin{enumerate}
+ \item Author, A.A., et al. (Year). Title. \textit{Journal}, vol(issue), pages.
+\end{enumerate}
+
+\newpage
+
+% ====================
+% REFERENCES CITED (No page limit)
+% ====================
+
+\section*{References Cited}
+
+\begin{thebibliography}{99}
+
+\bibitem{ref1}
+Author, A.A., \& Author, B.B. (2023). Article title. \textit{Journal Name}, \textit{45}(3), 123-145.
+
+\bibitem{ref2}
+Author, C.C., Author, D.D., \& Author, E.E. (2022). Book title. Publisher.
+
+\bibitem{ref3}
+Author, F.F., et al. (2021). Another article. \textit{Nature}, \textit{590}, 234-238.
+
+% Add more references as needed
+
+\end{thebibliography}
+
+\newpage
+
+% ====================
+% BUDGET JUSTIFICATION (3-5 pages typical)
+% Note: Budget is submitted separately in NSF's systems
+% This justifies the budget requests
+% ====================
+
+\section*{Budget Justification}
+
+\subsection*{A. Senior Personnel}
+\textbf{PI Name (X\% academic year, Y summer months):} Justify percent effort and role in project. Summer salary calculated as X/9 of academic year salary.
+
+\textbf{Co-PI Name (X\% academic year):} Justify role and effort.
+
+\subsection*{B. Other Personnel}
+\textbf{Postdoctoral Researcher (1.0 FTE, Years 1-3):} Justify need for postdoc, qualifications required, and role in project. Salary: \$XX,XXX/year.
+
+\textbf{Graduate Student (2 students, Years 1-3):} Justify need, training opportunities, and project contributions. Stipend: \$XX,XXX/year per student.
+
+\textbf{Undergraduate Researchers (2 students/year):} Describe research training opportunities. Hourly wage: \$XX/hour.
+
+\subsection*{C. Fringe Benefits}
+List fringe benefit rates for each personnel category as determined by institution.
+
+\subsection*{D. Equipment (\$5,000+)}
+\textbf{Instrument Name (\$XX,XXX):} Justify need, explain why existing equipment inadequate, describe how it enables proposed research.
+
+\subsection*{E. Travel}
+\textbf{Domestic Conference Travel (\$X,XXX/year):} Justify conference attendance for dissemination (1-2 conferences/year for PI and students).
+
+\textbf{Field Work Travel (\$X,XXX):} If applicable, justify field site visits.
+
+\subsection*{F. Participant Support Costs}
+\textit{If hosting workshop, summer program, etc.}
+
+Stipends, travel, and per diem for XX participants attending [workshop/program name].
+
+\subsection*{G. Other Direct Costs}
+\textbf{Materials and Supplies (\$X,XXX/year):} Itemize major categories (e.g., chemicals, consumables, software licenses).
+
+\textbf{Publication Costs (\$X,XXX):} Budget for open-access publication fees (estimate X papers @ \$X,XXX each).
+
+\textbf{Subaward to Partner Institution (\$XX,XXX):} Justify collaboration and subaward amount.
+
+\textbf{Other:} Justify any other costs.
+
+\subsection*{H. Indirect Costs}
+Calculated at XX\% of Modified Total Direct Costs (institution's negotiated rate).
+
+\newpage
+
+% ====================
+% DATA MANAGEMENT PLAN (2 pages maximum)
+% ====================
+
+\section*{Data Management Plan}
+
+\subsection*{Types of Data}
+Describe the types of data to be generated by the project:
+\begin{itemize}
+ \item Experimental data (e.g., measurements, observations)
+ \item Computational data (e.g., simulation results, models)
+ \item Metadata describing data collection and processing
+\end{itemize}
+
+\subsection*{Data and Metadata Standards}
+Describe standards to be used for data format and metadata:
+\begin{itemize}
+ \item File formats (e.g., HDF5, NetCDF, CSV)
+ \item Metadata standards (e.g., Dublin Core, domain-specific standards)
+ \item Documentation of data collection and processing
+\end{itemize}
+
+\subsection*{Policies for Access and Sharing}
+Describe how data will be made accessible:
+\begin{itemize}
+ \item Repository for data deposition (e.g., Dryad, Zenodo, domain-specific archive)
+ \item Timeline for public release (immediately upon publication, or within X months)
+ \item Access restrictions (if any) and justification
+ \item Embargo periods (if applicable)
+\end{itemize}
+
+\subsection*{Policies for Re-use, Redistribution}
+Describe terms for re-use:
+\begin{itemize}
+ \item Licensing (e.g., CC0, CC-BY, specific data use agreement)
+ \item Attribution requirements
+ \item Restrictions on commercial use (if any)
+\end{itemize}
+
+\subsection*{Plans for Archiving and Preservation}
+Describe long-term preservation strategy:
+\begin{itemize}
+ \item Repository selection (long-term, stable repositories)
+ \item Preservation period (minimum 3-5 years post-project)
+ \item Data formats for long-term preservation
+ \item Institutional commitments
+\end{itemize}
+
+\subsection*{Roles and Responsibilities}
+Identify who is responsible for data management implementation.
+
+\end{document}
+
+% ====================
+% ADDITIONAL DOCUMENTS (submitted separately in NSF system)
+% ====================
+
+% 1. BIOGRAPHICAL SKETCH (3 pages per person)
+% - Use NSF-approved format (SciENcv or NSF template)
+% - Professional preparation
+% - Appointments
+% - Products (up to 5 most relevant, up to 5 other significant)
+% - Synergistic activities
+
+% 2. CURRENT AND PENDING SUPPORT
+% - All current and pending support for all senior personnel
+% - Use NSF format
+% - Check for overlap with proposed project
+
+% 3. FACILITIES, EQUIPMENT, AND OTHER RESOURCES
+% - Describe available facilities and equipment
+% - Computational resources
+% - Laboratory space
+% - Other resources supporting the project
+
+% ====================
+% FORMATTING CHECKLIST
+% ====================
+
+% ☐ Margins: 1 inch on all sides
+% ☐ Font: Times Roman 11pt or larger (or equivalent)
+% ☐ Line spacing: Single spacing acceptable
+% ☐ Project Summary: 1 page, includes Overview, Intellectual Merit, Broader Impacts
+% ☐ Project Description: 15 pages maximum
+% ☐ References Cited: No page limit, consistent formatting
+% ☐ Biographical Sketches: 3 pages per person, NSF-approved format
+% ☐ Budget Justification: Detailed and reasonable
+% ☐ Data Management Plan: 2 pages maximum
+% ☐ Current & Pending: Complete and accurate
+% ☐ Facilities: Adequate resources described
+% ☐ Broader Impacts: Substantive and integrated throughout
+% ☐ All required sections included
+
+% ====================
+% SUBMISSION NOTES
+% ====================
+
+% 1. Submit through Research.gov or Grants.gov
+% 2. Follow your institution's internal deadlines (usually 3-5 days before NSF deadline)
+% 3. Obtain institutional approval before submission
+% 4. Ensure all senior personnel have NSF IDs
+% 5. Budget prepared in NSF's system (separate from this document)
+% 6. Check program-specific requirements (may differ from standard grant)
+% 7. Contact Program Officer for guidance (encouraged but not required)
+
diff --git a/scientific-skills/venue-templates/assets/journals/nature_article.tex b/scientific-skills/venue-templates/assets/journals/nature_article.tex
new file mode 100644
index 0000000..713b406
--- /dev/null
+++ b/scientific-skills/venue-templates/assets/journals/nature_article.tex
@@ -0,0 +1,171 @@
+% Nature Journal Article Template
+% For submission to Nature family journals
+% Last updated: 2024
+
+\documentclass[12pt]{article}
+
+% Packages
+\usepackage[margin=2.5cm]{geometry}
+\usepackage{times}
+\usepackage{graphicx}
+\usepackage{amsmath}
+\usepackage{amssymb}
+\usepackage{hyperref}
+\usepackage{lineno} % Line numbers for review
+\usepackage[super]{natbib} % Superscript citations
+
+% Line numbering (required for submission)
+\linenumbers
+
+% Title and Authors
+\title{Insert Your Title Here: Concise and Descriptive}
+
+\author{
+First Author\textsuperscript{1}, Second Author\textsuperscript{1,2}, Third Author\textsuperscript{2,*}
+}
+
+\date{}
+
+\begin{document}
+
+\maketitle
+
+% Affiliations
+\noindent
+\textsuperscript{1}Department Name, Institution Name, City, State/Province, Postal Code, Country \\
+\textsuperscript{2}Second Department/Institution \\
+\textsuperscript{*}Correspondence: [email protected]
+
+% Abstract
+\begin{abstract}
+\noindent
+Write a concise abstract of 150-200 words summarizing the main findings, significance, and conclusions of your work. The abstract should be self-contained and understandable without reading the full paper. Focus on what you did, what you found, and why it matters. Avoid jargon and abbreviations where possible.
+\end{abstract}
+
+% Main Text
+\section*{Introduction}
+% 2-3 paragraphs setting the context
+Provide background on the research area, establish the importance of the problem, and identify the knowledge gap your work addresses. Nature papers should emphasize broad significance beyond a narrow specialty.
+
+State your main research question or objective clearly.
+
+Briefly preview your approach and key findings.
+
+\section*{Results}
+% Primary results section
+% Organize by finding, not by experiment
+% Reference figures/tables as you describe results
+
+\subsection*{First major finding}
+Describe your first key result. Reference Figure~\ref{fig:example} to support your findings.
+
+\begin{figure}[ht]
+\centering
+% Include your figure here
+% \includegraphics[width=0.7\textwidth]{figure1.pdf}
+\caption{{\bf Figure title in bold.} Detailed figure caption explaining what is shown, experimental conditions, sample sizes (n), statistical tests, and significance levels. Panels should be labeled (a), (b), etc. if multiple panels are present.}
+\label{fig:example}
+\end{figure}
+
+\subsection*{Second major finding}
+Describe your second key result objectively, without interpretation.
+
+\subsection*{Third major finding}
+Describe additional results as needed.
+
+\section*{Discussion}
+% Interpret results, compare to literature, acknowledge limitations
+
+\subsection*{Main findings and interpretation}
+Summarize your key findings and explain their significance. How do they advance our understanding?
+
+\subsection*{Comparison to previous work}
+Compare and contrast your results with existing literature\cite{example2023}.
+
+\subsection*{Implications}
+Discuss the broader implications of your work for the field and beyond.
+
+\subsection*{Limitations and future directions}
+Honestly acknowledge limitations and suggest future research directions.
+
+\section*{Conclusions}
+Provide a concise conclusion summarizing the main take-home messages of your work.
+
+\section*{Methods}
+% Detailed methods allowing reproducibility
+% Can be placed after main text in Nature
+
+\subsection*{Experimental design}
+Describe overall experimental design, including controls.
+
+\subsection*{Sample preparation}
+Detail procedures for sample collection, preparation, and handling.
+
+\subsection*{Data collection}
+Describe instrumentation, measurement procedures, and data collection protocols.
+
+\subsection*{Data analysis}
+Explain analytical methods, statistical tests, and software used. State sample sizes, replication, and significance thresholds.
+
+\subsection*{Ethical approval}
+Include relevant ethical approval statements (human subjects, animal use, biosafety).
+
+\section*{Data availability}
+State where data supporting the findings can be accessed (repository, supplementary files, available on request).
+
+\section*{Code availability}
+If applicable, provide information on code availability (GitHub, Zenodo, etc.).
+
+\section*{Acknowledgements}
+Acknowledge funding sources, technical assistance, and other contributions. List grant numbers.
+
+\section*{Author contributions}
+Describe contributions of each author using CRediT taxonomy or similar (conceptualization, methodology, investigation, writing, etc.).
+
+\section*{Competing interests}
+Declare any financial or non-financial competing interests. If none, state "The authors declare no competing interests."
+
+% References
+\bibliographystyle{naturemag} % Nature bibliography style
+\bibliography{references} % Your .bib file
+
+% Alternatively, manually format references:
+\begin{thebibliography}{99}
+
+\bibitem{example2023}
+Smith, J. D., Jones, M. L. \& Williams, K. R. Groundbreaking discovery in the field. \textit{Nature} \textbf{600}, 123--130 (2023).
+
+\bibitem{author2022}
+Author, A. A. \& Coauthor, B. B. Another important paper. \textit{Nat. Methods} \textbf{19}, 456--
+
+460 (2022).
+
+% Add more references as needed
+
+\end{thebibliography}
+
+% Figure Legends (if not included with figures)
+\section*{Figure Legends}
+
+\textbf{Figure 1 | Figure title.} Comprehensive figure legend describing all panels, experimental conditions, sample sizes, and statistical analyses.
+
+\textbf{Figure 2 | Second figure title.} Another detailed legend.
+
+% Extended Data Figures (optional - supplementary figures)
+\section*{Extended Data}
+
+\textbf{Extended Data Figure 1 | Supplementary data title.} Description of supplementary figure supporting main findings.
+
+\end{document}
+
+% Notes for Authors:
+% 1. Nature articles are typically ~3,000 words excluding Methods, References, Figure Legends
+% 2. Use superscript numbered citations (1, 2, 3)
+% 3. Figures should be high resolution (300+ dpi for photos, 1000 dpi for line art)
+% 4. Submit figures as separate files (TIFF, EPS, or PDF)
+% 5. Double-space the manuscript for review
+% 6. Include line numbers using \linenumbers
+% 7. Follow Nature's specific author guidelines for your target journal
+% 8. Methods section can be quite detailed and placed after main text
+% 9. Check word limits and specific requirements for your Nature family journal
+
diff --git a/scientific-skills/venue-templates/assets/journals/neurips_article.tex b/scientific-skills/venue-templates/assets/journals/neurips_article.tex
new file mode 100644
index 0000000..8098961
--- /dev/null
+++ b/scientific-skills/venue-templates/assets/journals/neurips_article.tex
@@ -0,0 +1,283 @@
+% NeurIPS Conference Paper Template
+% For submission to Neural Information Processing Systems (NeurIPS)
+% Last updated: 2024
+% Note: Use the official neurips_2024.sty file from the conference website
+
+\documentclass{article}
+
+% Required packages (neurips_2024.sty provides most formatting)
+\usepackage{neurips_2024} % Official NeurIPS style file (download from conference site)
+
+% Recommended packages
+\usepackage{amsmath}
+\usepackage{amssymb}
+\usepackage{amsthm}
+\usepackage{graphicx}
+\usepackage{algorithm}
+\usepackage{algorithmic}
+\usepackage{hyperref}
+\usepackage{url}
+\usepackage{booktabs} % For better tables
+\usepackage{multirow}
+\usepackage{microtype} % Improved typography
+
+% Theorems, lemmas, etc.
+\newtheorem{theorem}{Theorem}
+\newtheorem{lemma}{Lemma}
+\newtheorem{proposition}{Proposition}
+\newtheorem{corollary}{Corollary}
+\newtheorem{definition}{Definition}
+
+% Title and Authors
+\title{Your Paper Title: Concise and Descriptive \\ (Maximum Two Lines)}
+
+% Authors - ANONYMIZED for initial submission
+% For initial submission (double-blind review):
+\author{
+ Anonymous Authors \\
+ Anonymous Institution(s) \\
+}
+
+% For camera-ready version (after acceptance):
+% \author{
+% First Author \\
+% Department of Computer Science \\
+% University Name \\
+% City, State, Postal Code \\
+% \texttt{first.author@university.edu} \\
+% \And
+% Second Author \\
+% Company/Institution Name \\
+% Address \\
+% \texttt{second.author@company.com} \\
+% \And
+% Third Author \\
+% Institution \\
+% \texttt{third.author@institution.edu}
+% }
+
+\begin{document}
+
+\maketitle
+
+\begin{abstract}
+Write a concise abstract (150-250 words) summarizing your contributions. The abstract should clearly state: (1) the problem you address, (2) your approach/method, (3) key results/findings, and (4) significance/implications. Make it accessible to a broad machine learning audience.
+\end{abstract}
+
+\section{Introduction}
+\label{sec:introduction}
+
+Introduce the problem you're addressing and its significance in machine learning or AI. Motivate why this problem is important and challenging.
+
+\subsection{Background and Motivation}
+Provide necessary background for understanding your work. Explain the gap in current methods or knowledge.
+
+\subsection{Contributions}
+Clearly state your main contributions as a bulleted list:
+\begin{itemize}
+ \item First contribution: e.g., "We propose a novel architecture for..."
+ \item Second contribution: e.g., "We provide theoretical analysis showing..."
+ \item Third contribution: e.g., "We demonstrate state-of-the-art performance on..."
+\end{itemize}
+
+\subsection{Paper Organization}
+Briefly describe the structure of the remainder of the paper.
+
+\section{Related Work}
+\label{sec:related}
+
+Discuss relevant prior work and how your work differs. Organize by themes or approaches rather than chronologically. Be fair and accurate in describing others' work.
+
+Cite key papers \cite{lecun2015deep, vaswani2017attention, devlin2019bert} and explain how your work builds upon or differs from them.
+
+\section{Problem Formulation}
+\label{sec:problem}
+
+Formally define the problem you're solving. Include mathematical notation and definitions.
+
+\subsection{Notation}
+Define your notation clearly. For example:
+\begin{itemize}
+ \item $\mathcal{X}$: input space
+ \item $\mathcal{Y}$: output space
+ \item $f: \mathcal{X} \rightarrow \mathcal{Y}$: function to learn
+ \item $\mathcal{D} = \{(x_i, y_i)\}_{i=1}^n$: training dataset
+\end{itemize}
+
+\subsection{Objective}
+State your learning objective formally, e.g.:
+\begin{equation}
+\min_{\theta} \mathbb{E}_{(x,y) \sim \mathcal{D}} \left[ \mathcal{L}(f_\theta(x), y) \right]
+\end{equation}
+where $\mathcal{L}$ is the loss function and $\theta$ are model parameters.
+
+\section{Method}
+\label{sec:method}
+
+Describe your proposed method in detail. This is the core technical contribution of your paper.
+
+\subsection{Model Architecture}
+Describe the architecture of your model with sufficient detail for reproduction. Include figures if helpful.
+
+\begin{figure}[t]
+\centering
+% \includegraphics[width=0.8\textwidth]{architecture.pdf}
+\caption{Model architecture diagram. Describe the key components and data flow. Use colorblind-safe colors.}
+\label{fig:architecture}
+\end{figure}
+
+\subsection{Training Procedure}
+Explain how you train the model, including:
+\begin{algorithm}[t]
+\caption{Training Algorithm}
+\label{alg:training}
+\begin{algorithmic}[1]
+\STATE \textbf{Input:} Training data $\mathcal{D}$, learning rate $\alpha$
+\STATE \textbf{Output:} Trained parameters $\theta$
+\STATE Initialize $\theta$ randomly
+\FOR{epoch $= 1$ to $T$}
+ \FOR{batch $(x, y)$ in $\mathcal{D}$}
+ \STATE Compute loss: $\mathcal{L} = \mathcal{L}(f_\theta(x), y)$
+ \STATE Update: $\theta \leftarrow \theta - \alpha \nabla_\theta \mathcal{L}$
+ \ENDFOR
+\ENDFOR
+\RETURN $\theta$
+\end{algorithmic}
+\end{algorithm}
+
+\subsection{Key Components}
+Describe key technical innovations or components in detail.
+
+\section{Theoretical Analysis}
+\label{sec:theory}
+
+If applicable, provide theoretical analysis of your method.
+
+\begin{theorem}
+\label{thm:main}
+State your main theoretical result here.
+\end{theorem}
+
+\begin{proof}
+Provide proof or sketch of proof. Full proofs can go in the appendix.
+\end{proof}
+
+\section{Experiments}
+\label{sec:experiments}
+
+Describe your experimental setup and results.
+
+\subsection{Experimental Setup}
+\textbf{Datasets:} Describe datasets used (e.g., ImageNet, CIFAR-10, etc.).
+
+\textbf{Baselines:} List baseline methods for comparison.
+
+\textbf{Implementation Details:} Provide implementation details including hyperparameters, hardware, training time.
+
+\textbf{Evaluation Metrics:} Define metrics used (accuracy, F1, AUC, etc.).
+
+\subsection{Main Results}
+Present your main experimental results.
+
+\begin{table}[t]
+\centering
+\caption{Performance comparison on benchmark datasets. Bold indicates best performance. Results reported as mean ± std over 3 runs.}
+\label{tab:main_results}
+\begin{tabular}{lcccc}
+\toprule
+Method & Dataset 1 & Dataset 2 & Dataset 3 & Average \\
+\midrule
+Baseline 1 & 85.3 ± 0.5 & 72.1 ± 0.8 & 90.2 ± 0.3 & 82.5 \\
+Baseline 2 & 87.2 ± 0.4 & 74.5 ± 0.6 & 91.1 ± 0.5 & 84.3 \\
+\textbf{Our Method} & \textbf{91.7 ± 0.3} & \textbf{79.8 ± 0.5} & \textbf{94.3 ± 0.2} & \textbf{88.6} \\
+\bottomrule
+\end{tabular}
+\end{table}
+
+\subsection{Ablation Studies}
+Conduct ablation studies to understand which components contribute to performance.
+
+\subsection{Analysis}
+Provide deeper analysis of results, failure cases, limitations, etc.
+
+\section{Discussion}
+\label{sec:discussion}
+
+Discuss your findings, limitations, and broader implications.
+
+\subsection{Limitations}
+Honestly acknowledge limitations of your work.
+
+\subsection{Broader Impacts}
+Discuss potential positive and negative societal impacts (required by NeurIPS).
+
+\section{Conclusion}
+\label{sec:conclusion}
+
+Summarize your main contributions and findings. Suggest future research directions.
+
+% Acknowledgments (add after acceptance, not in submission version)
+\section*{Acknowledgments}
+Thank collaborators, funding sources (with grant numbers), and compute resources. Not included in double-blind submission.
+
+% References
+\bibliographystyle{plainnat} % or other NeurIPS-compatible style
+\bibliography{references} % Your .bib file
+
+% Appendix (optional, unlimited pages)
+\appendix
+
+\section{Additional Proofs}
+\label{app:proofs}
+
+Provide full proofs of theorems here.
+
+\section{Additional Experimental Results}
+\label{app:experiments}
+
+Include additional experiments, more ablations, qualitative results, etc.
+
+\section{Hyperparameters}
+\label{app:hyperparameters}
+
+List all hyperparameters used in experiments for reproducibility.
+
+\begin{table}[h]
+\centering
+\caption{Hyperparameters used in all experiments}
+\begin{tabular}{ll}
+\toprule
+Hyperparameter & Value \\
+\midrule
+Learning rate & 0.001 \\
+Batch size & 64 \\
+Optimizer & Adam \\
+Weight decay & 0.0001 \\
+Epochs & 100 \\
+\bottomrule
+\end{tabular}
+\end{table}
+
+\section{Code and Data}
+\label{app:code}
+
+Provide links to code repository (anonymized for review, e.g., anonymous GitHub):
+\begin{itemize}
+ \item Code: \url{https://anonymous.4open.science/r/project-XXXX}
+ \item Data: Available upon request / at [repository]
+\end{itemize}
+
+\end{document}
+
+% Notes for Authors:
+% 1. Main paper: 8 pages maximum (excluding references and appendix)
+% 2. References: unlimited pages
+% 3. Appendix: unlimited pages (reviewed at discretion of reviewers)
+% 4. Use double-blind anonymization for initial submission
+% 5. Include broader impact statement
+% 6. Code submission strongly encouraged (anonymous for review)
+% 7. Use official neurips_2024.sty file (download from NeurIPS website)
+% 8. Font: Times, 10pt (enforced by style file)
+% 9. Figures should be colorblind-friendly
+% 10. Ensure reproducibility: report seeds, hyperparameters, dataset splits
+
diff --git a/scientific-skills/venue-templates/assets/journals/plos_one.tex b/scientific-skills/venue-templates/assets/journals/plos_one.tex
new file mode 100644
index 0000000..ccae2bb
--- /dev/null
+++ b/scientific-skills/venue-templates/assets/journals/plos_one.tex
@@ -0,0 +1,317 @@
+% PLOS ONE Article Template
+% For submission to PLOS ONE and other PLOS journals
+% Last updated: 2024
+
+\documentclass[10pt,letterpaper]{article}
+
+% Packages
+\usepackage[top=0.85in,left=2.75in,footskip=0.75in]{geometry}
+\usepackage{amsmath,amssymb}
+\usepackage{changepage}
+\usepackage[utf8]{inputenc}
+\usepackage{textcomp,marvosym}
+\usepackage{cite}
+\usepackage{nameref,hyperref}
+\usepackage[right]{lineno}
+\usepackage{microtype}
+\usepackage{graphicx}
+\usepackage[table]{xcolor}
+\usepackage{array}
+\usepackage{authblk}
+
+% Line numbering
+\linenumbers
+
+% Set up authblk for PLOS format
+\renewcommand\Authfont{\fontsize{12}{14}\selectfont}
+\renewcommand\Affilfont{\fontsize{9}{11}\selectfont}
+
+% Title
+\title{Your Article Title Here: Concise and Descriptive}
+
+% Authors and Affiliations
+\author[1]{First Author}
+\author[1,2]{Second Author}
+\author[2,$\dagger$]{Third Author}
+
+\affil[1]{Department of Biology, University Name, City, State, Country}
+\affil[2]{Institute of Research, Institution Name, City, Country}
+
+% Corresponding author
+\affil[$\dagger$]{Corresponding author. E-mail: [email protected]}
+
+\date{}
+
+\begin{document}
+
+\maketitle
+
+% Abstract
+\begin{abstract}
+\noindent
+Write a structured or unstructured abstract of 250-300 words. The abstract should be accessible to a broad readership and should clearly state: (1) background/rationale, (2) objectives, (3) methods, (4) principal findings with key data, and (5) conclusions and significance. Do not include citations in the abstract.
+\end{abstract}
+
+% Introduction
+\section*{Introduction}
+
+Provide background and context for your study. The introduction should:
+\begin{itemize}
+ \item Present the rationale for your study
+ \item Clearly state what is currently known about the topic
+ \item Identify the knowledge gap your study addresses
+ \item State your research objectives or hypotheses
+ \item Explain the significance of the research
+\end{itemize}
+
+Review relevant literature \cite{smith2023,jones2022}, setting your work in context.
+
+State your main research question or objective at the end of the introduction.
+
+% Materials and Methods
+\section*{Materials and Methods}
+
+Provide sufficient detail to allow reproduction of your work.
+
+\subsection*{Study Design}
+Describe the overall study design (e.g., prospective cohort, randomized controlled trial, observational study, etc.).
+
+\subsection*{Participants/Samples}
+Describe your study population, sample collection, or experimental subjects:
+\begin{itemize}
+ \item Sample size and how it was determined (power analysis)
+ \item Inclusion and exclusion criteria
+ \item Demographic information
+ \item For animal studies: species, strain, age, sex, housing conditions
+\end{itemize}
+
+\subsection*{Procedures}
+Detail all experimental procedures, measurements, and interventions. Include:
+\begin{itemize}
+ \item Equipment and reagents (with manufacturer, catalog numbers)
+ \item Protocols and procedures (step-by-step if novel)
+ \item Controls used
+ \item Blinding and randomization (if applicable)
+\end{itemize}
+
+\subsection*{Data Collection}
+Describe how data were collected, including instruments, assays, and measurements.
+
+\subsection*{Statistical Analysis}
+Clearly describe statistical methods used:
+\begin{itemize}
+ \item Software and version (e.g., R 4.3.0, Python 3.9 with scipy 1.9.0)
+ \item Statistical tests performed (e.g., t-tests, ANOVA, regression)
+ \item Significance level ($\alpha$, typically 0.05)
+ \item Corrections for multiple testing
+ \item Sample size justification
+\end{itemize}
+
+\subsection*{Ethical Approval}
+Include relevant ethical approval statements:
+\begin{itemize}
+ \item Human subjects: IRB approval, protocol number, consent procedures
+ \item Animal research: IACUC approval, protocol number, welfare considerations
+ \item Field studies: Permits and permissions
+\end{itemize}
+
+Example: "This study was approved by the Institutional Review Board of University Name (Protocol \#12345). All participants provided written informed consent."
+
+% Results
+\section*{Results}
+
+Present your findings in a logical sequence. Refer to figures and tables as you describe results. Do not interpret results in this section (save for Discussion).
+
+\subsection*{First Major Finding}
+Describe your first key result. Statistical results should include effect sizes and confidence intervals in addition to p-values.
+
+As shown in Figure~\ref{fig:results1}, we observed a significant increase in [outcome variable] (mean $\pm$ SD: 45.2 $\pm$ 8.3 vs. 32.1 $\pm$ 6.9; t = 7.42, df = 48, p < 0.001).
+
+\begin{figure}[!ht]
+\centering
+% \includegraphics[width=0.75\textwidth]{figure1.png}
+\caption{{\bf Figure 1. Title of first figure.}
+Detailed figure legend describing what is shown. Include: (A) Description of panel A. (B) Description of panel B. Sample sizes (n), error bars represent [SD, SEM, 95\% CI], and statistical significance indicated by asterisks (* p < 0.05, ** p < 0.01, *** p < 0.001). Statistical test used should be stated.}
+\label{fig:results1}
+\end{figure}
+
+\subsection*{Second Major Finding}
+Describe your second key result, referencing Table~\ref{tab:results1}.
+
+\begin{table}[!ht]
+\centering
+\caption{{\bf Table 1. Title of table.}}
+\label{tab:results1}
+\begin{tabular}{lccc}
+\hline
+\textbf{Condition} & \textbf{Measurement 1} & \textbf{Measurement 2} & \textbf{p-value} \\
+\hline
+Control & 25.3 $\pm$ 3.1 & 48.2 $\pm$ 5.4 & -- \\
+Treatment A & 32.7 $\pm$ 2.8 & 55.1 $\pm$ 4.9 & 0.003 \\
+Treatment B & 41.2 $\pm$ 3.5 & 62.8 $\pm$ 6.2 & < 0.001 \\
+\hline
+\end{tabular}
+\begin{flushleft}
+Values shown as mean $\pm$ standard deviation (n = 20 per group). P-values from one-way ANOVA with Tukey's post-hoc test comparing to control.
+\end{flushleft}
+\end{table}
+
+\subsection*{Additional Results}
+Present additional findings as needed.
+
+% Discussion
+\section*{Discussion}
+
+Interpret your results and place them in the context of existing literature.
+
+\subsection*{Principal Findings}
+Summarize your main findings concisely.
+
+\subsection*{Interpretation}
+Interpret your findings and explain their significance. How do they advance understanding of the topic? Compare and contrast with previous studies \cite{brown2021,williams2020}.
+
+\subsection*{Strengths and Limitations}
+Discuss both strengths and limitations of your study honestly:
+
+\textbf{Strengths:}
+\begin{itemize}
+ \item Large sample size with adequate statistical power
+ \item Rigorous methodology with appropriate controls
+ \item Novel approach or finding
+\end{itemize}
+
+\textbf{Limitations:}
+\begin{itemize}
+ \item Cross-sectional design limits causal inference
+ \item Generalizability may be limited to [specific population]
+ \item Potential confounding variables not measured
+\end{itemize}
+
+\subsection*{Implications}
+Discuss the practical or theoretical implications of your findings.
+
+\subsection*{Future Directions}
+Suggest directions for future research.
+
+% Conclusions
+\section*{Conclusions}
+
+Provide a concise conclusion summarizing the main findings and their significance. Avoid repeating the abstract.
+
+% Acknowledgments
+\section*{Acknowledgments}
+
+Acknowledge individuals who contributed but do not meet authorship criteria, technical assistance, and writing assistance. Example: "We thank Dr. Jane Doe for technical assistance with microscopy and Dr. John Smith for helpful discussions."
+
+% References
+\section*{References}
+
+% Using BibTeX
+\bibliographystyle{plos2015}
+\bibliography{references}
+
+% Or manually formatted (Vancouver style, numbered):
+\begin{thebibliography}{99}
+
+\bibitem{smith2023}
+Smith JD, Johnson ML, Williams KR. Title of article. Journal Abbrev. 2023;45(3):301-318. doi:10.1371/journal.pone.1234567.
+
+\bibitem{jones2022}
+Jones AB, Brown CD. Another article title. PLoS ONE. 2022;17(8):e0234567. doi:10.1371/journal.pone.0234567.
+
+\bibitem{brown2021}
+Brown EF, Davis GH, Wilson IJ, Taylor JK. Comprehensive study title. Nat Commun. 2021;12:1234. doi:10.1038/s41467-021-12345-6.
+
+\bibitem{williams2020}
+Williams LM, Anderson NO. Previous work on topic. Science. 2020;368(6489):456-460. doi:10.1126/science.abc1234.
+
+\end{thebibliography}
+
+% Supporting Information
+\section*{Supporting Information}
+
+List all supporting information files (captions provided separately during submission):
+
+\paragraph{S1 Fig.}
+\textbf{Title of supplementary figure 1.} Brief description.
+
+\paragraph{S2 Fig.}
+\textbf{Title of supplementary figure 2.} Brief description.
+
+\paragraph{S1 Table.}
+\textbf{Title of supplementary table 1.} Brief description.
+
+\paragraph{S1 Dataset.}
+\textbf{Raw data.} Complete dataset used in analysis (CSV format).
+
+\paragraph{S1 File.}
+\textbf{Supplementary methods.} Additional methodological details.
+
+% Author Contributions (CRediT taxonomy recommended)
+\section*{Author Contributions}
+
+Use CRediT (Contributor Roles Taxonomy):
+\begin{itemize}
+ \item \textbf{Conceptualization:} FA, SA
+ \item \textbf{Data curation:} FA
+ \item \textbf{Formal analysis:} FA, SA
+ \item \textbf{Funding acquisition:} TA
+ \item \textbf{Investigation:} FA, SA
+ \item \textbf{Methodology:} FA, SA, TA
+ \item \textbf{Project administration:} TA
+ \item \textbf{Resources:} TA
+ \item \textbf{Software:} FA
+ \item \textbf{Supervision:} TA
+ \item \textbf{Validation:} FA, SA
+ \item \textbf{Visualization:} FA
+ \item \textbf{Writing – original draft:} FA
+ \item \textbf{Writing – review \& editing:} FA, SA, TA
+\end{itemize}
+
+(FA = First Author, SA = Second Author, TA = Third Author)
+
+% Data Availability Statement (REQUIRED)
+\section*{Data Availability}
+
+Choose one of the following:
+
+\textbf{Option 1 (Public repository):}
+All data are available in the [repository name] repository at [URL/DOI].
+
+\textbf{Option 2 (Supporting Information):}
+All relevant data are within the paper and its Supporting Information files.
+
+\textbf{Option 3 (Available on request):}
+Data cannot be shared publicly because of [reason]. Data are available from the [institution/contact] (contact via [email]) for researchers who meet the criteria for access to confidential data.
+
+\textbf{Option 4 (Third-party):}
+Data are available from [third party] (contact: [details]) for researchers who meet criteria for access.
+
+% Funding Statement (REQUIRED)
+\section*{Funding}
+
+State all funding sources including grant numbers. If no funding, state "The authors received no specific funding for this work."
+
+Example: "This work was supported by the National Science Foundation (NSF) [grant number 123456 to TA] and the National Institutes of Health (NIH) [grant number R01-234567 to TA]. The funders had no role in study design, data collection and analysis, decision to publish, or preparation of the manuscript."
+
+% Competing Interests (REQUIRED)
+\section*{Competing Interests}
+
+Declare any financial or non-financial competing interests. If none, state: "The authors have declared that no competing interests exist."
+
+If competing interests exist, declare them explicitly: "Author TA is a consultant for Company X. This does not alter our adherence to PLOS ONE policies on sharing data and materials."
+
+\end{document}
+
+% Notes for Authors:
+% 1. PLOS ONE has no length limit - be concise but thorough
+% 2. Use Vancouver style for citations [1], [2], [3]
+% 3. Figures: TIFF or EPS format, 300-600 dpi
+% 4. All data must be made available (data availability statement required)
+% 5. Include line numbers for review
+% 6. PLOS ONE focuses on scientific rigor, not novelty or impact
+% 7. Reporting guidelines encouraged (CONSORT, STROBE, PRISMA, etc.)
+% 8. Ethical approval required for human/animal studies
+% 9. All authors must agree to submission
+% 10. Submit via PLOS online submission system
+
diff --git a/scientific-skills/venue-templates/assets/posters/beamerposter_academic.tex b/scientific-skills/venue-templates/assets/posters/beamerposter_academic.tex
new file mode 100644
index 0000000..0f5d99d
--- /dev/null
+++ b/scientific-skills/venue-templates/assets/posters/beamerposter_academic.tex
@@ -0,0 +1,311 @@
+% Academic Research Poster Template using beamerposter
+% For conference presentations
+% Last updated: 2024
+
+\documentclass[final]{beamer}
+
+% Poster size and scale
+% Common sizes: a0, a1, a2, a3, a4
+% Custom size: size=custom,width=XX,height=YY
+\usepackage[size=a0,scale=1.24,orientation=portrait]{beamerposter}
+
+% Packages
+\usepackage[utf8]{inputenc}
+\usepackage{amsmath,amsthm,amssymb,latexsym}
+\usepackage{graphicx}
+\usepackage{booktabs,array}
+\usepackage{multirow}
+\usepackage{qrcode} % For QR codes
+\usepackage{tikz}
+\usepackage{lipsum} % For placeholder text (remove in final version)
+
+% Beamer theme
+\usetheme{Berlin}
+% Other themes: default, AnnArbor, Antibes, Bergen, Berkeley, Berlin, Boadilla, CambridgeUS, Copenhagen, Darmstadt, Dresden, Frankfurt, Goettingen, Hannover, Ilmenau, JuanLesPins, Luebeck, Madrid, Malmoe, Marburg, Montpellier, PaloAlto, Pittsburgh, Rochester, Singapore, Szeged, Warsaw
+
+% Color theme
+\usecolortheme{seahorse}
+% Other color themes: default, albatross, beaver, beetle, crane, dolphin, dove, fly, lily, orchid, rose, seagull, seahorse, whale, wolverine
+
+% Custom colors (Okabe-Ito colorblind-safe palette)
+\definecolor{OIorange}{RGB}{230,159,0}
+\definecolor{OIblue}{RGB}{86,180,233}
+\definecolor{OIgreen}{RGB}{0,158,115}
+\definecolor{OIyellow}{RGB}{240,228,66}
+\definecolor{OIdarkblue}{RGB}{0,114,178}
+\definecolor{OIvermillion}{RGB}{213,94,0}
+\definecolor{OIpurple}{RGB}{204,121,167}
+
+% Set custom colors
+\setbeamercolor{block title}{fg=white,bg=OIdarkblue}
+\setbeamercolor{block body}{fg=black,bg=white}
+\setbeamercolor{block alerted title}{fg=white,bg=OIvermillion}
+\setbeamercolor{block alerted body}{fg=black,bg=white}
+
+% Fonts
+\setbeamerfont{title}{size=\VERYHuge,series=\bfseries}
+\setbeamerfont{author}{size=\Large}
+\setbeamerfont{institute}{size=\large}
+\setbeamerfont{block title}{size=\large,series=\bfseries}
+\setbeamerfont{block body}{size=\normalsize}
+
+% Remove navigation symbols
+\setbeamertemplate{navigation symbols}{}
+
+% Title, authors, and affiliations
+\title{Your Research Title Here:\\A Concise and Descriptive Title}
+
+\author{First Author\inst{1}, Second Author\inst{1,2}, Third Author\inst{2}}
+
+\institute[shortinst]{
+\inst{1} Department of Science, University Name, City, State, Country\\
+\inst{2} Institute of Research, Institution Name, City, Country
+}
+
+% Footer
+\setbeamertemplate{footline}{
+ \leavevmode%
+ \hbox{%
+ \begin{beamercolorbox}[wd=.33\paperwidth,ht=4ex,dp=2ex,left]{author in head/foot}%
+ \hspace{1em}\usebeamerfont{author in head/foot}Contact: [email protected]
+ \end{beamercolorbox}%
+ \begin{beamercolorbox}[wd=.34\paperwidth,ht=4ex,dp=2ex,center]{title in head/foot}%
+ \usebeamerfont{title in head/foot}Conference Name 2024
+ \end{beamercolorbox}%
+ \begin{beamercolorbox}[wd=.33\paperwidth,ht=4ex,dp=2ex,right]{date in head/foot}%
+ \usebeamerfont{date in head/foot}University Logo\hspace{1em}
+ \end{beamercolorbox}}%
+ \vskip0pt%
+}
+
+\begin{document}
+
+\begin{frame}[t]
+\begin{columns}[t]
+
+% Left Column
+\begin{column}{.48\textwidth}
+
+% Introduction/Background
+\begin{block}{Introduction}
+\begin{itemize}
+ \item \textbf{Background:} Provide context for your research. What is the broader problem or area of study?
+ \item \textbf{Gap:} What is currently unknown or inadequately addressed?
+ \item \textbf{Objective:} Clearly state your research question or hypothesis
+ \item \textbf{Significance:} Why does this work matter?
+\end{itemize}
+
+\vspace{0.5cm}
+\textbf{Hypothesis:} State your main hypothesis clearly in one sentence.
+\end{block}
+
+\vspace{1cm}
+
+% Methods
+\begin{block}{Methods}
+
+\textbf{Study Design:} Brief description of overall approach.
+
+\vspace{0.5cm}
+
+\textbf{Participants/Samples:}
+\begin{itemize}
+ \item Sample size: n = XX
+ \item Key characteristics
+ \item Inclusion/exclusion criteria
+\end{itemize}
+
+\vspace{0.5cm}
+
+\textbf{Procedures:}
+\begin{enumerate}
+ \item Data collection procedure
+ \item Experimental intervention or measurement
+ \item Analysis approach
+\end{enumerate}
+
+\vspace{0.5cm}
+
+% Optional: Methods flowchart
+\begin{center}
+\begin{tikzpicture}[node distance=1.5cm, auto,
+ box/.style={rectangle, draw, fill=OIblue!20, text width=8cm, text centered, minimum height=1cm}]
+ \node [box] (step1) {Step 1: Participant Recruitment};
+ \node [box, below of=step1] (step2) {Step 2: Baseline Assessment};
+ \node [box, below of=step2] (step3) {Step 3: Intervention};
+ \node [box, below of=step3] (step4) {Step 4: Follow-up Assessment};
+ \node [box, below of=step4] (step5) {Step 5: Data Analysis};
+
+ \draw [->] (step1) -- (step2);
+ \draw [->] (step2) -- (step3);
+ \draw [->] (step3) -- (step4);
+ \draw [->] (step4) -- (step5);
+\end{tikzpicture}
+\end{center}
+
+\textbf{Statistical Analysis:}
+\begin{itemize}
+ \item Statistical test used (e.g., t-test, ANOVA, regression)
+ \item Software: R 4.3.0, Python 3.9
+ \item Significance level: $\alpha = 0.05$
+\end{itemize}
+
+\end{block}
+
+\end{column}
+
+% Right Column
+\begin{column}{.48\textwidth}
+
+% Results
+\begin{block}{Results}
+
+\textbf{Finding 1: Main Result}
+
+\vspace{0.5cm}
+
+% Figure 1
+\begin{figure}
+\centering
+% \includegraphics[width=0.9\textwidth]{figure1.pdf}
+\caption{Figure 1. Main result showing significant effect. Error bars represent standard deviation. * p < 0.05, ** p < 0.01, *** p < 0.001.}
+\end{figure}
+
+\vspace{0.5cm}
+
+\textbf{Finding 2: Secondary Analysis}
+
+\vspace{0.5cm}
+
+% Table or second figure
+\begin{table}
+\centering
+\caption{Summary of key results}
+\begin{tabular}{lcccc}
+\toprule
+\textbf{Condition} & \textbf{Mean} & \textbf{SD} & \textbf{n} & \textbf{p-value} \\
+\midrule
+Control & 25.3 & 3.1 & 30 & -- \\
+Treatment A & 32.7 & 2.8 & 30 & 0.003 \\
+Treatment B & 41.2 & 3.5 & 30 & < 0.001 \\
+\bottomrule
+\end{tabular}
+\end{table}
+
+\vspace{0.5cm}
+
+\textbf{Finding 3: Additional Observation}
+
+Describe third key finding with reference to supporting data.
+
+\end{block}
+
+\vspace{1cm}
+
+% Discussion/Conclusions
+\begin{block}{Discussion \& Conclusions}
+
+\textbf{Main Findings:}
+\begin{itemize}
+ \item Summary of first key result
+ \item Summary of second key result
+ \item Summary of third key result
+\end{itemize}
+
+\vspace{0.5cm}
+
+\textbf{Interpretation:}
+\begin{itemize}
+ \item How do these findings advance understanding?
+ \item How do they compare to previous work?
+ \item What are the mechanisms or explanations?
+\end{itemize}
+
+\vspace{0.5cm}
+
+\textbf{Limitations:}
+\begin{itemize}
+ \item Acknowledge key limitations honestly
+ \item Discuss how they might affect interpretation
+\end{itemize}
+
+\vspace{0.5cm}
+
+\textbf{Future Directions:}
+\begin{itemize}
+ \item Next steps for research
+ \item Potential applications
+\end{itemize}
+
+\vspace{0.5cm}
+
+\begin{alertblock}{Key Takeaway}
+\textbf{One-sentence summary of most important finding or implication.}
+\end{alertblock}
+
+\end{block}
+
+\vspace{1cm}
+
+% References and QR Code
+\begin{block}{References \& Contact}
+
+\begin{minipage}[t]{0.65\textwidth}
+\small
+\textbf{Selected References:}
+\begin{enumerate}
+ \item Smith et al. (2023). \textit{Journal Name}, 45:123-130.
+ \item Jones \& Brown (2022). \textit{Another Journal}, 12:456-467.
+ \item Williams et al. (2021). \textit{Third Journal}, 8:789-801.
+\end{enumerate}
+
+\vspace{0.3cm}
+
+\textbf{Acknowledgments:} Funding from [Agency] Grant \#12345. Thanks to [collaborators].
+\end{minipage}
+\hfill
+\begin{minipage}[t]{0.3\textwidth}
+\begin{center}
+\qrcode[height=3cm]{https://yourlab.university.edu/paper}\\
+\small Scan for full paper\\and supplementary materials
+\end{center}
+\end{minipage}
+
+\end{block}
+
+\end{column}
+
+\end{columns}
+\end{frame}
+
+\end{document}
+
+% Notes for Poster Design:
+% 1. Font sizes (for A0 poster):
+% - Title: 80-100pt
+% - Authors: 60pt
+% - Section headers: 50-60pt
+% - Body text: 32-36pt (set by beamerposter scale)
+% - Captions: 28-32pt
+%
+% 2. Use colorblind-safe colors (Okabe-Ito palette provided)
+%
+% 3. Keep text minimal - use bullets, not paragraphs
+%
+% 4. Make figures large and clear
+%
+% 5. Use white space effectively - don't crowd
+%
+% 6. Test readability from 6 feet (2 meters) away
+%
+% 7. Include QR code linking to paper, lab website, or supplementary materials
+%
+% 8. Print at professional print shop (FedEx Office, university print center)
+%
+% 9. Common poster sizes:
+% - A0: 841 × 1189 mm (33.1 × 46.8 in)
+% - 36" × 48" (914 × 1219 mm)
+% - Check conference requirements!
+%
+% 10. Compile with: pdflatex beamerposter_academic.tex
+
diff --git a/scientific-skills/venue-templates/references/conferences_formatting.md b/scientific-skills/venue-templates/references/conferences_formatting.md
new file mode 100644
index 0000000..89e2a7d
--- /dev/null
+++ b/scientific-skills/venue-templates/references/conferences_formatting.md
@@ -0,0 +1,564 @@
+# Conference Formatting Requirements
+
+Comprehensive formatting requirements and submission guidelines for major academic conferences across disciplines.
+
+**Last Updated**: 2024
+
+---
+
+## Machine Learning & Artificial Intelligence
+
+### NeurIPS (Neural Information Processing Systems)
+
+**Conference Type**: Top-tier machine learning conference
+**Frequency**: Annual (December)
+
+**Formatting Requirements**:
+- **Page Limit**:
+ - Main paper: 8 pages (excluding references)
+ - References: Unlimited
+ - Appendix/Supplementary: Unlimited (optional, reviewed at discretion)
+- **Format**: Two-column
+- **Font**: Times or Times New Roman, 10pt for body text
+- **Line spacing**: Single-spaced
+- **Margins**: 1 inch (2.54 cm) all sides
+- **Column separation**: 0.25 inch (0.635 cm)
+- **Paper size**: US Letter (8.5 × 11 inches)
+- **Anonymization**: **Required** for initial submission (double-blind review)
+ - Remove author names, affiliations
+ - Anonymize self-citations ("Author et al." → "Anonymous et al.")
+ - Remove acknowledgments revealing identity
+- **Citations**: Numbered in square brackets [1], [2-4]
+- **References**: Any consistent style (commonly uses numbered references)
+- **Figures**:
+ - High resolution (300+ dpi)
+ - Colorblind-friendly palettes recommended
+ - Can span both columns if needed
+- **Tables**: Clear, readable at publication size
+- **Equations**: Numbered if referenced
+- **LaTeX Class**: `neurips_2024.sty` (updated annually)
+- **Supplementary Materials**:
+ - Code strongly encouraged (GitHub, anonymous repo for review)
+ - Additional experiments, proofs
+ - Not counted toward page limit
+
+**LaTeX Template**: `assets/journals/neurips_article.tex`
+
+**Submission Notes**:
+- Use official style file (changes yearly)
+- Paper ID on first page (auto-generated during submission)
+- Include "broader impact" statement (varies by year)
+- Reproducibility checklist required
+
+**Website**: https://neurips.cc/
+
+---
+
+### ICML (International Conference on Machine Learning)
+
+**Conference Type**: Top-tier machine learning conference
+**Frequency**: Annual (July)
+
+**Formatting Requirements**:
+- **Page Limit**:
+ - Main paper: 8 pages (excluding references and appendix)
+ - References: Unlimited
+ - Appendix: Unlimited (optional)
+- **Format**: Two-column
+- **Font**: Times, 10pt
+- **Line spacing**: Single-spaced
+- **Margins**: 1 inch all sides
+- **Paper size**: US Letter
+- **Anonymization**: **Required** (double-blind)
+- **Citations**: Numbered or author-year (consistent style)
+- **Figures**: High resolution, colorblind-safe recommended
+- **LaTeX Class**: `icml2024.sty` (updated yearly)
+- **Supplementary**: Strongly encouraged (code, data, appendix)
+
+**LaTeX Template**: `assets/journals/icml_article.tex`
+
+**Submission Notes**:
+- Must use official ICML style file
+- Checklist for reproducibility
+- Ethics statement if applicable
+
+**Website**: https://icml.cc/
+
+---
+
+### ICLR (International Conference on Learning Representations)
+
+**Conference Type**: Top-tier deep learning conference
+**Frequency**: Annual (April/May)
+
+**Formatting Requirements**:
+- **Page Limit**:
+ - Main paper: 8 pages (excluding references, appendix, ethics statement)
+ - References: Unlimited
+ - Appendix: Unlimited
+- **Format**: Two-column
+- **Font**: Times, 10pt
+- **Anonymization**: **Required** (double-blind)
+- **Citations**: Numbered [1] or author-year
+- **LaTeX Class**: `iclr2024_conference.sty`
+- **Supplementary**: Code and data encouraged (anonymous GitHub)
+- **Open Review**: Reviews and responses are public post-decision
+
+**LaTeX Template**: `assets/journals/iclr_article.tex`
+
+**Unique Features**:
+- OpenReview platform (transparent review process)
+- Author-reviewer discussion during review
+- Camera-ready can exceed 8 pages
+
+**Website**: https://iclr.cc/
+
+---
+
+### CVPR (Computer Vision and Pattern Recognition)
+
+**Conference Type**: Top-tier computer vision conference
+**Frequency**: Annual (June)
+
+**Formatting Requirements**:
+- **Page Limit**:
+ - Main paper: 8 pages (including figures and tables, excluding references)
+ - References: Unlimited (separate section)
+- **Format**: Two-column
+- **Font**: Times Roman, 10pt
+- **Anonymization**: **Required** (double-blind)
+ - Blur faces in images if needed
+ - Anonymize datasets if they reveal identity
+- **Paper size**: US Letter
+- **Citations**: Numbered [1]
+- **Figures**: High resolution, can be color
+- **LaTeX Template**: CVPR official template (changes yearly)
+- **Supplementary Material**:
+ - Video demonstrations encouraged
+ - Additional results, code
+ - 100 MB limit for all supplementary files
+
+**LaTeX Template**: `assets/journals/cvpr_article.tex`
+
+**Website**: https://cvpr.thecvf.com/
+
+---
+
+### AAAI (Association for the Advancement of Artificial Intelligence)
+
+**Conference Type**: Major AI conference
+**Frequency**: Annual (February)
+
+**Formatting Requirements**:
+- **Page Limit**:
+ - Technical papers: 7 pages (excluding references)
+ - References: Unlimited
+- **Format**: Two-column
+- **Font**: Times Roman, 10pt
+- **Anonymization**: **Required** (double-blind)
+- **Paper size**: US Letter
+- **Citations**: Various styles accepted (be consistent)
+- **LaTeX Template**: AAAI official style
+- **Supplementary**: Optional appendix
+
+**LaTeX Template**: `assets/journals/aaai_article.tex`
+
+**Website**: https://aaai.org/conference/aaai/
+
+---
+
+### IJCAI (International Joint Conference on Artificial Intelligence)
+
+**Conference Type**: Major AI conference
+**Frequency**: Annual
+
+**Formatting Requirements**:
+- **Page Limit**: 7 pages (excluding references)
+- **Format**: Two-column
+- **Font**: Times, 10pt
+- **Anonymization**: **Required**
+- **LaTeX Template**: IJCAI official style
+
+---
+
+## Computer Science
+
+### ACM CHI (Human-Computer Interaction)
+
+**Conference Type**: Premier HCI conference
+**Frequency**: Annual (April/May)
+
+**Formatting Requirements**:
+- **Page Limit**:
+ - Papers: 10 pages (excluding references)
+ - Late-Breaking Work: 4 pages
+- **Format**: Single-column ACM format
+- **Font**: Depends on ACM template
+- **Anonymization**: **Required** for Papers track
+- **LaTeX Class**: `acmart` with CHI proceedings format
+- **Citations**: ACM style (numbered or author-year)
+- **Figures**: High quality, accessibility considered
+- **Accessibility**: Alt text for figures encouraged
+
+**LaTeX Template**: `assets/journals/chi_article.tex`
+
+**Website**: https://chi.acm.org/
+
+---
+
+### SIGKDD (Knowledge Discovery and Data Mining)
+
+**Conference Type**: Top data mining conference
+**Frequency**: Annual (August)
+
+**Formatting Requirements**:
+- **Page Limit**:
+ - Research Track: 9 pages (excluding references)
+ - Applied Data Science: 9 pages
+- **Format**: Two-column
+- **LaTeX Class**: `acmart` (sigconf format)
+- **Font**: ACM template default
+- **Anonymization**: **Required** (double-blind)
+- **Citations**: ACM numbered style
+- **Supplementary**: Code and data encouraged
+
+**LaTeX Template**: `assets/journals/kdd_article.tex`
+
+**Website**: https://kdd.org/
+
+---
+
+### EMNLP (Empirical Methods in Natural Language Processing)
+
+**Conference Type**: Top NLP conference
+**Frequency**: Annual (November/December)
+
+**Formatting Requirements**:
+- **Page Limit**:
+ - Long papers: 8 pages (+ unlimited references and appendix)
+ - Short papers: 4 pages (+ unlimited references)
+- **Format**: Two-column
+- **Font**: Times New Roman, 11pt
+- **Anonymization**: **Required** (double-blind)
+ - Do not include author names or affiliations
+ - Self-citations should be anonymized
+- **Paper size**: US Letter or A4
+- **Citations**: Named style similar to ACL
+- **LaTeX Template**: ACL/EMNLP official style
+- **Supplementary**: Appendix unlimited, code encouraged
+
+**LaTeX Template**: `assets/journals/emnlp_article.tex`
+
+**Website**: https://www.emnlp.org/
+
+---
+
+### ACL (Association for Computational Linguistics)
+
+**Conference Type**: Premier NLP conference
+**Frequency**: Annual (July)
+
+**Formatting Requirements**:
+- **Page Limit**: 8 pages (long), 4 pages (short), excluding references
+- **Format**: Two-column
+- **Font**: Times, 11pt
+- **Anonymization**: **Required**
+- **LaTeX Template**: ACL official style (acl.sty)
+
+**LaTeX Template**: `assets/journals/acl_article.tex`
+
+---
+
+### USENIX Security Symposium
+
+**Conference Type**: Top security conference
+**Frequency**: Annual (August)
+
+**Formatting Requirements**:
+- **Page Limit**:
+ - Papers: No strict limit (typically 15-20 pages including everything)
+ - Well-written, concise papers preferred
+- **Format**: Two-column
+- **Font**: Times, 10pt
+- **Anonymization**: **Required** (double-blind)
+- **LaTeX Template**: USENIX official template
+- **Citations**: Numbered
+- **Paper size**: US Letter
+
+**LaTeX Template**: `assets/journals/usenix_article.tex`
+
+**Website**: https://www.usenix.org/conference/usenixsecurity
+
+---
+
+### SIGIR (Information Retrieval)
+
+**Conference Type**: Top information retrieval conference
+**Frequency**: Annual (July)
+
+**Formatting Requirements**:
+- **Page Limit**:
+ - Full papers: 10 pages (excluding references)
+ - Short papers: 4 pages (excluding references)
+- **Format**: Single-column ACM format
+- **LaTeX Class**: `acmart` (sigconf)
+- **Anonymization**: **Required**
+- **Citations**: ACM style
+
+**LaTeX Template**: `assets/journals/sigir_article.tex`
+
+---
+
+## Biology & Bioinformatics
+
+### ISMB (Intelligent Systems for Molecular Biology)
+
+**Conference Type**: Premier computational biology conference
+**Frequency**: Annual (July)
+
+**Formatting Requirements**:
+- **Publication**: Proceedings published in *Bioinformatics* journal
+- **Page Limit**:
+ - Typically 7-8 pages including figures and references
+- **Format**: Two-column
+- **Font**: Times, 10pt
+- **Citations**: Numbered (Oxford style similar to Bioinformatics journal)
+- **LaTeX Template**: Oxford Bioinformatics template
+- **Anonymization**: **Not required** (single-blind)
+- **Figures**: High resolution, color acceptable
+- **Supplementary**: Encouraged for additional data/methods
+
+**LaTeX Template**: `assets/journals/ismb_article.tex`
+
+**Website**: https://www.iscb.org/ismb
+
+---
+
+### RECOMB (Research in Computational Molecular Biology)
+
+**Conference Type**: Top computational biology conference
+**Frequency**: Annual (April/May)
+
+**Formatting Requirements**:
+- **Publication**: Proceedings published as Springer LNCS (Lecture Notes in Computer Science)
+- **Page Limit**:
+ - Extended abstracts: 12-15 pages (including references)
+- **Format**: Single-column
+- **Font**: Based on Springer LNCS template
+- **LaTeX Class**: `llncs` (Springer)
+- **Citations**: Numbered or author-year
+- **Anonymization**: **Required** (double-blind)
+- **Supplementary**: Appendix can be submitted
+
+**LaTeX Template**: `assets/journals/recomb_article.tex`
+
+**Website**: https://www.recomb.org/
+
+---
+
+### PSB (Pacific Symposium on Biocomputing)
+
+**Conference Type**: Biomedical informatics conference
+**Frequency**: Annual (January)
+
+**Formatting Requirements**:
+- **Page Limit**: 12 pages including figures and references
+- **Format**: Single-column
+- **Font**: Times, 11pt
+- **Margins**: 1 inch all sides
+- **Citations**: Numbered
+- **Anonymization**: **Not required**
+- **Figures**: Embedded in text
+- **LaTeX Template**: PSB official template
+
+**LaTeX Template**: `assets/journals/psb_article.tex`
+
+**Website**: https://psb.stanford.edu/
+
+---
+
+## Engineering
+
+### IEEE International Conference on Robotics and Automation (ICRA)
+
+**Formatting Requirements**:
+- **Page Limit**: 8 pages (including figures and references)
+- **Format**: Two-column
+- **Font**: Times, 10pt
+- **LaTeX Class**: IEEEtran
+- **Citations**: IEEE style [1]
+- **Anonymization**: **Required** for initial submission
+- **Video**: Optional video submissions encouraged
+
+**LaTeX Template**: `assets/journals/icra_article.tex`
+
+---
+
+### IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS)
+
+**Formatting**: Same as ICRA (IEEE robotics template)
+
+---
+
+### International Conference on Computer-Aided Design (ICCAD)
+
+**Formatting Requirements**:
+- **Page Limit**: 8 pages
+- **Format**: Two-column
+- **LaTeX Class**: IEEE template
+- **Citations**: IEEE style
+
+---
+
+### Design Automation Conference (DAC)
+
+**Formatting Requirements**:
+- **Page Limit**: 6 pages
+- **Format**: Two-column
+- **Font**: Times, 10pt
+- **LaTeX Class**: ACM or IEEE template (check yearly guidelines)
+
+---
+
+## Multidisciplinary
+
+### AAAS Annual Meeting
+
+**Conference Type**: Broad scientific conference
+**Formatting**: Varies by symposium (typically extended abstracts)
+
+---
+
+## Quick Reference Table
+
+| Conference | Pages | Format | Blind | Citations | Template |
+|------------|-------|--------|-------|-----------|----------|
+| **NeurIPS** | 8 + refs | Two-col | Double | [1] | `neurips_article.tex` |
+| **ICML** | 8 + refs | Two-col | Double | [1] | `icml_article.tex` |
+| **ICLR** | 8 + refs | Two-col | Double | [1] | `iclr_article.tex` |
+| **CVPR** | 8 + refs | Two-col | Double | [1] | `cvpr_article.tex` |
+| **AAAI** | 7 + refs | Two-col | Double | Various | `aaai_article.tex` |
+| **CHI** | 10 + refs | Single-col | Double | ACM | `chi_article.tex` |
+| **SIGKDD** | 9 + refs | Two-col | Double | ACM [1] | `kdd_article.tex` |
+| **EMNLP** | 8 + refs | Two-col | Double | Named | `emnlp_article.tex` |
+| **ISMB** | 7-8 pages | Two-col | Single | [1] | `ismb_article.tex` |
+| **RECOMB** | 12-15 pages | Single-col | Double | Springer | `recomb_article.tex` |
+
+---
+
+## General Conference Submission Guidelines
+
+### Anonymization Best Practices (Double-Blind Review)
+
+**Remove**:
+- Author names, affiliations, emails from title page
+- Acknowledgments section
+- Funding information that reveals identity
+- Any "our previous work" citations that make identity obvious
+
+**Anonymize**:
+- Self-citations: "Smith et al. [5]" → "Anonymous et al. [5]" or "Prior work [5]"
+- Institution-specific details: "our university" → "a large research university"
+- Dataset names if they reveal identity
+
+**Keep Anonymous**:
+- Code repositories (use anonymous GitHub for review)
+- Supplementary materials
+- Any URLs or links
+
+### Supplementary Materials
+
+**Common Inclusions**:
+- Source code (GitHub repository, zip file)
+- Additional experimental results
+- Proofs and derivations
+- Extended related work
+- Dataset descriptions
+- Video demonstrations
+- Interactive demos
+
+**Best Practices**:
+- Keep supplementary well-organized
+- Reference supplementary clearly from main paper
+- Ensure supplementary is anonymized for blind review
+- Check file size limits (typically 50-100 MB)
+
+### Camera-Ready Preparation
+
+After acceptance:
+1. **De-anonymize**: Add author names, affiliations
+2. **Add acknowledgments**: Funding, contributions
+3. **Copyright**: Add conference copyright notice
+4. **Formatting**: Follow camera-ready specific guidelines
+5. **Page limit**: May allow 1-2 extra pages (check guidelines)
+6. **PDF/A compliance**: Some conferences require PDF/A format
+
+### Accessibility Considerations
+
+**For All Conferences**:
+- Use colorblind-safe color palettes
+- Ensure sufficient contrast
+- Provide alt text for figures (where supported)
+- Use clear, readable fonts
+- Avoid solely color-based distinctions
+
+---
+
+## Common Mistakes to Avoid
+
+1. **Wrong style file**: Using outdated conference style file
+2. **Page limit violation**: Figures/tables pushing over limit
+3. **Font size manipulation**: Changing fonts to fit more content
+4. **Margin adjustments**: Modifying margins to gain space
+5. **De-anonymization**: Accidentally revealing identity in blind review
+6. **Missing references**: Not citing relevant prior work
+7. **Low-quality figures**: Pixelated or illegible figures
+8. **Inconsistent formatting**: Different sections using different styles
+
+---
+
+## Getting Official Templates
+
+**Where to Find Official Templates**:
+1. **Conference website**: "Call for Papers" or "Author Instructions"
+2. **GitHub**: Many conferences host templates on GitHub
+3. **Overleaf**: Many official templates available on Overleaf
+4. **CTAN**: LaTeX class files often on CTAN repository
+
+**Template Naming**:
+- Conferences often update templates yearly
+- Use the correct year's template (e.g., `neurips_2024.sty`)
+- Check for "camera-ready" vs. "submission" versions
+
+---
+
+## Notes
+
+1. **Annual updates**: Conference requirements change; always check current year's CFP
+2. **Deadline types**:
+ - Abstract deadline (often 1 week before paper deadline)
+ - Paper deadline (firm, no extensions typically)
+ - Supplementary deadline (may be a few days after paper)
+3. **Timezone**: Pay attention to deadline timezone (often AOE - Anywhere on Earth)
+4. **Rebuttal**: Many conferences have author response/rebuttal periods
+5. **Dual submission**: Check conference policy on concurrent submissions
+6. **Poster/Oral**: Acceptance often comes with presentation format
+
+## Conference Tiers (Informal)
+
+**Machine Learning**:
+- **Tier 1**: NeurIPS, ICML, ICLR
+- **Tier 2**: AAAI, IJCAI, UAI
+
+**Computer Vision**:
+- **Tier 1**: CVPR, ICCV, ECCV
+
+**Natural Language Processing**:
+- **Tier 1**: ACL, EMNLP, NAACL
+
+**Bioinformatics**:
+- **Tier 1**: RECOMB, ISMB
+- **Tier 2**: PSB, WABI
+
+(Tiers are informal and field-dependent; not official rankings)
+
diff --git a/scientific-skills/venue-templates/references/grants_requirements.md b/scientific-skills/venue-templates/references/grants_requirements.md
new file mode 100644
index 0000000..f1c7c3a
--- /dev/null
+++ b/scientific-skills/venue-templates/references/grants_requirements.md
@@ -0,0 +1,787 @@
+# Grant Proposal Requirements
+
+Comprehensive requirements and formatting guidelines for major federal and private foundation grant programs.
+
+**Last Updated**: 2024
+
+---
+
+## NSF (National Science Foundation)
+
+### Overview
+
+**Agency**: National Science Foundation
+**Typical Award**: $100K-$500K per year, 3-5 years
+**Success Rate**: 20-25% (varies by program)
+**Review Criteria**: Intellectual Merit + Broader Impacts (equally weighted)
+
+---
+
+### NSF Standard Grant Proposal
+
+**Page Limits (NSF PAPPG - Proposal & Award Policies & Procedures Guide)**:
+
+| Component | Page Limit | Font | Spacing |
+|-----------|-----------|------|---------|
+| **Project Summary** | 1 page | Any readable, 10pt+ | Any |
+| **Project Description** | 15 pages | Times Roman 11pt or similar | Single |
+| **References Cited** | No limit | Times Roman 11pt | Single |
+| **Biographical Sketch** | 3 pages per person | Times Roman 11pt | Single |
+| **Budget Justification** | 3-5 pages | Any readable | Any |
+| **Current & Pending Support** | No limit | Times Roman 11pt | Single |
+| **Facilities, Equipment** | 2 pages | Any readable | Any |
+| **Data Management Plan** | 2 pages | Any readable | Any |
+
+**Margins**: 1 inch (2.54 cm) on all sides (strictly enforced)
+
+---
+
+### NSF Project Summary (1 page)
+
+**Required Sections** (clearly labeled):
+
+1. **Overview** (1-2 paragraphs)
+ - Concise description of research activity
+ - Objectives and methods
+
+2. **Intellectual Merit** (1 paragraph)
+ - How project advances knowledge
+ - Innovation and transformative potential
+ - Qualifications of research team
+
+3. **Broader Impacts** (1 paragraph)
+ - Benefits to society
+ - Broadening participation
+ - Dissemination and outreach
+
+**Format**: Can be full-page text or sectioned
+**Audience**: Non-specialists (broad scientific community)
+
+**Template**: `assets/grants/nsf_project_summary.tex`
+
+---
+
+### NSF Project Description (15 pages)
+
+**Typical Structure**:
+
+1. **Introduction/Background** (2-3 pages)
+ - Current state of knowledge
+ - Research gap
+ - Preliminary work/feasibility
+ - Team qualifications
+
+2. **Research Plan** (8-10 pages)
+ - Objectives and hypotheses
+ - Methods and approach
+ - Timeline and milestones
+ - Expected outcomes
+
+3. **Broader Impacts** (1-2 pages)
+ - Educational activities
+ - Broadening participation (underrepresented groups)
+ - Dissemination (publications, conferences, public outreach)
+ - Societal benefits
+
+4. **Results from Prior NSF Support** (1 page, if applicable)
+ - Required if PI has had NSF support in past 5 years
+ - Intellectual merit and broader impacts of prior work
+ - Publications from prior NSF grants
+
+**Key Requirements**:
+- Intellectual Merit and Broader Impacts integrated throughout
+- Figures and tables allowed (count toward page limit)
+- Citations to references (use References Cited section)
+
+**Template**: `assets/grants/nsf_proposal_template.tex`
+
+---
+
+### NSF Biographical Sketch (3 pages)
+
+**Required Sections**:
+1. **Professional Preparation**: Institutions, degrees, fields
+2. **Appointments**: Current and previous positions
+3. **Products**: Up to 5 most relevant, up to 5 other significant products
+ - Can include publications, datasets, software, patents
+4. **Synergistic Activities**: Up to 5 examples of impact beyond research
+
+**Format**:
+- NSF template must be used (SciENcv or NSF-approved format)
+- No longer uses "Publications" but "Products"
+
+---
+
+### NSF Broader Impacts
+
+**NSF-Recognized Categories** (demonstrate ≥1):
+1. **Advance discovery while promoting teaching/learning**
+2. **Broaden participation** of underrepresented groups
+3. **Disseminate broadly** to enhance scientific/technological understanding
+4. **Benefits to society** (economic, health, environment, national security)
+5. **Develop scientific workforce** and infrastructure
+
+**Best Practices**:
+- Be specific with measurable outcomes
+- Explain how activities will be assessed
+- Integrate with research (don't treat as "add-on")
+- Budget for broader impacts activities
+
+**Examples**:
+- K-12 outreach programs
+- Curriculum development
+- Training underrepresented students
+- Public science communication
+- Open-source software development
+
+---
+
+### NSF Budget
+
+**Typical Categories**:
+- **Senior Personnel**: PI, co-PIs (% effort, salary)
+- **Other Personnel**: Postdocs, graduate students, undergrads
+- **Fringe Benefits**: Institutional rates
+- **Equipment**: Items >$5,000
+- **Travel**: Domestic and foreign
+- **Participant Support**: Workshops, conferences (separate category)
+- **Other Direct Costs**: Materials, publication, subawards
+- **Indirect Costs**: Institutional F&A rate
+
+**Budget Justification**: Explain need for each item
+
+---
+
+### NSF Data Management Plan (2 pages)
+
+**Required Content**:
+- Types of data produced
+- Standards for data format and metadata
+- Policies for access and sharing
+- Policies for re-use and redistribution
+- Plans for archiving and preservation
+
+**Acceptable Approaches**:
+- Deposit in domain-specific repository
+- Institutional repository
+- Data available upon request (with restrictions justification)
+
+---
+
+### NSF Review Process
+
+**Review Criteria** (equally weighted):
+
+1. **Intellectual Merit**:
+ - What is the potential to advance knowledge?
+ - How well-conceived and organized?
+ - Qualifications of PI and team?
+ - Availability of resources?
+
+2. **Broader Impacts**:
+ - What are the potential benefits to society?
+ - How well-suited to achieve broader impacts?
+
+**Panel Review**: Proposals reviewed by panel of experts
+**Timeline**: Typically 6 months from deadline to award decision
+
+---
+
+### NSF LaTeX Templates
+
+- **Full Proposal**: `assets/grants/nsf_proposal_template.tex`
+- **Project Summary**: `assets/grants/nsf_project_summary.tex`
+- **Biographical Sketch**: Use NSF SciENcv or template
+
+**Resources**:
+- NSF PAPPG: https://www.nsf.gov/publications/pub_summ.jsp?ods_key=pappg
+- NSF Fastlane: https://www.fastlane.nsf.gov/
+
+---
+
+## NIH (National Institutes of Health)
+
+### Overview
+
+**Agency**: National Institutes of Health
+**Funding Mechanisms**:
+- **R01**: Research Project Grant (most common)
+- **R21**: Exploratory/Developmental Research Grant
+- **K Awards**: Career Development Awards
+**Success Rate**: 10-20% (varies by institute and mechanism)
+
+---
+
+### NIH R01 Research Grant
+
+**Page Limits** (Research Strategy):
+
+| Component | Page Limit | Font | Spacing |
+|-----------|-----------|------|---------|
+| **Specific Aims** | 1 page | Arial 11pt minimum | Any |
+| **Research Strategy** | 12 pages | Arial 11pt minimum | 0.5 inch margins minimum |
+| - Significance | Part of 12 | | |
+| - Innovation | Part of 12 | | |
+| - Approach | Part of 12 | | |
+| **Bibliography** | No limit | Arial 11pt | |
+| **Biographical Sketch** | 5 pages per person | Arial 11pt | |
+
+**Margins**: 0.5 inch minimum (all sides)
+**Paper Size**: Letter (8.5 × 11 inches)
+
+---
+
+### NIH Specific Aims Page (1 page)
+
+**THE MOST CRITICAL COMPONENT**
+
+**Structure** (recommended):
+
+1. **Opening paragraph** (2-3 sentences)
+ - Hook: Significance of problem
+ - Gap: What's not known
+
+2. **Long-term goal** (1 sentence)
+ - Overarching research vision
+
+3. **Objective** (1-2 sentences)
+ - What this proposal will accomplish
+ - Central hypothesis
+
+4. **Rationale** (2-3 sentences)
+ - Why you expect success
+ - Preliminary data supporting hypothesis
+
+5. **Specific Aims** (3 aims typical)
+ - **Aim 1**: [Title]. [1-2 sentence description. Working hypothesis. Expected outcome.]
+ - **Aim 2**: [Title]. [1-2 sentence description. Working hypothesis. Expected outcome.]
+ - **Aim 3**: [Title]. [1-2 sentence description. Working hypothesis. Expected outcome.]
+
+6. **Payoff paragraph** (2-3 sentences)
+ - Impact and significance
+ - Innovation
+ - Future directions
+
+**Best Practices**:
+- Crystal clear, compelling narrative
+- State hypothesis explicitly
+- Explain expected outcomes
+- Show innovation and impact
+
+**Template**: `assets/grants/nih_specific_aims.tex`
+
+---
+
+### NIH Research Strategy (12 pages)
+
+**Required Sections**:
+
+#### 1. Significance (typically 2-3 pages)
+- **Importance**: Critical barrier to progress
+- **Knowledge gap**: What's not known
+- **Impact**: How project advances field
+- **Rigor**: Scientific premise/prior work
+- **References**: Cite key literature
+
+#### 2. Innovation (typically 1-2 pages)
+- **Novelty**: New concepts, approaches, methods
+- **Challenge paradigms**: Shift thinking
+- **Refined/new methodologies**: Technical innovation
+- **Novel applications**: Existing tools in new ways
+
+#### 3. Approach (typically 7-9 pages)
+**For Each Aim**:
+- **Rationale**: Why this aim
+- **Experimental design**: Detailed methods
+- **Expected outcomes**: What results mean
+- **Potential problems & alternatives**: Mitigation strategies
+- **Rigor and reproducibility**: Controls, replication, statistics
+- **Timeline**: When each aim completed
+
+**Additional Approach Content**:
+- Preliminary data (critical for R01)
+- Power analyses for sample sizes
+- Statistical analysis plans
+- Rigor of prior research cited
+
+---
+
+### NIH Biographical Sketch (5 pages)
+
+**Sections** (NIH format):
+1. **Personal Statement** (4 sentences explaining why you're suited)
+2. **Positions, Honors, and Scientific Appointments**
+3. **Contributions to Science** (Up to 5 contributions, up to 4 pubs each)
+4. **Research Support** (current and completed grants, overlap checked)
+
+**Format**: Must use NIH template (fillable PDF or format page)
+
+---
+
+### NIH Review Criteria
+
+**Scored Criteria** (1-9 scale, 1=best):
+1. **Significance**: Importance, impact
+2. **Investigator(s)**: Qualifications, track record
+3. **Innovation**: Novel concepts, methods
+4. **Approach**: Feasibility, rigor, design
+5. **Environment**: Institutional support, resources
+
+**Additional Considerations** (not scored but noted):
+- Vertebrate animals
+- Biohazards
+- Human subjects protections
+- Inclusion of women, minorities, children
+- Budget appropriateness
+
+**Overall Impact Score**: 1-9 (synthesizes all criteria)
+
+---
+
+### NIH R21 (Exploratory Grant)
+
+**Key Differences from R01**:
+- **Research Strategy**: 6 pages (vs. 12 for R01)
+- **Duration**: 2 years maximum
+- **Budget**: $275K total costs over 2 years
+- **Preliminary data**: Not required (exploratory nature)
+- **Purpose**: High-risk, high-reward projects; new directions
+
+**When to Choose R21 vs. R01**:
+- R21: Early-stage, limited preliminary data, high-risk
+- R01: Established line of research, strong preliminary data
+
+---
+
+### NIH K Awards (Career Development)
+
+**Mechanisms**:
+- **K01**: Mentored Research Scientist Development Award
+- **K08**: Mentored Clinical Scientist Research Career Development Award
+- **K23**: Mentored Patient-Oriented Research Career Development Award
+- **K99/R00**: Pathway to Independence Award (postdoc to faculty)
+
+**Key Components**:
+- **Career Development Plan**: Training goals, timeline
+- **Research Plan**: 6-12 pages (mechanism-dependent)
+- **Mentor(s)**: Letters of support, mentoring plan
+- **Institutional Commitment**: Environment, resources
+- **Protected Time**: 75% research effort typical
+
+---
+
+### NIH Budget
+
+**Modular vs. Detailed**:
+- **Modular**: ≤$250K direct costs per year (25K increments)
+- **Detailed**: >$250K direct costs per year
+
+**Modular Budget**: Only need budget justification for personnel, consortium, equipment >$25K
+
+**Budget Period**: Year-by-year (usually 5 years for R01)
+
+---
+
+### NIH LaTeX Templates
+
+- **R01 Full Proposal**: `assets/grants/nih_r01_template.tex`
+- **Specific Aims**: `assets/grants/nih_specific_aims.tex`
+- **Biographical Sketch**: Use NIH fillable PDF or format page
+
+**Resources**:
+- NIH Application Guide: https://grants.nih.gov/grants/how-to-apply-application-guide.html
+- SF424 Forms: https://grants.nih.gov/grants/how-to-apply-application-guide/forms-e/general-forms-e.pdf
+
+---
+
+## DOE (Department of Energy)
+
+### Overview
+
+**Agency**: U.S. Department of Energy
+**Offices**:
+- **Office of Science**: Basic research (BES, BER, ASCR, NP, HEP, FES)
+- **ARPA-E**: High-risk, high-reward energy technologies
+- **EERE**: Energy efficiency and renewable energy
+
+**Typical Award**: $200K-$1M per year, 3 years
+**Success Rate**: 10-30% (varies by program)
+
+---
+
+### DOE Office of Science Proposal
+
+**Page Limits** (typical, varies by FOA):
+
+| Component | Page Limit | Format |
+|-----------|-----------|--------|
+| **Project Narrative** | 10-20 pages | Times 11pt, 1" margins |
+| **References** | No limit | |
+| **Budget Justification** | 3-5 pages | |
+| **Biographical Sketches** | 2-3 pages each | |
+| **Current & Pending** | No limit | |
+| **Facilities & Resources** | No limit | |
+| **Data Management Plan** | 2 pages | |
+
+---
+
+### DOE Project Narrative Structure
+
+**Typical Sections**:
+
+1. **Background and Significance** (2-3 pages)
+ - Energy relevance
+ - Current state of knowledge
+ - Research need
+
+2. **Preliminary Work** (1-2 pages)
+ - Team's qualifications
+ - Relevant prior results
+
+3. **Research Plan** (10-15 pages)
+ - **Objectives**: Clear goals
+ - **Technical approach**: Detailed methods
+ - **Milestones and deliverables**: Specific, measurable
+ - **Timeline**: Gantt chart common
+ - **Team and management**: Roles, collaboration
+
+4. **Broader Impacts** (1-2 pages)
+ - Workforce development
+ - Technology transfer potential
+ - Publications and dissemination
+
+---
+
+### DOE-Specific Requirements
+
+**Energy Relevance**: Must clearly tie to DOE mission
+- Basic science: Fundamental understanding for energy applications
+- Applied: Energy efficiency, renewable energy, grid, storage
+
+**Technology Readiness Levels (TRLs)**: Often required to specify
+- **TRL 1-3**: Basic research, proof of concept
+- **TRL 4-6**: Component/subsystem validation
+- **TRL 7-9**: System demonstration, deployment
+
+**National Laboratory Collaboration**: Encouraged
+- Include lab scientists as co-PIs or collaborators
+- Letter of collaboration from lab
+
+**Cost Sharing**: Sometimes required (check FOA)
+- Can be in-kind (equipment, time)
+- Must be documented
+
+---
+
+### DOE Budget Considerations
+
+**Allowable Costs**:
+- Personnel (salaries, benefits)
+- Equipment
+- Travel (especially to DOE national labs)
+- Materials and supplies
+- Subcontracts
+- Indirect costs (negotiated F&A rate)
+
+**Unallowable**:
+- Construction
+- Entertainment
+- Some indirect costs (depends on institution type)
+
+---
+
+### DOE LaTeX Template
+
+**Template**: `assets/grants/doe_proposal_template.tex`
+
+**Resources**:
+- DOE Office of Science Funding: https://science.osti.gov/grants
+- EERE Funding: https://www.energy.gov/eere/funding/eere-funding-opportunities
+
+---
+
+## DARPA (Defense Advanced Research Projects Agency)
+
+### Overview
+
+**Agency**: Defense Advanced Research Projects Agency (DoD)
+**Mission**: High-risk, high-reward research for national security
+**Typical Award**: $500K-$5M per year, 2-4 years
+**Success Rate**: 5-15% (highly competitive)
+
+---
+
+### DARPA BAA (Broad Agency Announcement) Response
+
+**Page Limits** (typical, varies by BAA):
+
+| Component | Page Limit | Format |
+|-----------|-----------|--------|
+| **Technical and Management Proposal** | 20-25 pages | Times 12pt, 1" margins |
+| **Cost Proposal** | Separate volume | |
+
+---
+
+### DARPA Technical Proposal Structure
+
+**Key Sections**:
+
+1. **Executive Summary** (1 page)
+ - Vision and impact
+ - Technical approach overview
+ - Team qualifications
+
+2. **Heilmeier Catechism** (1-2 pages)
+ DARPA requires answering these questions:
+ - **What are you trying to do?** Articulate objectives without jargon
+ - **How is it done today? Limitations?** Current practice and shortcomings
+ - **What is new in your approach?** Innovation
+ - **Who cares?** Impact if successful
+ - **If successful, what difference will it make?** Transformation
+ - **What are the risks?** Technical risks and mitigation
+ - **How much will it cost?** Budget overview
+ - **How long will it take?** Timeline
+ - **What are the mid-term and final exams?** Milestones for success
+
+3. **Technical Approach** (10-15 pages)
+ - Detailed technical plan
+ - Task breakdown
+ - Risk mitigation
+ - Innovation justification
+
+4. **Management Plan** (2-3 pages)
+ - Team organization
+ - Key personnel roles
+ - Collaboration approach
+ - Milestone schedule (Gantt chart)
+
+5. **Capabilities and Experience** (2-3 pages)
+ - Team qualifications
+ - Relevant facilities and equipment
+ - Similar past programs
+
+6. **Transition Plan** (1-2 pages)
+ - Path to DoD transition
+ - End users identified
+ - Technology transfer approach
+
+---
+
+### DARPA-Specific Considerations
+
+**Engagement with Program Manager (PM)**:
+- **Strongly encouraged** to contact PM before submission
+- Discuss idea alignment with program goals
+- PM can provide feedback on approach
+
+**Transformative Impact**:
+- Must demonstrate potential for "game-changing" impact
+- Not incremental improvements
+
+**Technical Risk**:
+- High-risk approaches acceptable (even encouraged)
+- Must show mitigation strategies
+
+**National Security Relevance**:
+- Clear connection to defense applications
+- Dual-use (civilian + military) often valuable
+
+**Metrics for Success**:
+- Quantifiable milestones
+- "Go/no-go" decision points
+
+---
+
+### DARPA Budget
+
+**Full Cost Accounting**: Detailed justification required
+- **Labor**: Hourly rates, hours per task
+- **Materials**: Itemized
+- **Equipment**: Justification for purchases
+- **Travel**: Specific trips with purpose
+- **Subcontracts**: Detailed subcontract budgets
+- **Indirect Costs**: Negotiated rates
+
+**Cost Realism**: Budget must be realistic for proposed work
+
+---
+
+### DARPA LaTeX Template
+
+**Template**: `assets/grants/darpa_baa_response.tex`
+
+**Resources**:
+- DARPA Opportunities: https://www.darpa.mil/work-with-us/opportunities
+- BAA Listings: SAM.gov (formerly FedBizOpps)
+
+---
+
+## Private Foundations
+
+### Gates Foundation
+
+**Focus Areas**: Global health, poverty alleviation, education
+**Typical Award**: Varies widely ($100K to $10M+)
+
+**Proposal Requirements**:
+- **Letter of Inquiry** (2-3 pages): Initial screening
+- **Full Proposal** (if invited): 10-15 pages
+- **Theory of Change**: How intervention leads to impact
+- **Monitoring & Evaluation**: Metrics, data collection
+
+**Key Emphases**:
+- Scalability and sustainability
+- Impact in low-resource settings
+- Partnerships with local organizations
+- Data-driven decision making
+
+---
+
+### Wellcome Trust
+
+**Focus**: Biomedical research, global health
+**Geographic**: UK and international
+**Typical Award**: £100K to £5M
+
+**Proposal Format** (varies by scheme):
+- **Investigator Awards**: Track record and research vision
+- **Project Grants**: Specific research project
+- **Career Development**: Early/mid-career researchers
+
+**Requirements**:
+- Research plan
+- Track record
+- Value for money justification
+- Patient and public involvement
+
+---
+
+### Howard Hughes Medical Institute (HHMI)
+
+**Type**: Investigator appointments (not grants)
+**Award**: ~$9M over 7 years (renewable)
+**Focus**: Biomedical research, early-career scientists
+
+**Selection**:
+- Nomination by institution
+- Track record of innovation
+- Research vision for next 5-7 years
+- Scientific leadership potential
+
+---
+
+### Chan Zuckerberg Initiative (CZI)
+
+**Focus**: Science, education, justice & opportunity
+**Award Types**:
+- **Imaging**: Advanced imaging technologies
+- **Neurodegeneration Challenge**: AD, ALS, PD, FTD
+- **Single-Cell Biology**: Tools and resources
+
+**Emphasis**:
+- Open science (data sharing, open-source)
+- Collaboration across institutions
+- Technology development
+- Diversity and inclusion
+
+---
+
+## Quick Reference Table
+
+| Agency | Typical Award | Duration | Key Criteria | Template |
+|--------|--------------|----------|--------------|----------|
+| **NSF** | $100K-500K/yr | 3-5 yrs | Intellectual Merit + Broader Impacts | `nsf_proposal_template.tex` |
+| **NIH R01** | $250K-500K/yr | 5 yrs | Significance, Innovation, Approach | `nih_r01_template.tex` |
+| **NIH R21** | $275K total | 2 yrs | Exploratory, high-risk | `nih_r21_template.tex` |
+| **DOE** | $200K-1M/yr | 3 yrs | Energy relevance, TRLs | `doe_proposal_template.tex` |
+| **DARPA** | $500K-5M/yr | 2-4 yrs | Transformative, Heilmeier | `darpa_baa_response.tex` |
+
+---
+
+## General Best Practices
+
+### Writing Effective Proposals
+
+1. **Start early**: 2-3 months minimum
+2. **Read the call carefully**: Follow requirements exactly
+3. **Know your reviewers**: Write for expert audience
+4. **Tell a story**: Compelling narrative with clear logic
+5. **Be specific**: Concrete objectives, methods, outcomes
+6. **Show feasibility**: Preliminary data, expertise
+7. **Address weaknesses**: Acknowledge and mitigate risks
+
+### Common Mistakes to Avoid
+
+1. **Vague objectives**: "Understand X" → "Determine whether X causes Y"
+2. **Lack of innovation**: Incremental vs. transformative
+3. **Poor broader impacts** (NSF): Generic, unintegrated
+4. **Weak specific aims** (NIH): Most critical page!
+5. **Missing preliminary data**: Show feasibility
+6. **Unrealistic timeline**: Be honest about what's achievable
+7. **Formatting violations**: Auto-rejection possible
+8. **Typos and errors**: Suggests lack of care
+
+### Timeline for Proposal Development
+
+**3 months before deadline**:
+- Identify opportunity
+- Assemble team
+- Outline aims/objectives
+
+**2 months before**:
+- Draft aims/objectives
+- Preliminary budget
+- Contact program officer (if allowed)
+
+**1 month before**:
+- Full first draft
+- Internal review
+- Revise based on feedback
+
+**2 weeks before**:
+- Final revisions
+- Proofread carefully
+- Assemble all documents
+
+**1 week before**:
+- Institutional review/approval
+- Budget finalization
+- Submission system upload
+
+**2 days before**:
+- Final check
+- Submit (don't wait until deadline!)
+
+---
+
+## Resources
+
+### Grant Writing Guides
+- NSF PAPPG: https://www.nsf.gov/publications/pub_summ.jsp?ods_key=pappg
+- NIH Application Guide: https://grants.nih.gov/grants/how-to-apply-application-guide.html
+- GrantForward (database): https://www.grantforward.com/
+- Pivot (database): https://pivot.proquest.com/
+
+### Institutional Resources
+- Office of Sponsored Research (OSR)
+- Grant writing workshops
+- Internal mock reviews
+- Budget/compliance offices
+
+---
+
+## Summary
+
+**Key Takeaways**:
+
+1. **Know the agency**: Different missions, different emphases
+2. **Follow the rules**: Page limits, fonts, margins strictly enforced
+3. **Tell a compelling story**: Clear problem, innovative solution, feasible plan
+4. **Demonstrate impact**: Intellectual merit (NSF/NIH) or mission relevance (DOE/DARPA)
+5. **Show feasibility**: Preliminary data, team expertise, resources
+6. **Budget realistically**: Justify all costs
+7. **Proofread carefully**: Typos undermine credibility
+8. **Submit early**: Technical glitches happen
+
+**Remember**: Grant writing is a skill developed over time. Seek feedback, revise, and persist!
+
diff --git a/scientific-skills/venue-templates/references/journals_formatting.md b/scientific-skills/venue-templates/references/journals_formatting.md
new file mode 100644
index 0000000..4f1f799
--- /dev/null
+++ b/scientific-skills/venue-templates/references/journals_formatting.md
@@ -0,0 +1,486 @@
+# Journal Formatting Requirements
+
+Comprehensive formatting requirements and submission guidelines for major scientific journals across disciplines.
+
+**Last Updated**: 2024
+
+---
+
+## Nature Portfolio
+
+### Nature
+
+**Journal Type**: Top-tier multidisciplinary science journal
+**Publisher**: Nature Publishing Group
+**Impact Factor**: ~64 (varies by year)
+
+**Formatting Requirements**:
+- **Length**: Articles ~3,000 words (excluding Methods, References, Figure Legends)
+- **Structure**: Title, Authors, Affiliations, Abstract (≤200 words), Main text, Methods, References, Acknowledgements, Author Contributions, Competing Interests, Figure Legends
+- **Format**: Single column for submission (final published version is two-column)
+- **Font**: Any standard font (Times, Arial, Helvetica), 12pt
+- **Line spacing**: Double-spaced
+- **Margins**: 2.5 cm (1 inch) all sides
+- **Page numbers**: Required on all pages
+- **Citations**: Numbered sequentially in superscript¹'²'³
+- **References**: Nature style (abbreviated journal names)
+ - Format: Author, A. A., Author, B. B. & Author, C. C. Article title. *Journal Abbrev.* **vol**, pages (year).
+ - Example: Watson, J. D. & Crick, F. H. C. Molecular structure of nucleic acids. *Nature* **171**, 737–738 (1953).
+- **Figures**:
+ - Format: TIFF, EPS, PDF (vector preferred)
+ - Resolution: 300-600 dpi for photos, 1000 dpi for line art
+ - Color: RGB or CMYK
+ - Size: Fit to single column (89 mm) or double column (183 mm)
+ - Legends: Provided separately, not embedded in figure
+- **Tables**: Editable format (Word, Excel), not as images
+- **Supplementary Info**: Unlimited, PDF format preferred
+
+**LaTeX Template**: `assets/journals/nature_article.tex`
+
+**Author Guidelines**: https://www.nature.com/nature/for-authors
+
+---
+
+### Nature Communications
+
+**Journal Type**: Open-access multidisciplinary journal
+**Publisher**: Nature Publishing Group
+
+**Formatting Requirements**:
+- **Length**: No strict limit (typically 5,000-8,000 words)
+- **Structure**: Same as Nature (Title, Abstract, Main text, Methods, References, etc.)
+- **Format**: Single column
+- **Font**: Times New Roman, Arial, or similar, 12pt
+- **Line spacing**: Double-spaced
+- **Margins**: 2.5 cm all sides
+- **Citations**: Numbered sequentially in superscript
+- **References**: Nature style (same as Nature)
+- **Figures**: Same requirements as Nature
+- **Tables**: Same requirements as Nature
+- **Open Access**: All articles are open access (APC applies)
+
+**LaTeX Template**: `assets/journals/nature_communications.tex`
+
+---
+
+### Nature Methods, Nature Biotechnology, Nature Machine Intelligence
+
+**Formatting**: Same as Nature Communications (Nature family journals share similar formatting)
+
+**Discipline-Specific Notes**:
+- **Nature Methods**: Emphasize methodological innovation and validation
+- **Nature Biotechnology**: Focus on biotechnology applications and translation
+- **Nature Machine Intelligence**: AI/ML applications across disciplines
+
+---
+
+## Science Family
+
+### Science
+
+**Journal Type**: Top-tier multidisciplinary science journal
+**Publisher**: American Association for the Advancement of Science (AAAS)
+
+**Formatting Requirements**:
+- **Length**:
+ - Research Articles: 2,500 words (text only, excluding refs/figs)
+ - Reports: 2,500 words maximum
+- **Structure**: Title, Authors, Affiliations, Abstract (≤125 words), Main text, Materials and Methods, References, Acknowledgments, Supplementary Materials
+- **Format**: Single column for submission
+- **Font**: Times New Roman, 12pt
+- **Line spacing**: Double-spaced
+- **Margins**: 1 inch all sides
+- **Citations**: Numbered sequentially in parentheses (1, 2, 3)
+- **References**: Science style (no article titles in main refs, moved to supplementary)
+ - Format: A. Author, B. Author, *Journal Abbrev.* **vol**, pages (year).
+ - Example: J. D. Watson, F. H. C. Crick, *Nature* **171**, 737 (1953).
+- **Figures**:
+ - Format: PDF, EPS, TIFF
+ - Resolution: 300 dpi minimum
+ - Color: RGB
+ - Size: Maximum width 9 cm (single column) or 18.3 cm (double column)
+ - Figures count toward page limit
+- **Tables**: Include in main text or as separate files
+- **Supplementary Materials**: Extensive materials allowed
+
+**LaTeX Template**: `assets/journals/science_article.tex`
+
+**Author Guidelines**: https://www.science.org/content/page/instructions-authors
+
+---
+
+### Science Advances
+
+**Journal Type**: Open-access multidisciplinary journal
+**Publisher**: AAAS
+
+**Formatting Requirements**:
+- **Length**: No strict word limit (but concise writing encouraged)
+- **Structure**: Similar to Science (more flexible)
+- **Format**: Single column
+- **Font**: Times New Roman, 12pt
+- **Citations**: Numbered in parentheses
+- **References**: Science style
+- **Figures**: Same as Science
+- **Open Access**: All articles open access
+
+**LaTeX Template**: `assets/journals/science_advances.tex`
+
+---
+
+## PLOS (Public Library of Science)
+
+### PLOS ONE
+
+**Journal Type**: Open-access multidisciplinary journal
+**Publisher**: Public Library of Science
+
+**Formatting Requirements**:
+- **Length**: No maximum length
+- **Structure**: Title, Authors, Affiliations, Abstract, Introduction, Materials and Methods, Results, Discussion, Conclusions (optional), References, Supporting Information
+- **Format**: Editable file (LaTeX, Word, RTF)
+- **Font**: Times, Arial, or Helvetica, 10-12pt
+- **Line spacing**: Double-spaced
+- **Margins**: 1 inch (2.54 cm) all sides
+- **Page numbers**: Required
+- **Citations**: Vancouver style, numbered in brackets [1], [2], [3]
+- **References**: Vancouver/NLM format
+ - Format: Author AA, Author BB, Author CC. Article title. Journal Abbrev. Year;vol(issue):pages. doi:xx.xxxx
+ - Example: Watson JD, Crick FHC. Molecular structure of nucleic acids. Nature. 1953;171(4356):737-738.
+- **Figures**:
+ - Format: TIFF, EPS, PDF, PNG
+ - Resolution: 300-600 dpi
+ - Color: RGB
+ - Legends: Provided in main text after references
+- **Tables**: Editable format, one per page
+- **Data Availability**: Statement required
+- **Open Access**: All articles open access (APC applies)
+
+**LaTeX Template**: `assets/journals/plos_one.tex`
+
+**Author Guidelines**: https://journals.plos.org/plosone/s/submission-guidelines
+
+---
+
+### PLOS Biology, PLOS Computational Biology, etc.
+
+**Formatting**: Similar to PLOS ONE with discipline-specific variations
+
+**Key Differences**:
+- PLOS Biology: More selective, emphasizes broad significance
+- PLOS Comp Bio: Focus on computational methods and models
+
+---
+
+## Cell Press
+
+### Cell
+
+**Journal Type**: Top-tier biology journal
+**Publisher**: Cell Press (Elsevier)
+
+**Formatting Requirements**:
+- **Length**:
+ - Articles: ~5,000 words (excluding Methods, References)
+ - Short Articles: ~2,500 words
+- **Structure**: Summary (≤150 words), Keywords, Introduction, Results, Discussion, Experimental Procedures, Acknowledgments, Author Contributions, Declaration of Interests, References
+- **Format**: Double-spaced
+- **Font**: 12pt
+- **Margins**: 1 inch all sides
+- **Citations**: Author-year format (Smith et al., 2023)
+- **References**: Cell style
+ - Format: Author, A.A., and Author, B.B. (Year). Title. *Journal* vol, pages.
+ - Example: Watson, J.D., and Crick, F.H. (1953). Molecular structure of nucleic acids. *Nature* 171, 737-738.
+- **Figures**:
+ - Format: TIFF, EPS preferred
+ - Resolution: 300 dpi photos, 1000 dpi line art
+ - Color: RGB or CMYK
+ - Multipanel figures common
+- **Tables**: Editable format
+- **eTOC Blurb**: 30-50 word summary required
+- **Graphical Abstract**: Required
+
+**LaTeX Template**: `assets/journals/cell_article.tex`
+
+**Author Guidelines**: https://www.cell.com/cell/authors
+
+---
+
+### Neuron, Immunity, Molecular Cell, Developmental Cell
+
+**Formatting**: Similar to Cell with discipline-specific expectations
+
+---
+
+## IEEE Transactions
+
+### IEEE Transactions on [Various Topics]
+
+**Journal Type**: Engineering and computer science journals
+**Publisher**: Institute of Electrical and Electronics Engineers
+
+**Formatting Requirements**:
+- **Length**: Varies by transaction (typically 8-12 pages in final format)
+- **Structure**: Abstract, Index Terms, Introduction, [Body sections], Conclusion, Acknowledgment, References, Biographies
+- **Format**: Two-column
+- **Font**: Times New Roman, 10pt
+- **Column spacing**: 0.17 inch (4.23 mm)
+- **Margins**:
+ - Top: 19 mm (0.75 in)
+ - Bottom: 25 mm (1 in)
+ - Side: 17 mm (0.67 in)
+- **Citations**: Numbered in square brackets [1], [2], [3]
+- **References**: IEEE style
+ - Format: [1] A. A. Author, "Title of paper," *Journal Abbrev.*, vol. x, no. x, pp. xxx-xxx, Mon. Year.
+ - Example: [1] J. D. Watson and F. H. C. Crick, "Molecular structure of nucleic acids," *Nature*, vol. 171, pp. 737-738, Apr. 1953.
+- **Figures**:
+ - Format: EPS, PDF (vector), TIFF (raster)
+ - Resolution: 600-1200 dpi line art, 300 dpi grayscale/color
+ - Color: RGB for online, CMYK for print if needed
+ - Position: Top or bottom of column
+- **Tables**: LaTeX table environment, positioned at top/bottom
+- **Equations**: Numbered consecutively
+
+**LaTeX Template**: `assets/journals/ieee_trans.tex`
+
+**Author Guidelines**: https://journals.ieeeauthorcenter.ieee.org/
+
+---
+
+### IEEE Access
+
+**Journal Type**: Open-access multidisciplinary engineering journal
+**Publisher**: IEEE
+
+**Formatting**: Similar to IEEE Transactions
+- **Length**: No page limits
+- **Open Access**: All articles open access
+- **Rapid publication**: Faster review than Transactions
+
+**LaTeX Template**: `assets/journals/ieee_access.tex`
+
+---
+
+## ACM Publications
+
+### ACM Transactions
+
+**Journal Type**: Computer science transactions
+**Publisher**: Association for Computing Machinery
+
+**Formatting Requirements**:
+- **Length**: No strict limit
+- **Structure**: Abstract, CCS Concepts, Keywords, ACM Reference Format, Introduction, [Body], Conclusion, Acknowledgments, References
+- **Format**: Two-column (final), single-column for submission OK
+- **Font**: Depends on template (usually 9-10pt)
+- **Class**: Use `acmart` LaTeX document class
+- **Citations**: Numbered [1] or author-year depending on venue
+- **References**: ACM style
+ - Format: Author. Year. Title. Journal vol, issue (Year), pages. DOI
+ - Example: James D. Watson and Francis H. C. Crick. 1953. Molecular structure of nucleic acids. Nature 171, 4356 (1953), 737-738. https://doi.org/10.1038/171737a0
+- **Figures**: EPS, PDF (vector preferred), high-resolution raster
+- **CCS Concepts**: Required (ACM Computing Classification System)
+- **Keywords**: Required
+
+**LaTeX Template**: `assets/journals/acm_article.tex`
+
+**Author Guidelines**: https://www.acm.org/publications/authors
+
+---
+
+## Springer Journals
+
+### General Springer Journals
+
+**Publisher**: Springer Nature
+
+**Formatting Requirements**:
+- **Length**: Varies by journal (check specific journal)
+- **Format**: Single column for submission (LaTeX or Word)
+- **Font**: 10-12pt
+- **Line spacing**: Double or 1.5
+- **Citations**: Numbered or author-year (varies by journal)
+- **References**: Springer style (similar to Vancouver or author-year)
+ - Numbered: Author AA, Author BB (Year) Title. Journal vol:pages
+ - Author-year: Author AA, Author BB (Year) Title. Journal vol:pages
+- **Figures**: TIFF, EPS, PDF; 300+ dpi
+- **Tables**: Editable format
+- **Document Class**: `svjour3` for many Springer journals
+
+**LaTeX Template**: `assets/journals/springer_article.tex`
+
+**Author Guidelines**: Varies by specific journal
+
+---
+
+## Elsevier Journals
+
+### General Elsevier Journals
+
+**Publisher**: Elsevier
+
+**Formatting Requirements**:
+- **Length**: Varies widely by journal
+- **Format**: Single column (LaTeX or Word)
+- **Font**: 12pt
+- **Line spacing**: Double-spaced
+- **Citations**: Numbered or author-year (check journal guide)
+- **References**: Style varies by journal (Harvard, Vancouver, numbered)
+ - Check specific journal's "Guide for Authors"
+- **Figures**: TIFF, EPS; 300+ dpi
+- **Tables**: Editable format
+- **Document Class**: `elsarticle` LaTeX class
+
+**LaTeX Template**: `assets/journals/elsevier_article.tex`
+
+**Author Guidelines**: https://www.elsevier.com/authors (select specific journal)
+
+---
+
+## BMC Journals
+
+### BMC Biology, BMC Bioinformatics, etc.
+
+**Publisher**: BioMed Central (Springer Nature)
+
+**Formatting Requirements**:
+- **Length**: No maximum length
+- **Structure**: Abstract (structured), Keywords, Background, [Methods/Results/Discussion], Conclusions, Abbreviations, Declarations (Ethics, Consent, Availability, Competing interests, Funding, Authors' contributions, Acknowledgements), References
+- **Format**: Single column
+- **Font**: Arial or Times, 12pt
+- **Line spacing**: Double
+- **Citations**: Vancouver style, numbered in brackets [1]
+- **References**: Vancouver/NLM format
+- **Figures**: TIFF, EPS, PNG; 300+ dpi
+- **Tables**: Editable
+- **Open Access**: All BMC journals are open access
+- **Data Availability**: Statement required
+
+**LaTeX Template**: `assets/journals/bmc_article.tex`
+
+**Author Guidelines**: https://www.biomedcentral.com/getpublished
+
+---
+
+## Frontiers Journals
+
+### Frontiers in [Various Topics]
+
+**Publisher**: Frontiers Media
+
+**Formatting Requirements**:
+- **Length**: Varies by article type (Research Article ~12 pages, Brief Research Report ~4 pages)
+- **Structure**: Abstract, Keywords, Introduction, Materials and Methods, Results, Discussion, Conclusion, Data Availability Statement, Ethics Statement, Author Contributions, Funding, Acknowledgments, Conflict of Interest, References
+- **Format**: Single column
+- **Font**: Times New Roman, 12pt
+- **Line spacing**: Double
+- **Citations**: Numbered (Frontiers style)
+- **References**: Frontiers format
+ - Format: Author A., Author B., Author C. (Year). Title. *Journal Abbrev.* vol:pages. doi
+ - Example: Watson J. D., Crick F. H. C. (1953). Molecular structure of nucleic acids. *Nature* 171:737-738. doi:10.1038/171737a0
+- **Figures**: TIFF, EPS; 300 dpi minimum
+- **Tables**: Editable
+- **Open Access**: All Frontiers journals are open access
+- **Figure Legends**: Detailed, 350 words max per figure
+
+**LaTeX Template**: `assets/journals/frontiers_article.tex`
+
+**Author Guidelines**: https://www.frontiersin.org/guidelines/author-guidelines
+
+---
+
+## Specialized Journals
+
+### PNAS (Proceedings of the National Academy of Sciences)
+
+**Formatting Requirements**:
+- **Length**: 6 pages (text, figures, tables combined)
+- **Abstract**: 250 words max
+- **Significance Statement**: 120 words max (required)
+- **Structure**: Abstract, Significance, Main text, Materials and Methods, Acknowledgments, References
+- **Format**: Single column
+- **Citations**: Numbered
+- **References**: PNAS style
+- **LaTeX Class**: `pnas-new`
+
+**LaTeX Template**: `assets/journals/pnas_article.tex`
+
+---
+
+### Physical Review Letters (PRL)
+
+**Publisher**: American Physical Society
+
+**Formatting Requirements**:
+- **Length**: 4 pages (including figures and references)
+- **Format**: Two-column (REVTeX 4.2)
+- **Abstract**: No more than 600 characters
+- **Citations**: Numbered
+- **References**: APS style
+- **Document Class**: `revtex4-2`
+
+**LaTeX Template**: `assets/journals/prl_article.tex`
+
+---
+
+### New England Journal of Medicine (NEJM)
+
+**Formatting Requirements**:
+- **Length**: Original Articles ~3,000 words
+- **Structure**: Abstract (structured, 250 words), Introduction, Methods, Results, Discussion, References
+- **Format**: Double-spaced
+- **Citations**: Numbered
+- **References**: NEJM style (modified Vancouver)
+- **Figures**: High resolution, professional quality
+- **Word submission preferred** (LaTeX less common)
+
+---
+
+### The Lancet
+
+**Formatting Requirements**:
+- **Length**: Articles ~3,000 words
+- **Abstract**: Structured, 300 words
+- **Structure**: Panel (summary box), Introduction, Methods, Results, Discussion, References
+- **Citations**: Numbered
+- **References**: Lancet style (modified Vancouver)
+- **Word preferred** for submission
+
+---
+
+## Quick Reference Table
+
+| Journal | Max Length | Format | Citations | Template |
+|---------|-----------|--------|-----------|----------|
+| **Nature** | ~3,000 words | Single col | Superscript | `nature_article.tex` |
+| **Science** | 2,500 words | Single col | (1) brackets | `science_article.tex` |
+| **PLOS ONE** | Unlimited | Single col | [1] Vancouver | `plos_one.tex` |
+| **Cell** | ~5,000 words | Double sp | (Author, year) | `cell_article.tex` |
+| **IEEE Trans** | 8-12 pages | Two col | [1] IEEE | `ieee_trans.tex` |
+| **ACM Trans** | Variable | Two col | [1] or author-yr | `acm_article.tex` |
+| **Springer** | Variable | Single col | Numbered/author-yr | `springer_article.tex` |
+| **BMC** | Unlimited | Single col | [1] Vancouver | `bmc_article.tex` |
+| **Frontiers** | ~12 pages | Single col | Numbered | `frontiers_article.tex` |
+
+---
+
+## Notes
+
+1. **Always check official guidelines**: Journal requirements change; verify before submission
+2. **Template currency**: These templates are updated regularly but may lag official changes
+3. **Supplementary materials**: Most journals allow extensive supplementary materials
+4. **Preprint policies**: Check journal's preprint policy (most allow arXiv, bioRxiv)
+5. **Open access options**: Many subscription journals offer open access for a fee
+6. **LaTeX vs. Word**: Most journals accept both; LaTeX preferred for math-heavy content
+
+## Getting Official Templates
+
+Many journals provide official LaTeX templates:
+- **Nature**: Download from journal website
+- **IEEE**: IEEEtran class (widely available)
+- **ACM**: acmart class (CTAN)
+- **Elsevier**: elsarticle class (CTAN)
+- **Springer**: svjour3 class (journal website)
+
+Check journal's "For Authors" or "Submit" page for the most current templates.
+
diff --git a/scientific-skills/venue-templates/references/posters_guidelines.md b/scientific-skills/venue-templates/references/posters_guidelines.md
new file mode 100644
index 0000000..ccf4c0f
--- /dev/null
+++ b/scientific-skills/venue-templates/references/posters_guidelines.md
@@ -0,0 +1,628 @@
+# Research Poster Guidelines
+
+Comprehensive guidelines for creating effective academic research posters including sizing, layout, typography, and design best practices.
+
+**Last Updated**: 2024
+
+---
+
+## Standard Poster Sizes
+
+### International Sizes (ISO 216)
+
+| Size | Dimensions (mm) | Dimensions (inches) | Common Use |
+|------|----------------|---------------------|------------|
+| **A0** | 841 × 1189 | 33.1 × 46.8 | Most common international standard |
+| **A1** | 594 × 841 | 23.4 × 33.1 | Smaller conferences, travel-friendly |
+| **A2** | 420 × 594 | 16.5 × 23.4 | Mini posters, small venues |
+
+### US Sizes
+
+| Size | Dimensions (inches) | Dimensions (mm) | Common Use |
+|------|-------------------|-----------------|------------|
+| **36" × 48"** | 36 × 48 | 914 × 1219 | Common US conference size (portrait) |
+| **42" × 56"** | 42 × 56 | 1067 × 1422 | Large format US posters |
+| **48" × 36"** | 48 × 36 | 1219 × 914 | Landscape orientation |
+| **48" × 96"** | 48 × 96 | 1219 × 2438 | Extra-wide format |
+
+### Other Common Sizes
+
+| Size | Dimensions | Notes |
+|------|-----------|-------|
+| **90 cm × 120 cm** | 900 × 1200 mm / 35.4 × 47.2 in | Common in Europe |
+| **40" × 30"** | 1016 × 762 mm | Landscape format |
+| **3 ft × 4 ft** | 914 × 1219 mm / 36 × 48 in | Same as 36×48 |
+
+### Orientation
+
+- **Portrait**: Most common (height > width)
+ - Better for long visual flows (top to bottom)
+ - Examples: A0, 36"×48"
+- **Landscape**: Less common but sometimes preferred
+ - Better for wide content, timelines
+ - Examples: 48"×36", 40"×30"
+
+**Always verify**: Check conference specifications before designing!
+
+---
+
+## Typography and Font Sizes
+
+### Recommended Font Sizes by Distance
+
+Posters are viewed from 3-6 feet (1-2 meters) away:
+
+| Element | Size Range | Recommended |
+|---------|-----------|-------------|
+| **Title** | 60-85 pt | 72-85 pt |
+| **Author Names** | 48-60 pt | 54 pt |
+| **Affiliations** | 32-40 pt | 36 pt |
+| **Section Headers** | 36-48 pt | 42 pt |
+| **Body Text** | 24-32 pt | 28 pt |
+| **Figure Captions** | 20-24 pt | 22 pt |
+| **References** | 18-22 pt | 20 pt |
+
+### Font Families
+
+**Sans-Serif (Recommended for Posters)**:
+- Arial
+- Helvetica
+- Calibri
+- Futura
+- Gill Sans
+- **Why**: Clean, readable at distance
+
+**Serif (Use Sparingly)**:
+- Times New Roman
+- Georgia
+- Palatino
+- **When**: Body text if preferred, but sans-serif better for headers
+
+**Monospace**:
+- Courier New
+- Consolas
+- **When**: Code snippets only
+
+### Typography Best Practices
+
+1. **Limit fonts**: Use 1-2 font families maximum
+2. **Hierarchy**: Establish clear size hierarchy
+3. **Weight**: Use bold for emphasis, not italics
+4. **Alignment**: Left-align body text, center title
+5. **Spacing**: Generous line spacing (1.2-1.5)
+6. **Consistency**: Same fonts for similar elements
+
+---
+
+## Layout and Design Principles
+
+### Grid-Based Layouts
+
+**Column Structures**:
+
+| Layout | Columns | Best For |
+|--------|---------|----------|
+| **Single Column** | 1 | Simple, linear flow; timeline posters |
+| **Two Column** | 2 | Most common; balanced layout |
+| **Three Column** | 3 | Dense content; multi-part studies |
+| **Four Column** | 4 | Very dense; avoid if possible |
+
+**Recommended**: **2 or 3 columns** for most research posters
+
+### Visual Flow
+
+**Reading Order** (Western conventions):
+1. Top to bottom
+2. Left to right
+3. Z-pattern or F-pattern
+
+**Section Ordering** (typical):
+```
++----------------------------------+
+| TITLE |
+| Authors, Affiliations |
++----------------------------------+
+| Introduction | Results |
+| | |
+| Methods | Discussion |
+| | |
+| [Optional] | Conclusions |
++----------------------------------+
+| References / QR Code |
++----------------------------------+
+```
+
+### Spacing and Margins
+
+- **Outer margins**: 1-2 inches (2.5-5 cm) all sides
+- **Column spacing**: 0.5-1 inch (1.3-2.5 cm)
+- **Inter-section spacing**: 0.5-1 inch
+- **White space**: 30-40% of poster should be white space
+
+**Avoid**: Dense, text-heavy layouts with minimal white space
+
+---
+
+## Color Schemes
+
+### Colorblind-Safe Palettes
+
+Use colorblind-friendly color combinations:
+
+**Okabe-Ito Palette** (Recommended):
+- Orange: `#E69F00`
+- Sky Blue: `#56B4E9`
+- Bluish Green: `#009E73`
+- Yellow: `#F0E442`
+- Blue: `#0072B2`
+- Vermillion: `#D55E00`
+- Reddish Purple: `#CC79A7`
+- Black: `#000000`
+- Gray: `#999999`
+
+**Viridis Palette** (sequential):
+- Good for heatmaps and gradients
+- Colorblind-safe and perceptually uniform
+
+### Color Usage Guidelines
+
+**Background**:
+- **White or light gray**: Most common, professional
+- **Light colored**: Pale blue, beige (use cautiously)
+- **Avoid dark backgrounds**: Harder to read, expensive to print
+
+**Text**:
+- **Dark on light**: Black or dark gray text on white/light backgrounds
+- **Contrast ratio**: At least 4.5:1 (WCAG AA standard)
+
+**Accent Colors**:
+- Use 2-3 accent colors maximum
+- Section headers, key findings
+- Consistent throughout poster
+
+**Figures**:
+- Colorblind-safe palettes
+- Sufficient contrast
+- Test in grayscale
+
+### Color Contrast Tools
+- WebAIM Contrast Checker: https://webaim.org/resources/contrastchecker/
+- Coblis (Color Blindness Simulator): https://www.color-blindness.com/coblis-color-blindness-simulator/
+
+---
+
+## Content Structure
+
+### Essential Sections
+
+#### 1. Title Section
+- **Title**: Clear, specific, engaging
+- **Authors**: Names (underline presenting author)
+- **Affiliations**: Institutions, departments
+- **Logo**: Institutional logo (corner)
+- **Contact**: Email, QR code to paper/website
+
+#### 2. Introduction/Background
+- **Purpose**: Context and motivation
+- **Length**: 100-200 words
+- **Include**:
+ - Problem statement
+ - Research gap
+ - Objectives/hypothesis
+
+#### 3. Methods
+- **Purpose**: How you did the study
+- **Format**:
+ - Bullet points preferred
+ - Flow diagram if complex
+ - Key parameters
+- **Include**: Sample size, procedures, analysis
+
+#### 4. Results
+- **Purpose**: What you found
+- **Format**: Primarily visual (figures, tables, charts)
+- **Include**:
+ - Key findings (2-4 main results)
+ - Statistical significance
+ - Visual evidence
+
+#### 5. Discussion/Conclusions
+- **Purpose**: What it means
+- **Length**: 100-200 words
+- **Include**:
+ - Interpretation
+ - Implications
+ - Limitations
+ - Future work
+
+#### 6. References
+- **Format**: Small font, abbreviated citations
+- **Include**: Key citations only (5-10)
+- **Style**: Any consistent style
+
+### Optional Sections
+- **Abstract**: Sometimes included, often omitted
+- **Acknowledgments**: Funding, collaborators
+- **Future Work**: Next steps
+
+---
+
+## Visual Elements
+
+### Figures and Plots
+
+**Principles**:
+1. **Simplify**: Remove clutter, emphasize key points
+2. **Enlarge**: Make larger than in paper
+3. **Label clearly**: Large axis labels, legends
+4. **Standalone**: Each figure tells a complete story
+5. **High resolution**: 300 dpi minimum
+
+**Figure Types**:
+- **Photographs**: High quality, cropped appropriately
+- **Graphs**: Bar charts, line plots, scatter plots
+- **Heatmaps**: Use colorblind-safe colormaps
+- **Schematics**: Diagrams, flowcharts
+- **Tables**: Simple tables (complex tables → figure)
+
+### Tables
+
+**When to Use**:
+- Precise numerical values needed
+- Comparisons across conditions
+- Summary statistics
+
+**Best Practices**:
+- **Keep simple**: 3-5 columns, 5-10 rows maximum
+- **Large fonts**: Same size as body text
+- **Clear headers**: Bold column/row headers
+- **Alternating rows**: Light shading for readability
+- **Minimal lines**: Horizontal lines only (no vertical)
+
+### Icons and Graphics
+
+**Use**:
+- Icons for visual interest (methods, concepts)
+- Simple graphics to break text
+- Arrows to guide flow
+
+**Sources**:
+- Noun Project: https://thenounproject.com/
+- BioRender: https://biorender.com/ (scientific illustrations)
+- Font Awesome: https://fontawesome.com/ (icons)
+
+**Caution**: Don't overuse; maintain professionalism
+
+---
+
+## LaTeX Poster Packages
+
+### beamerposter
+
+**Description**: Extension of Beamer for posters
+**Best For**: Academic conferences, classic layout
+**Pros**:
+- Familiar to Beamer users
+- Clean, professional appearance
+- Many themes available
+
+**Cons**:
+- Less flexible than tikzposter
+- Can be verbose
+
+**Template**: `assets/posters/beamerposter_academic.tex`
+
+**Example Usage**:
+```latex
+\documentclass[final]{beamer}
+\usepackage[size=a0,scale=1.24]{beamerposter}
+\usetheme{Berlin}
+```
+
+---
+
+### tikzposter
+
+**Description**: Modern poster package using TikZ
+**Best For**: Colorful, modern designs
+**Pros**:
+- Highly customizable
+- Modern, attractive themes
+- Block-based layout
+
+**Cons**:
+- Steeper learning curve
+- Can be slow to compile
+
+**Template**: `assets/posters/tikzposter_research.tex`
+
+**Example Usage**:
+```latex
+\documentclass[25pt, a0paper, portrait]{tikzposter}
+\usetheme{Autumn}
+\usecolorstyle{Denmark}
+```
+
+---
+
+### baposter
+
+**Description**: Box-and-poster system
+**Best For**: Structured, multi-column layouts
+**Pros**:
+- Excellent column control
+- Header boxes, structured layout
+- Good for dense content
+
+**Cons**:
+- Complex syntax
+- Less commonly used
+
+**Template**: `assets/posters/baposter_conference.tex`
+
+**Example Usage**:
+```latex
+\documentclass[a0paper,portrait]{baposter}
+```
+
+---
+
+## Printing and File Preparation
+
+### File Format
+
+**For Printing**:
+- **PDF**: Universal standard
+- **High resolution**: 300 dpi minimum, 600 dpi for photos
+- **Color space**: RGB for most printers (check with printer)
+- **Embed fonts**: Ensure all fonts embedded
+- **Flatten**: No transparency issues
+
+### Print Quality Checks
+
+Before printing:
+1. **Proofread**: Check for typos, errors
+2. **Colors**: Check in print preview
+3. **Resolution**: Zoom to 100%, check figure quality
+4. **Margins**: Verify nothing cut off
+5. **Test print**: Print small version (A4) to check layout
+
+### Print Providers
+
+**Options**:
+1. **University print shop**: Often cheapest, convenient
+2. **FedEx Office**: Widely available
+3. **Online services**:
+ - Vistaprint
+ - Printful
+ - Academic Poster Printing (specialized)
+
+**Cost**: Typically $50-150 for A0 glossy poster
+
+### Paper Types
+
+| Paper Type | Description | Best For |
+|-----------|-------------|----------|
+| **Matte** | Non-reflective finish | Well-lit venues, minimal glare |
+| **Glossy** | Shiny, vibrant colors | Photos, colorful figures |
+| **Satin/Semi-gloss** | Between matte and glossy | Balanced option (recommended) |
+| **Fabric** | Wrinkle-resistant, rollable | Travel, re-use |
+
+**Recommendation**: **Satin or matte** for most academic posters
+
+---
+
+## QR Codes
+
+### What to Include
+
+Generate QR codes linking to:
+- **Paper PDF**: Published or preprint
+- **Supplementary materials**: Data, code, videos
+- **Personal website**: Lab or researcher page
+- **Video abstract**: 1-2 minute video summary
+- **Online version**: Interactive poster
+
+### Placement
+
+- **Common locations**:
+ - Bottom right corner
+ - Next to references
+ - Near contact information
+- **Size**: 3-4 inches (7-10 cm) square
+- **Label**: "Scan for paper" or "More info"
+
+### QR Code Generators
+- QR Code Generator: https://www.qr-code-generator.com/
+- QRStuff: https://www.qrstuff.com/
+- LaTeX package: `qrcode` for generating in LaTeX
+
+---
+
+## Design Best Practices
+
+### Do's
+
+✓ **Use large fonts** (28pt+ for body text)
+✓ **Keep text minimal** (30-40% of poster)
+✓ **Use visuals** (60-70% figures, plots, images)
+✓ **Tell a story** (clear narrative flow)
+✓ **Colorblind-safe colors**
+✓ **Test readability** (view from 6 feet away)
+✓ **Include contact info** (email, QR code)
+✓ **Proofread** (multiple times!)
+
+### Don'ts
+
+✗ **Don't use small fonts** (<24pt body text)
+✗ **Don't overcrowd** (leave white space)
+✗ **Don't use complex tables** (simplify or visualize)
+✗ **Don't use full paragraphs** (use bullets)
+✗ **Don't use many fonts** (1-2 max)
+✗ **Don't use low-res images** (<300 dpi)
+✗ **Don't use red-green contrasts** (colorblind issue)
+✗ **Don't make it a paper** (posters ≠ papers)
+
+---
+
+## Poster Presentation Tips
+
+### During the Poster Session
+
+1. **Stand by your poster**: Be available, engaged
+2. **Elevator pitch ready**: 1-2 minute summary prepared
+3. **Different depths**: Short version (1 min), medium (3 min), deep dive (10 min)
+4. **Engage visitors**: Ask questions, invite discussion
+5. **Business cards**: Have them ready
+6. **Notebook**: Record feedback, questions
+7. **Handouts**: Optional 1-page summary (with QR code)
+
+### Talking Through Your Poster
+
+**30-second version**:
+- What is the problem?
+- What did you do?
+- What did you find?
+
+**2-minute version**:
+- Background + motivation
+- Methods (briefly)
+- Key result (show main figure)
+- Conclusion + implications
+
+**5+ minute version**:
+- Full walkthrough
+- Address specific questions
+- Discuss limitations, future work
+
+---
+
+## Accessibility Considerations
+
+### Visual Accessibility
+
+1. **Color contrast**: High contrast (4.5:1 minimum)
+2. **Colorblind-safe**: Use Okabe-Ito or similar palettes
+3. **Font size**: Large enough to read from distance
+4. **Font choice**: Clear, sans-serif fonts
+5. **Alt text**: Consider providing text description
+
+### Physical Accessibility
+
+1. **Mounting height**: Low enough for wheelchair users to read bottom
+2. **QR codes**: Provide alternative (short URL, handout)
+
+---
+
+## Checklist Before Printing
+
+- [ ] Proofread all text (typos, grammar)
+- [ ] Check author names and affiliations
+- [ ] Verify all figures are high resolution (300+ dpi)
+- [ ] Ensure colorblind-safe color schemes
+- [ ] Test readability from 6 feet away (print small version)
+- [ ] Verify poster dimensions match conference requirements
+- [ ] Check that fonts are embedded in PDF
+- [ ] Include contact information (email, QR code)
+- [ ] Add institutional logo
+- [ ] Verify references are accurate
+- [ ] Ensure figures have clear labels and captions
+- [ ] Check that layout is not too dense (adequate white space)
+- [ ] Verify QR codes work (test scan)
+- [ ] Confirm file is high-resolution PDF
+- [ ] Get feedback from colleagues
+
+---
+
+## Example Poster Layouts
+
+### Layout 1: Two-Column (Recommended for Most)
+
+```
++----------------------------------------+
+| TITLE |
+| Authors & Affiliations |
++----------------------------------------+
+| INTRO | RESULTS |
+| | |
+| METHODS | RESULTS (cont.) |
+| | |
+| | DISCUSSION/CONCLUSIONS |
++----------------------------------------+
+| REFERENCES | QR CODE |
++----------------------------------------+
+```
+
+### Layout 2: Three-Column
+
+```
++---------------------------------------+
+| TITLE |
+| Authors & Affiliations |
++---------------------------------------+
+| INTRO | RESULTS | DISCUSSION |
+| | | |
+| METHOD | RESULTS | CONCLUSIONS |
+| | | |
+| | RESULTS | FUTURE WORK |
++---------------------------------------+
+| REFERENCES | QR CODE |
++---------------------------------------+
+```
+
+### Layout 3: Horizontal Flow
+
+```
++----------------------------------------+
+| TITLE |
+| Authors & Affiliations |
++----------------------------------------+
+| INTRODUCTION | METHODS |
++----------------------------------------+
+| RESULTS |
+| (large figure spanning width) |
++----------------------------------------+
+| DISCUSSION | CONCLUSIONS |
++----------------------------------------+
+| REFERENCES | QR CODE |
++----------------------------------------+
+```
+
+---
+
+## Resources
+
+### LaTeX Templates
+- `assets/posters/beamerposter_academic.tex`
+- `assets/posters/tikzposter_research.tex`
+- `assets/posters/baposter_conference.tex`
+
+### Online Resources
+- Better Posters Blog: https://betterposters.blogspot.com/
+- Colorblind Safe Palettes: https://colorbrewer2.org/
+- BioRender (scientific illustrations): https://biorender.com/
+- Poster Design Guide (Colin Purrington): https://colinpurrington.com/tips/poster-design/
+
+### Tools
+- **Inkscape**: Free vector graphics editor
+- **PowerPoint**: Surprisingly popular for posters
+- **Illustrator**: Professional design tool
+- **LaTeX**: Best for reproducibility, version control
+
+---
+
+## Summary
+
+**Key Takeaways**:
+
+1. **Size**: Verify conference requirements (typically A0 or 36"×48")
+2. **Fonts**: Large (28pt+ body, 72pt+ title)
+3. **Layout**: 2-3 columns, generous white space
+4. **Visuals**: 60-70% visual content
+5. **Colors**: Colorblind-safe, high contrast
+6. **Content**: Tell a story, keep text minimal
+7. **Quality**: 300+ dpi, test print
+8. **Accessibility**: Readable from distance, clear hierarchy
+
+**Remember**: A poster is **not a paper** - it's a visual summary designed to spark conversations!
+
diff --git a/scientific-skills/venue-templates/scripts/customize_template.py b/scientific-skills/venue-templates/scripts/customize_template.py
new file mode 100755
index 0000000..41f62ef
--- /dev/null
+++ b/scientific-skills/venue-templates/scripts/customize_template.py
@@ -0,0 +1,206 @@
+#!/usr/bin/env python3
+"""
+Customize Template Script
+Customize LaTeX templates with author information and project details.
+
+Usage:
+ python customize_template.py --template nature_article.tex --output my_paper.tex
+ python customize_template.py --template nature_article.tex --title "My Research" --output my_paper.tex
+ python customize_template.py --interactive
+"""
+
+import argparse
+import re
+from pathlib import Path
+
+def get_skill_path():
+ """Get the path to the venue-templates skill directory."""
+ script_dir = Path(__file__).parent
+ skill_dir = script_dir.parent
+ return skill_dir
+
+def find_template(template_name):
+ """Find template file in assets directory."""
+ skill_path = get_skill_path()
+ assets_path = skill_path / "assets"
+
+ # Search in all subdirectories
+ for subdir in ["journals", "posters", "grants"]:
+ template_path = assets_path / subdir / template_name
+ if template_path.exists():
+ return template_path
+
+ return None
+
+def customize_template(template_path, output_path, **kwargs):
+ """Customize a template with provided information."""
+
+ # Read template
+ with open(template_path, 'r') as f:
+ content = f.read()
+
+ # Replace placeholders
+ replacements = {
+ 'title': (
+ [r'Insert Your Title Here[^}]*', r'Your [^}]*Title[^}]*Here[^}]*'],
+ kwargs.get('title', '')
+ ),
+ 'authors': (
+ [r'First Author\\textsuperscript\{1\}, Second Author[^}]*',
+ r'First Author.*Second Author.*Third Author'],
+ kwargs.get('authors', '')
+ ),
+ 'affiliations': (
+ [r'Department Name, Institution Name, City, State[^\\]*',
+ r'Department of [^,]*, University Name[^\\]*'],
+ kwargs.get('affiliations', '')
+ ),
+ 'email': (
+ [r'first\.author@university\.edu',
+ r'\[email protected\]'],
+ kwargs.get('email', '')
+ )
+ }
+
+ # Apply replacements
+ modified = False
+ for key, (patterns, replacement) in replacements.items():
+ if replacement:
+ for pattern in patterns:
+ if re.search(pattern, content):
+ content = re.sub(pattern, replacement, content, count=1)
+ modified = True
+ print(f"✓ Replaced {key}")
+
+ # Write output
+ with open(output_path, 'w') as f:
+ f.write(content)
+
+ if modified:
+ print(f"\n✓ Customized template saved to: {output_path}")
+ else:
+ print(f"\n⚠️ Template copied to: {output_path}")
+ print(" No customizations applied (no matching placeholders found or no values provided)")
+
+ print(f"\nNext steps:")
+ print(f"1. Open {output_path} in your LaTeX editor")
+ print(f"2. Replace remaining placeholders")
+ print(f"3. Add your content")
+ print(f"4. Compile with pdflatex or your preferred LaTeX compiler")
+
+def interactive_mode():
+ """Run in interactive mode."""
+ print("\n=== Template Customization (Interactive Mode) ===\n")
+
+ # List available templates
+ skill_path = get_skill_path()
+ assets_path = skill_path / "assets"
+
+ print("Available templates:\n")
+ templates = []
+ for i, subdir in enumerate(["journals", "posters", "grants"], 1):
+ subdir_path = assets_path / subdir
+ if subdir_path.exists():
+ print(f"{subdir.upper()}:")
+ for j, template_file in enumerate(sorted(subdir_path.glob("*.tex")), 1):
+ templates.append(template_file)
+ print(f" {len(templates)}. {template_file.name}")
+
+ print()
+
+ # Select template
+ while True:
+ try:
+ choice = int(input(f"Select template (1-{len(templates)}): "))
+ if 1 <= choice <= len(templates):
+ template_path = templates[choice - 1]
+ break
+ else:
+ print(f"Please enter a number between 1 and {len(templates)}")
+ except ValueError:
+ print("Please enter a valid number")
+
+ print(f"\nSelected: {template_path.name}\n")
+
+ # Get customization info
+ title = input("Paper title (press Enter to skip): ").strip()
+ authors = input("Authors (e.g., 'John Doe, Jane Smith') (press Enter to skip): ").strip()
+ affiliations = input("Affiliations (press Enter to skip): ").strip()
+ email = input("Corresponding email (press Enter to skip): ").strip()
+
+ # Output file
+ default_output = f"my_{template_path.stem}.tex"
+ output = input(f"Output filename [{default_output}]: ").strip()
+ if not output:
+ output = default_output
+
+ output_path = Path(output)
+
+ # Customize
+ print()
+ customize_template(
+ template_path,
+ output_path,
+ title=title,
+ authors=authors,
+ affiliations=affiliations,
+ email=email
+ )
+
+def main():
+ parser = argparse.ArgumentParser(
+ description="Customize LaTeX templates with author and project information",
+ formatter_class=argparse.RawDescriptionHelpFormatter,
+ epilog="""
+Examples:
+ %(prog)s --interactive
+ %(prog)s --template nature_article.tex --output my_paper.tex
+ %(prog)s --template neurips_article.tex --title "My ML Research" --output my_neurips.tex
+ """
+ )
+
+ parser.add_argument('--template', type=str, help='Template filename')
+ parser.add_argument('--output', type=str, help='Output filename')
+ parser.add_argument('--title', type=str, help='Paper title')
+ parser.add_argument('--authors', type=str, help='Author names')
+ parser.add_argument('--affiliations', type=str, help='Institutions/affiliations')
+ parser.add_argument('--email', type=str, help='Corresponding author email')
+ parser.add_argument('--interactive', action='store_true', help='Run in interactive mode')
+
+ args = parser.parse_args()
+
+ # Interactive mode
+ if args.interactive:
+ interactive_mode()
+ return
+
+ # Command-line mode
+ if not args.template or not args.output:
+ print("Error: --template and --output are required (or use --interactive)")
+ parser.print_help()
+ return
+
+ # Find template
+ template_path = find_template(args.template)
+ if not template_path:
+ print(f"Error: Template '{args.template}' not found")
+ print("\nSearched in:")
+ skill_path = get_skill_path()
+ for subdir in ["journals", "posters", "grants"]:
+ print(f" - {skill_path}/assets/{subdir}/")
+ return
+
+ # Customize
+ output_path = Path(args.output)
+ customize_template(
+ template_path,
+ output_path,
+ title=args.title,
+ authors=args.authors,
+ affiliations=args.affiliations,
+ email=args.email
+ )
+
+if __name__ == "__main__":
+ main()
+
diff --git a/scientific-skills/venue-templates/scripts/query_template.py b/scientific-skills/venue-templates/scripts/query_template.py
new file mode 100755
index 0000000..95466e9
--- /dev/null
+++ b/scientific-skills/venue-templates/scripts/query_template.py
@@ -0,0 +1,260 @@
+#!/usr/bin/env python3
+"""
+Query Template Script
+Search and retrieve venue-specific templates by name, type, or keywords.
+
+Usage:
+ python query_template.py --venue "Nature" --type "article"
+ python query_template.py --keyword "machine learning"
+ python query_template.py --list-all
+ python query_template.py --venue "NeurIPS" --requirements
+"""
+
+import argparse
+import os
+import json
+from pathlib import Path
+
+# Template database
+TEMPLATES = {
+ "journals": {
+ "nature": {
+ "file": "nature_article.tex",
+ "full_name": "Nature",
+ "description": "Top-tier multidisciplinary science journal",
+ "page_limit": "~3000 words",
+ "citation_style": "Superscript numbered",
+ "format": "Single column"
+ },
+ "neurips": {
+ "file": "neurips_article.tex",
+ "full_name": "NeurIPS (Neural Information Processing Systems)",
+ "description": "Top-tier machine learning conference",
+ "page_limit": "8 pages + unlimited refs",
+ "citation_style": "Numbered [1]",
+ "format": "Two column",
+ "anonymization": "Required (double-blind)"
+ },
+ "plos_one": {
+ "file": "plos_one.tex",
+ "full_name": "PLOS ONE",
+ "description": "Open-access multidisciplinary journal",
+ "page_limit": "No limit",
+ "citation_style": "Vancouver [1]",
+ "format": "Single column"
+ }
+ },
+ "posters": {
+ "beamerposter": {
+ "file": "beamerposter_academic.tex",
+ "full_name": "Beamerposter Academic",
+ "description": "Classic academic conference poster using beamerposter",
+ "size": "A0, customizable",
+ "package": "beamerposter"
+ }
+ },
+ "grants": {
+ "nsf": {
+ "file": "nsf_proposal_template.tex",
+ "full_name": "NSF Standard Grant",
+ "description": "National Science Foundation research proposal",
+ "page_limit": "15 pages (project description)",
+ "key_sections": "Project Summary, Project Description, Broader Impacts"
+ },
+ "nih_specific_aims": {
+ "file": "nih_specific_aims.tex",
+ "full_name": "NIH Specific Aims Page",
+ "description": "Most critical page of NIH proposals",
+ "page_limit": "1 page (strictly enforced)",
+ "key_sections": "Hook, Hypothesis, 3 Aims, Payoff"
+ }
+ }
+}
+
+def get_skill_path():
+ """Get the path to the venue-templates skill directory."""
+ # Assume script is in .claude/skills/venue-templates/scripts/
+ script_dir = Path(__file__).parent
+ skill_dir = script_dir.parent
+ return skill_dir
+
+def search_templates(venue=None, template_type=None, keyword=None):
+ """Search for templates matching criteria."""
+ results = []
+
+ for cat_name, category in TEMPLATES.items():
+ # Filter by type if specified
+ if template_type and cat_name != template_type and template_type != "all":
+ continue
+
+ for temp_id, template in category.items():
+ # Filter by venue name
+ if venue:
+ venue_lower = venue.lower()
+ if venue_lower not in temp_id and venue_lower not in template.get("full_name", "").lower():
+ continue
+
+ # Filter by keyword
+ if keyword:
+ keyword_lower = keyword.lower()
+ search_text = json.dumps(template).lower()
+ if keyword_lower not in search_text:
+ continue
+
+ results.append({
+ "id": temp_id,
+ "category": cat_name,
+ "file": template["file"],
+ "full_name": template.get("full_name", temp_id),
+ "description": template.get("description", ""),
+ "details": template
+ })
+
+ return results
+
+def list_all_templates():
+ """List all available templates."""
+ print("\n=== AVAILABLE TEMPLATES ===\n")
+
+ for cat_name, category in TEMPLATES.items():
+ print(f"\n{cat_name.upper()}:")
+ for temp_id, template in category.items():
+ print(f" • {template.get('full_name', temp_id)}")
+ print(f" File: {template['file']}")
+ if "description" in template:
+ print(f" Description: {template['description']}")
+ print()
+
+def print_template_info(template):
+ """Print detailed information about a template."""
+ print(f"\n{'='*60}")
+ print(f"Template: {template['full_name']}")
+ print(f"{'='*60}")
+ print(f"Category: {template['category']}")
+ print(f"File: {template['file']}")
+
+ details = template['details']
+
+ print(f"\nDescription: {details.get('description', 'N/A')}")
+
+ if 'page_limit' in details:
+ print(f"Page Limit: {details['page_limit']}")
+ if 'citation_style' in details:
+ print(f"Citation Style: {details['citation_style']}")
+ if 'format' in details:
+ print(f"Format: {details['format']}")
+ if 'anonymization' in details:
+ print(f"⚠️ Anonymization: {details['anonymization']}")
+ if 'size' in details:
+ print(f"Poster Size: {details['size']}")
+ if 'package' in details:
+ print(f"LaTeX Package: {details['package']}")
+ if 'key_sections' in details:
+ print(f"Key Sections: {details['key_sections']}")
+
+ # Print full path to template
+ skill_path = get_skill_path()
+ template_path = skill_path / "assets" / template['category'] / template['file']
+ print(f"\nFull Path: {template_path}")
+
+ if template_path.exists():
+ print("✓ Template file exists")
+ else:
+ print("✗ Template file not found")
+
+ print()
+
+def print_requirements(venue):
+ """Print formatting requirements for a venue."""
+ results = search_templates(venue=venue)
+
+ if not results:
+ print(f"No templates found for venue: {venue}")
+ return
+
+ template = results[0] # Take first match
+ details = template['details']
+
+ print(f"\n{'='*60}")
+ print(f"FORMATTING REQUIREMENTS: {template['full_name']}")
+ print(f"{'='*60}\n")
+
+ if 'page_limit' in details:
+ print(f"📄 Page Limit: {details['page_limit']}")
+ if 'format' in details:
+ print(f"📐 Format: {details['format']}")
+ if 'citation_style' in details:
+ print(f"📚 Citation Style: {details['citation_style']}")
+ if 'anonymization' in details:
+ print(f"🔒 Anonymization: {details['anonymization']}")
+ if 'size' in details:
+ print(f"📏 Size: {details['size']}")
+
+ print(f"\n💡 For detailed requirements, see:")
+ skill_path = get_skill_path()
+
+ if template['category'] == "journals":
+ print(f" {skill_path}/references/journals_formatting.md")
+ elif template['category'] == "posters":
+ print(f" {skill_path}/references/posters_guidelines.md")
+ elif template['category'] == "grants":
+ print(f" {skill_path}/references/grants_requirements.md")
+
+ print()
+
+def main():
+ parser = argparse.ArgumentParser(
+ description="Query venue-specific LaTeX templates",
+ formatter_class=argparse.RawDescriptionHelpFormatter,
+ epilog="""
+Examples:
+ %(prog)s --list-all
+ %(prog)s --venue "Nature" --type journals
+ %(prog)s --keyword "machine learning"
+ %(prog)s --venue "NeurIPS" --requirements
+ """
+ )
+
+ parser.add_argument('--venue', type=str, help='Venue name (e.g., "Nature", "NeurIPS")')
+ parser.add_argument('--type', type=str, choices=['journals', 'posters', 'grants', 'all'],
+ help='Template type')
+ parser.add_argument('--keyword', type=str, help='Search keyword')
+ parser.add_argument('--list-all', action='store_true', help='List all available templates')
+ parser.add_argument('--requirements', action='store_true',
+ help='Show formatting requirements for venue')
+
+ args = parser.parse_args()
+
+ # List all templates
+ if args.list_all:
+ list_all_templates()
+ return
+
+ # Show requirements
+ if args.requirements:
+ if not args.venue:
+ print("Error: --requirements requires --venue")
+ parser.print_help()
+ return
+ print_requirements(args.venue)
+ return
+
+ # Search for templates
+ if not any([args.venue, args.type, args.keyword]):
+ parser.print_help()
+ return
+
+ results = search_templates(venue=args.venue, template_type=args.type, keyword=args.keyword)
+
+ if not results:
+ print("No templates found matching your criteria.")
+ return
+
+ print(f"\nFound {len(results)} template(s):\n")
+
+ for result in results:
+ print_template_info(result)
+
+if __name__ == "__main__":
+ main()
+
diff --git a/scientific-skills/venue-templates/scripts/validate_format.py b/scientific-skills/venue-templates/scripts/validate_format.py
new file mode 100755
index 0000000..262ede3
--- /dev/null
+++ b/scientific-skills/venue-templates/scripts/validate_format.py
@@ -0,0 +1,255 @@
+#!/usr/bin/env python3
+"""
+Validate Format Script
+Check if document meets venue-specific formatting requirements.
+
+Usage:
+ python validate_format.py --file my_paper.pdf --venue "Nature" --check-all
+ python validate_format.py --file my_paper.pdf --venue "NeurIPS" --check page-count,margins
+ python validate_format.py --file my_paper.pdf --venue "PLOS ONE" --report validation_report.txt
+"""
+
+import argparse
+import subprocess
+from pathlib import Path
+import re
+
+# Venue requirements database
+VENUE_REQUIREMENTS = {
+ "nature": {
+ "page_limit": 5, # Approximate for ~3000 words
+ "margins": {"top": 2.5, "bottom": 2.5, "left": 2.5, "right": 2.5}, # cm
+ "font_size": 12, # pt
+ "font_family": "Times",
+ "line_spacing": "double"
+ },
+ "neurips": {
+ "page_limit": 8, # Excluding refs
+ "margins": {"top": 2.54, "bottom": 2.54, "left": 2.54, "right": 2.54}, # cm (1 inch)
+ "font_size": 10,
+ "font_family": "Times",
+ "format": "two-column"
+ },
+ "plos_one": {
+ "page_limit": None, # No limit
+ "margins": {"top": 2.54, "bottom": 2.54, "left": 2.54, "right": 2.54},
+ "font_size": 10,
+ "font_family": "Arial",
+ "line_spacing": "double"
+ },
+ "nsf": {
+ "page_limit": 15, # Project description
+ "margins": {"top": 2.54, "bottom": 2.54, "left": 2.54, "right": 2.54}, # 1 inch required
+ "font_size": 11, # Minimum
+ "font_family": "Times Roman",
+ "line_spacing": "single or double"
+ },
+ "nih": {
+ "page_limit": 12, # Research strategy
+ "margins": {"top": 1.27, "bottom": 1.27, "left": 1.27, "right": 1.27}, # 0.5 inch minimum
+ "font_size": 11, # Arial 11pt minimum
+ "font_family": "Arial",
+ "line_spacing": "any"
+ }
+}
+
+def get_pdf_info(pdf_path):
+ """Extract information from PDF using pdfinfo."""
+ try:
+ result = subprocess.run(
+ ['pdfinfo', str(pdf_path)],
+ capture_output=True,
+ text=True,
+ check=True
+ )
+
+ info = {}
+ for line in result.stdout.split('\n'):
+ if ':' in line:
+ key, value = line.split(':', 1)
+ info[key.strip()] = value.strip()
+
+ return info
+ except FileNotFoundError:
+ print("⚠️ pdfinfo not found. Install poppler-utils for full PDF analysis.")
+ print(" macOS: brew install poppler")
+ print(" Linux: sudo apt-get install poppler-utils")
+ return None
+ except subprocess.CalledProcessError as e:
+ print(f"Error running pdfinfo: {e}")
+ return None
+
+def check_page_count(pdf_path, venue_reqs):
+ """Check if page count is within limit."""
+ pdf_info = get_pdf_info(pdf_path)
+
+ if not pdf_info:
+ return {"status": "skip", "message": "Could not determine page count"}
+
+ pages = int(pdf_info.get('Pages', 0))
+ limit = venue_reqs.get('page_limit')
+
+ if limit is None:
+ return {"status": "pass", "message": f"No page limit. Document has {pages} pages."}
+
+ if pages <= limit:
+ return {"status": "pass", "message": f"✓ Page count OK: {pages}/{limit} pages"}
+ else:
+ return {"status": "fail", "message": f"✗ Page count exceeded: {pages}/{limit} pages"}
+
+def check_margins(pdf_path, venue_reqs):
+ """Check if margins meet requirements."""
+ # Note: This is a simplified check. Full margin analysis requires more sophisticated tools.
+ req_margins = venue_reqs.get('margins', {})
+
+ if not req_margins:
+ return {"status": "skip", "message": "No margin requirements specified"}
+
+ # This is a placeholder - accurate margin checking requires parsing PDF content
+ return {
+ "status": "info",
+ "message": f"ℹ️ Required margins: {req_margins} cm (manual verification recommended)"
+ }
+
+def check_fonts(pdf_path, venue_reqs):
+ """Check fonts in PDF."""
+ try:
+ result = subprocess.run(
+ ['pdffonts', str(pdf_path)],
+ capture_output=True,
+ text=True,
+ check=True
+ )
+
+ fonts_found = []
+ for line in result.stdout.split('\n')[2:]: # Skip header
+ if line.strip():
+ parts = line.split()
+ if parts:
+ fonts_found.append(parts[0])
+
+ req_font = venue_reqs.get('font_family', '')
+ req_size = venue_reqs.get('font_size')
+
+ message = f"ℹ️ Fonts found: {', '.join(set(fonts_found))}\n"
+ message += f" Required: {req_font}"
+ if req_size:
+ message += f" {req_size}pt minimum"
+
+ return {"status": "info", "message": message}
+
+ except FileNotFoundError:
+ return {"status": "skip", "message": "pdffonts not available"}
+ except subprocess.CalledProcessError:
+ return {"status": "skip", "message": "Could not extract font information"}
+
+def validate_document(pdf_path, venue, checks):
+ """Validate document against venue requirements."""
+
+ venue_key = venue.lower().replace(" ", "_")
+
+ if venue_key not in VENUE_REQUIREMENTS:
+ print(f"❌ Unknown venue: {venue}")
+ print(f"Available venues: {', '.join(VENUE_REQUIREMENTS.keys())}")
+ return
+
+ venue_reqs = VENUE_REQUIREMENTS[venue_key]
+
+ print(f"\n{'='*60}")
+ print(f"VALIDATING: {pdf_path.name}")
+ print(f"VENUE: {venue}")
+ print(f"{'='*60}\n")
+
+ results = {}
+
+ # Run requested checks
+ if 'page-count' in checks or 'all' in checks:
+ results['page-count'] = check_page_count(pdf_path, venue_reqs)
+
+ if 'margins' in checks or 'all' in checks:
+ results['margins'] = check_margins(pdf_path, venue_reqs)
+
+ if 'fonts' in checks or 'all' in checks:
+ results['fonts'] = check_fonts(pdf_path, venue_reqs)
+
+ # Print results
+ for check_name, result in results.items():
+ print(f"{check_name.upper()}:")
+ print(f" {result['message']}\n")
+
+ # Summary
+ failures = sum(1 for r in results.values() if r['status'] == 'fail')
+ passes = sum(1 for r in results.values() if r['status'] == 'pass')
+
+ print(f"{'='*60}")
+ if failures == 0:
+ print(f"✓ VALIDATION PASSED ({passes} checks)")
+ else:
+ print(f"✗ VALIDATION FAILED ({failures} issues)")
+ print(f"{'='*60}\n")
+
+ return results
+
+def generate_report(pdf_path, venue, results, report_path):
+ """Generate validation report."""
+
+ with open(report_path, 'w') as f:
+ f.write(f"Validation Report\n")
+ f.write(f"{'='*60}\n\n")
+ f.write(f"File: {pdf_path}\n")
+ f.write(f"Venue: {venue}\n")
+ f.write(f"Date: {Path.ctime(pdf_path)}\n\n")
+
+ for check_name, result in results.items():
+ f.write(f"{check_name.upper()}:\n")
+ f.write(f" Status: {result['status']}\n")
+ f.write(f" {result['message']}\n\n")
+
+ failures = sum(1 for r in results.values() if r['status'] == 'fail')
+ f.write(f"\nSummary: {'PASSED' if failures == 0 else 'FAILED'}\n")
+
+ print(f"Report saved to: {report_path}")
+
+def main():
+ parser = argparse.ArgumentParser(
+ description="Validate document formatting for venue requirements",
+ formatter_class=argparse.RawDescriptionHelpFormatter,
+ epilog="""
+Examples:
+ %(prog)s --file my_paper.pdf --venue "Nature" --check-all
+ %(prog)s --file my_paper.pdf --venue "NeurIPS" --check page-count,fonts
+ %(prog)s --file proposal.pdf --venue "NSF" --report validation.txt
+ """
+ )
+
+ parser.add_argument('--file', type=str, required=True, help='PDF file to validate')
+ parser.add_argument('--venue', type=str, required=True, help='Target venue')
+ parser.add_argument('--check', type=str, default='all',
+ help='Checks to perform: page-count, margins, fonts, all (comma-separated)')
+ parser.add_argument('--check-all', action='store_true', help='Perform all checks')
+ parser.add_argument('--report', type=str, help='Save report to file')
+
+ args = parser.parse_args()
+
+ # Check file exists
+ pdf_path = Path(args.file)
+ if not pdf_path.exists():
+ print(f"Error: File not found: {pdf_path}")
+ return
+
+ # Parse checks
+ if args.check_all:
+ checks = ['all']
+ else:
+ checks = [c.strip() for c in args.check.split(',')]
+
+ # Validate
+ results = validate_document(pdf_path, args.venue, checks)
+
+ # Generate report if requested
+ if args.report and results:
+ generate_report(pdf_path, args.venue, results, Path(args.report))
+
+if __name__ == "__main__":
+ main()
+