# Document parsing

A reusable skill the "Clear routine NDAs without waiting on counsel" recipe pulls in. Add it once and every agent on the team can use it.

Extract clause-level text from the incoming NDA in Word form for the policy check.

## Method
1. Fetch the NDA at {{contract_path}} from Drive or the email attachment.
2. Convert the docx into a clause-by-clause structure, keeping section headings and numbering intact.
3. Identify the term-length, mutuality, governing-law, and confidentiality-definition clauses specifically, since the policy check depends on locating them.
4. Flag any NDA that isn't a standard docx, a scanned image or unusual template, rather than guessing at its structure.
5. Hand the structured clauses to the NDA-policy skill for comparison.

## Rules
- Never infer clause meaning from surrounding text if the clause itself is ambiguous — flag it instead.
- Preserve the original clause numbering in every output reference, so the checklist can cite it precisely.
- Non-standard formats are flagged for manual read, not force-parsed.
- Supported source formats beyond docx, such as scanned PDFs (set on first run, then stored in memory).

## Output
A clause-by-clause structure with each clause's number, heading, and text, ready for policy comparison.
