From a9c52d91f9be8a02a4ce7b46a67cc9a82b422764 Mon Sep 17 00:00:00 2001 From: Richard Fremmerlid Date: Wed, 4 Nov 2026 12:22:31 -0700 Subject: [PATCH] docs(skill): mention PDFs and the optional AI layer in the converting skill description The frontmatter description, quick start and verification path only covered Word documents, and the test path named a plugin folder that does not exist. Evolution-Check: none Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../converting-sharepoint-documents/SKILL.md | 28 ++++++++++++++----- 1 file changed, 21 insertions(+), 7 deletions(-) diff --git a/plugins/sharepoint-workbench/.apm/skills/converting-sharepoint-documents/SKILL.md b/plugins/sharepoint-workbench/.apm/skills/converting-sharepoint-documents/SKILL.md index 932c753e..4af9910a 100644 --- a/plugins/sharepoint-workbench/.apm/skills/converting-sharepoint-documents/SKILL.md +++ b/plugins/sharepoint-workbench/.apm/skills/converting-sharepoint-documents/SKILL.md @@ -1,6 +1,6 @@ --- name: converting-sharepoint-documents -description: Converts Word documents into structured, validated Markdown or SharePoint page outputs through extraction, analysis, assembly, templating, rendering, comparison, and single-topic review. Use when running any stage of the local SharePoint document-conversion pipeline; all operations are offline or read-only. +description: Converts Word (.docx) and text-layer PDF documents into structured, validated Markdown or SharePoint page outputs through extraction, analysis, assembly, templating, rendering, comparison, and single-topic review, with an optional, clearly flagged AI navigation layer (summaries, index) for weakly structured documents. Use when running any stage of the local SharePoint document-conversion pipeline for DOCX or PDF; all operations are offline or read-only. --- # Converting SharePoint Documents @@ -20,10 +20,22 @@ from extraction import extract_and_normalize result = extract_and_normalize("intake/Manual.docx", "analysis/Manual") ``` -Follow the pipeline in order: `extract` -> `analyze` -> human confirmation -> -`assemble` -> `template-md` or `template-sp` -> `render-md` or `render-sp` -> -`validate`. Use `compare` for golden-master fidelity and `review` for one-topic -editorial review. +For a text-layer PDF use `extract-pdf` instead (needs PyMuPDF; scanned PDFs need OCR first): + +```python +sys.path.insert(0, "scripts/extraction") +from pdf_extraction import extract_pdf_and_normalize +result = extract_pdf_and_normalize("intake/Manual.pdf", "analysis/Manual") +``` + +Follow the pipeline in order: `extract` (DOCX) or `extract-pdf` (PDF) -> `analyze` -> +human confirmation -> `assemble` -> `template-md` or `template-sp` -> `render-md` or +`render-sp` -> `validate`. PDFs reach `assemble` through `convert.run_extraction`. Use +`compare` for golden-master fidelity and `review` for one-topic editorial review. + +`enrich` is optional and off by default: after extraction it scores the document's own +structure and, only with the user's consent, adds AI-generated summaries and an index for +weakly structured documents. Good bookmarks and headings are kept. ## Constraints @@ -35,6 +47,8 @@ editorial review. - All operations are local/read-only with zero SharePoint tenant I/O. Never upload raw `.aspx` files or publish content from this skill. - Run from this skill root and use only the bundled `scripts/` and `references/`. +- AI-generated content is never authoritative: ask before generating (it costs credits and shares + document text with the provider), flag every generated file, and keep it apart from the extraction. ## Modes @@ -43,7 +57,7 @@ editorial review. | `extract` | Extract DOCX text, tables, images, headings, defects, and statistics. | [mode](references/modes/content-extract-docx.md) | | `extract-pdf` | Extract a text-layer PDF (PyMuPDF) into the same contract, with heading page numbers. | [mode](references/modes/content-extract-pdf.md) | | `analyze` | Analyze document structure, heading hierarchy, boundaries, and conversion plan. | [mode](references/modes/content-analyze-document-structure.md) | -| `enrich` | Optional: assess structure quality; AI navigation layer is opt-in and always flagged. | [mode](references/modes/content-enrich-navigation.md) | +| `enrich` | Optional: assess structure quality; AI navigation layer is opt-in and always flagged. | [mode](references/modes/content-enrich-navigation.md), [trust model](references/enrichment-trust-model.md) | | `assemble` | Assemble a confirmed plan into a canonical structured content package. | [mode](references/modes/content-assemble-structured-content.md) | | `template-md` | Create and validate Markdown rendering templates. | [create](references/modes/content-create-markdown-rendering-template.md), [validate](references/modes/content-validate-rendering-template.md) | | `template-sp` | Create and validate SharePoint rendering templates. | [create](references/modes/content-create-sharepoint-rendering-template.md), [validate](references/modes/content-validate-rendering-template.md) | @@ -58,5 +72,5 @@ editorial review. Use the mode-specific acceptance criteria under `references/` and run: ```bash -pytest plugins/sharepoint-document-conversion/tests/ +pytest plugins/sharepoint-workbench/tests/ ```