---
name: gantt-chart-generator
description: >-
  Generate a project Gantt chart from a Gemma Analytics project offer or
  contract (PDF). Use when the user shares a project offer, contract, or
  scope document and wants a Gantt chart, project timeline, or schedule. Trigger
  phrases include "gantt chart", "project timeline", "schedule from offer",
  "create a gantt", "gantt from contract", "project plan from offer".
disable-model-invocation: true
---

# Gantt Chart Generator

Extract project tasks and timeline from a project offer/contract and produce a Google Sheets-compatible Gantt chart (`.xlsx`).

## Workflow

1. **Parse the document** — read the PDF directly and extract:
   - Project name and client name
   - Phases and tasks (with estimated days/hours)
   - Start dates and durations (calendar weeks or specific dates)
   - Dependencies between phases (e.g. "after phase 1")

   PDFs can be read directly. For a Word (`.docx`) offer, ask the user to export
   it to PDF first, or convert it (e.g. `pandoc offer.docx -o offer.pdf`) before
   reading — the Read tool cannot parse `.docx` natively.

2. **Map to Gantt structure** — see `${CLAUDE_SKILL_DIR}/references/gantt_structure.md` for the exact layout, color scheme, and JSON schema.

3. **Generate the spreadsheet** — run the script with the JSON payload. It writes to the current directory by default; pass an optional output directory as a second argument:
   ```bash
   uv run ${CLAUDE_SKILL_DIR}/scripts/generate_gantt.py '<JSON>'
   uv run ${CLAUDE_SKILL_DIR}/scripts/generate_gantt.py '<JSON>' /path/to/output_dir
   ```
   The script prints the saved file path.

4. **Deliver** — inform the user they can import the `.xlsx` into Google Sheets (File → Import) or open it in Excel.

## Extraction Guidelines

- If durations are given as ranges (e.g. "2–3 Kalenderwochen"), use the midpoint or ask the user
- Tasks without explicit start dates: infer from dependencies ("after phase 1 completes")
- Typical Gemma project phases (adapt freely based on the actual document):
  - **Phase 1** — Data Loading / Source connections
  - **Phase 2** — Data Modelling (dbt, Snowflake, BigQuery)
  - **Phase 3** — BI Reporting (PowerBI, Metabase, Lightdash, Tableau)
- Include a 🏖️ Holiday row if public holidays fall within the project window
- Skip weekends — the script handles this automatically
- Always confirm extracted tasks and dates with the user before generating, unless dates are fully explicit
