# Fachplaner-Jourfix aus Vorlageprotokoll + Teams-Transkript

Use when the user provides both:

- a long Teams/meeting transcript (`.docx` or similar), and
- a manually prepared protocol (`.pdf` or `.docx`) as a Vorlage.

## Workflow

1. Extract both sources separately:
   - transcript text with `python-docx`/document extraction;
   - template protocol with `pdfplumber`/`pypdf` or document extraction.
2. Treat the manual protocol as structure and participant/traktanden reference, not as unquestioned truth.
3. Reconcile against the actual transcript:
   - keep only points actually discussed;
   - add missing discussed topics from the transcript;
   - remove smalltalk, join delays, repetitions, confirmations, and vague filler;
   - mark unclear responsibilities/deadlines as `Unklar` rather than guessing.
4. Produce three user-facing artifacts when requested or implied:
   - revised protocol as `.docx`;
   - same protocol as `.pdf`;
   - bereinigtes Transkript as `.docx` with time / speaker / cleaned statement.
5. In the protocol, prefer a Senior-PL structure:
   - kopfdaten / participants;
   - management summary;
   - ampelstatus;
   - traktanden grouped by discipline;
   - decisions;
   - open questions;
   - risks;
   - pendenzen with responsibility, deadline, priority, relevance, status;
   - next meeting / next-session topics.
6. Verify deliverables by reopening/parsing them:
   - DOCX: read back text/table counts or sample extracted text;
   - PDF: page count and text search for key terms (e.g. decisions, pendenzen, next date).

## Practical notes

- For the transcript artifact, do not over-polish into a summary; preserve speaker/time order while removing obvious non-content.
- For the protocol artifact, do not preserve the raw chronological discussion. Cluster by topic/disziplin.
- If the user asks for “halte dich an das wirklich besprochene”, explicitly use the transcript as the truth source and the hand protocol only as a template/checklist.
