# AiOffice

AiOffice is an AI-native office artifact engine.

Current supported editable artifact:
- DOCX document

Preferred professional workflow:
1. aioffice.open(...)
2. artifact.inspect(view="outline")
3. artifact.locate(...) or artifact.find(...)
4. artifact.recipe_catalog()
5. artifact.recipe_schema(...)
6. artifact.plan_task(...)
7. artifact.commit_task(...)
8. check result.quality.passed
9. result.commit.artifact.export(...)

Raw-operation workflow:
1. artifact.inspect(view="agent")
2. artifact.find(...)
3. artifact.operation_schema(...)
4. artifact.plan(...)
5. artifact.commit(...)

Inspection views:
- outline: headings, sections, tables, and images
- context: one selector plus bounded neighbors
- styles: named-style usage and effective formatting
- table: bounded grids and cell IDs
- layout: sections, floating images, and layout diagnostics
- agent: paginated generic nodes
- debug: native information; do not use for normal agent edits

High-frequency recipes:
- text.replace-scoped
- template.fill
- document.polish
- styles.normalize
- table.polish
- heading.toc-ready
- brand.apply
- review.finalize

Never select the first search match when locate() returns ambiguous.
Supply a stable selector or one-based ordinal.

Fetch one operation or recipe schema only after choosing it. The compact
catalogs intentionally use progressive disclosure.

Preferred imports:
- aioffice.open
- aioffice.Document
- aioffice.Workspace
- aioffice.ops.document
- aioffice.TaskSpec
- aioffice.TaskPlan

Do not:
- import aioffice.formats directly
- construct NativeRef manually
- depend on OOXML implementation details
- commit native edits without planning
- ignore result.quality or native package verification
