---
name: Microsoft Office only — document toolchain policy
description: Hardwired rule (2026-04-27). Every document save / open / edit / create / convert in this ambient system uses the Microsoft Office suite (Word, Excel, PowerPoint). LibreOffice / Pages / Numbers / Keynote / Google Docs are banned for production artifacts. Applies to all skills, routines, scheduled tasks, scripts, and human-driven flows.
type: reference
originSessionId: 6250c599-625a-4c16-9ba6-368c0a7715ed
---
## The rule (no exceptions)

**Microsoft Office is the ONLY document toolchain.** When a skill or script saves, opens, edits, creates, or converts a document, it goes through Word / Excel / PowerPoint — not LibreOffice / Pages / Numbers / Keynote / Google Workspace native apps.

This is hardwired across:
- All scheduled-task skills (`live-ea`, `nightly-consolidation`, `daily-data-quality-check`, `transcript-scan`, `gmail-deep-scan`, `daily-beenverified-enrichment`, `grand-county-property-scout`)
- All on-demand skills (`skyrun-builder`, `hubspot-lead-push`, `lead-enrichment`, `postcard-updater`, `consolidate-memory`, every other registered skill)
- Invoice generation
- Deliverable generation (PPTX, PDF leave-behind, Excel)
- Memo / proposal / contract drafting
- Any handoff doc, rollup, audit export, snapshot, screenshot pipeline

Adam-bd inherits the same rule via SHARED_LESSON. Future franchise installs inherit by default.

## What's allowed

| Operation | Tool |
|---|---|
| Edit `.docx` | Word (via `mcp__Word__By_Anthropic___*` tools), or `python-docx` / `docx unpack-edit-pack` IF Word MCP can't reach the file (programmatic XML edits like the invoice-template flow). Output stays `.docx`. |
| Edit `.xlsx` | Excel (or `openpyxl` for programmatic data writes). Output stays `.xlsx`. |
| Edit `.pptx` | PowerPoint (via `mcp__PowerPoint__By_Anthropic___*`), or `python-pptx`. Output stays `.pptx`. |
| Convert Office doc → PDF | **Word / Excel / PowerPoint export-to-PDF.** Never `soffice` / `libreoffice --convert-to pdf`. |
| Read existing `.doc` / `.docx` / `.xls` / `.xlsx` / `.ppt` / `.pptx` | Word / Excel / PowerPoint, or python lib equivalents. |
| Open a Google Doc / Sheet / Slide for read-only review | Allowed via Drive MCP, but if the artifact will be modified or saved, **export first to `.docx` / `.xlsx` / `.pptx`** and continue from there. |

## What's banned

| Banned | Reason | Replace with |
|---|---|---|
| `soffice` / `libreoffice` CLI for any operation | Creates `.~lock.*` orphan files (the 6 we just cleaned up); silent failures; non-Office formatting drift | Word/Excel/PowerPoint export-to-PDF |
| `LibreOffice.app`, `OpenOffice.app` foreground | Same | Word.app, Excel.app, PowerPoint.app |
| Pages, Numbers, Keynote (Apple iWork) | Different file formats (`.pages` `.numbers` `.key`); Office can't read natively without conversion losing fidelity | Word / Excel / PowerPoint native |
| Saving `.odt` / `.ods` / `.odp` / `.fodt` (OpenDocument) | Not Office-native | Save as `.docx` / `.xlsx` / `.pptx` |
| Saving `.pages` / `.numbers` / `.key` | Apple-only | Save as `.docx` / `.xlsx` / `.pptx` |
| Editing a Google Doc/Sheet/Slide as the working artifact for a deliverable | Multi-source-of-truth; Drive sync conflicts; format drift | Export to Office format and edit there |
| `pdf2docx` for important conversions | OCR/layout drift on complex docs | Open the source PDF in Word (Word's built-in PDF import) |

## File-format whitelist for any artifact in this system

Allowed: `.docx`, `.xlsx`, `.pptx`, `.pdf`, `.csv`, `.txt`, `.md`, `.json`, `.html`, image formats.
Banned (for production artifacts): `.odt`, `.ods`, `.odp`, `.pages`, `.numbers`, `.key`, `.gdoc`, `.gsheet`, `.gslides`, `.fodt`, `.fods`, `.fodp`.

(Existing files in any banned format that surface in Adam's / Joseph's source data are read-only signals — we don't refuse to read them, but we never save back into those formats; the working copy gets exported to Office format first.)

## Hygiene watchdog enforcement

The `system_hygiene.sh` watchdog detects `.~lock.*` files anywhere in `~/Desktop/SkyRun/` (LibreOffice-signature orphans). It auto-deletes them and pushes ntfy noting the violation source. If the same dir keeps generating fresh `.~lock.*` files, the watchdog escalates to high severity — that means a script is still calling soffice somewhere and needs investigation.

## Skill-author contract

When you write or modify a skill (parent SkyRun OR adam-bd OR future franchise), this rule applies:

- ❌ `soffice` / `libreoffice` / `unoconv` / `convert-to pdf` (any LibreOffice CLI invocation)
- ❌ `subprocess.run(["open", "-a", "LibreOffice", ...])`
- ❌ `subprocess.run(["open", "-a", "Pages", ...])`
- ❌ Any imports of `pyoo`, `unoconv`, similar libreoffice-bridge libs
- ✅ `mcp__Word__By_Anthropic___*` for Word work
- ✅ `mcp__PowerPoint__By_Anthropic___*` for PowerPoint work
- ✅ `python-docx`, `python-pptx`, `openpyxl` for programmatic Office-format edits (output stays Office-native)
- ✅ Word/Excel/PowerPoint AppleScript automation for headless conversions when MCP isn't applicable

If a skill genuinely cannot be done within this rule (e.g., the only library that handles a specific format is a LibreOffice bridge), raise it as an exception via `project_skill_maintenance_flags.md` for review — don't silently work around the rule.

## Origin of this rule

Joseph hardwired this on 2026-04-27 after the deep audit surfaced 6 stale `.~lock.*` files (44+ days old in some cases) created by LibreOffice-driven invoice generation. The recurring orphans were a downstream symptom of an actively-used soffice toolchain. Rather than suppress the symptom, kill the cause.

Specific incidents that informed the rule:
- Invoice PDF flow used `soffice.py` for Word→PDF conversion, leaving lock orphans
- Executive briefing PDFs used `docx.js → soffice` chain
- Multiple `.~lock.SkyRun_*.xlsx#` files indicate LibreOffice (or its Calc component) had the workbook open at some point

## Audit-trail expectation

Every skill/script that creates a document writes an audit JSON noting:
- Source format (e.g., `template.docx`)
- Tool used for edit (e.g., `Word MCP` / `python-docx`)
- Tool used for any conversion (e.g., `Word export-to-PDF`)
- Output path

If a future audit shows `soffice` in any of those fields, that's a policy violation and a bug to fix.
