dsh-office-kit 0.4.1 → 0.4.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (116) hide show
  1. package/assets/skills/excel-live-control/SKILL.md +120 -148
  2. package/assets/skills/excel-live-control/container_tools/live_excel.py +9 -0
  3. package/assets/skills/excel-live-control/domain_guidance/financial_models.md +42 -58
  4. package/assets/skills/excel-live-control/domain_guidance/healthcare.md +36 -42
  5. package/assets/skills/excel-live-control/domain_guidance/marketing_advertising.md +33 -34
  6. package/assets/skills/excel-live-control/domain_guidance/scientific_research.md +34 -36
  7. package/assets/skills/excel-live-control/references/office-automation.md +127 -153
  8. package/assets/skills/excel-live-control/references/read_only_qna.md +40 -45
  9. package/assets/skills/excel-live-control/style_guidelines.md +56 -64
  10. package/assets/skills/excel-live-control/workflows/create_workflows.md +40 -47
  11. package/assets/skills/excel-live-control/workflows/edit_workflows.md +37 -45
  12. package/assets/skills/office-documents/SKILL.md +24 -60
  13. package/assets/skills/office-documents/examples/end_to_end_smoke_test.md +5 -5
  14. package/assets/skills/office-documents/ooxml/comments.md +8 -8
  15. package/assets/skills/office-documents/ooxml/hyperlinks_and_fields.md +10 -10
  16. package/assets/skills/office-documents/ooxml/rels_and_content_types.md +7 -7
  17. package/assets/skills/office-documents/ooxml/tracked_changes.md +12 -12
  18. package/assets/skills/office-documents/references/docx-structure.md +11 -13
  19. package/assets/skills/office-documents/references/template-elicitation.md +11 -13
  20. package/assets/skills/office-documents/references/writing-quality.md +20 -20
  21. package/assets/skills/office-documents/tasks/accessibility_a11y.md +16 -22
  22. package/assets/skills/office-documents/tasks/captions_crossrefs.md +23 -26
  23. package/assets/skills/office-documents/tasks/clean_tracked_changes.md +17 -22
  24. package/assets/skills/office-documents/tasks/comments_manage.md +9 -11
  25. package/assets/skills/office-documents/tasks/compare_diff.md +10 -16
  26. package/assets/skills/office-documents/tasks/create_edit.md +14 -16
  27. package/assets/skills/office-documents/tasks/equations.md +17 -28
  28. package/assets/skills/office-documents/tasks/fields_update.md +14 -16
  29. package/assets/skills/office-documents/tasks/fixtures_edge_cases.md +19 -33
  30. package/assets/skills/office-documents/tasks/footnotes_endnotes.md +12 -14
  31. package/assets/skills/office-documents/tasks/forms_content_controls.md +16 -20
  32. package/assets/skills/office-documents/tasks/headings_numbering.md +17 -22
  33. package/assets/skills/office-documents/tasks/images_figures.md +15 -25
  34. package/assets/skills/office-documents/tasks/multi_doc_merge.md +13 -23
  35. package/assets/skills/office-documents/tasks/navigation_internal_links.md +18 -21
  36. package/assets/skills/office-documents/tasks/privacy_scrub_metadata.md +16 -22
  37. package/assets/skills/office-documents/tasks/protection_restrict_editing.md +19 -21
  38. package/assets/skills/office-documents/tasks/read_review.md +9 -20
  39. package/assets/skills/office-documents/tasks/redaction_anonymization.md +17 -18
  40. package/assets/skills/office-documents/tasks/sections_layout.md +16 -23
  41. package/assets/skills/office-documents/tasks/style_lint_normalize.md +18 -22
  42. package/assets/skills/office-documents/tasks/tables_spreadsheets.md +21 -31
  43. package/assets/skills/office-documents/tasks/templates_style_packs.md +17 -21
  44. package/assets/skills/office-documents/tasks/toc_workflow.md +10 -14
  45. package/assets/skills/office-documents/tasks/verify_render.md +11 -23
  46. package/assets/skills/office-documents/tasks/watermarks_background.md +11 -15
  47. package/assets/skills/office-documents/troubleshooting/libreoffice_headless.md +9 -9
  48. package/assets/skills/office-documents/troubleshooting/run_splitting.md +12 -12
  49. package/assets/skills/office-pdf/SKILL.md +36 -51
  50. package/assets/skills/office-pdf/references/form-fields.md +20 -20
  51. package/assets/skills/office-pdf/references/geometry.md +10 -10
  52. package/assets/skills/office-pdf/references/layout-quality.md +13 -13
  53. package/assets/skills/office-pdf/references/limits.md +12 -56
  54. package/assets/skills/office-pdf/tasks/annotations.md +5 -5
  55. package/assets/skills/office-pdf/tasks/create.md +6 -9
  56. package/assets/skills/office-pdf/tasks/edit-pages.md +14 -14
  57. package/assets/skills/office-pdf/tasks/forms.md +15 -15
  58. package/assets/skills/office-pdf/tasks/read.md +9 -9
  59. package/assets/skills/office-pdf/tasks/redact.md +18 -18
  60. package/assets/skills/office-pdf/tasks/stamp.md +10 -10
  61. package/assets/skills/office-presentations/SKILL.md +71 -91
  62. package/assets/skills/office-presentations/container_tools/render_slides.py +1 -1
  63. package/assets/skills/office-presentations/domain_guidance/finance.md +16 -16
  64. package/assets/skills/office-presentations/recipes/README.md +24 -35
  65. package/assets/skills/office-presentations/recipes/autolayout.md +12 -13
  66. package/assets/skills/office-presentations/recipes/connectors.md +11 -12
  67. package/assets/skills/office-presentations/recipes/images.md +11 -12
  68. package/assets/skills/office-presentations/recipes/master-and-layouts.md +18 -18
  69. package/assets/skills/office-presentations/recipes/native-charts.md +8 -8
  70. package/assets/skills/office-presentations/recipes/rich-text-runs.md +13 -13
  71. package/assets/skills/office-presentations/recipes/speaker-notes.md +7 -7
  72. package/assets/skills/office-presentations/recipes/tables.md +14 -14
  73. package/assets/skills/office-presentations/recipes/textbox-at-coordinate.md +9 -9
  74. package/assets/skills/office-presentations/recipes/theme-tokens.md +7 -8
  75. package/assets/skills/office-presentations/references/authoring-workflow.md +38 -43
  76. package/assets/skills/office-presentations/references/finalization.md +10 -12
  77. package/assets/skills/office-presentations/references/native-bullets.md +14 -18
  78. package/assets/skills/office-presentations/references/native-evidence.md +18 -32
  79. package/assets/skills/office-presentations/references/style-guidelines.md +27 -32
  80. package/assets/skills/office-presentations/references/templates.md +31 -60
  81. package/assets/skills/office-presentations/routing/google_slides.md +4 -4
  82. package/assets/skills/office-presentations/tasks/apply-annotations.md +17 -17
  83. package/assets/skills/office-presentations/tasks/charts-tables-notes.md +20 -23
  84. package/assets/skills/office-presentations/tasks/create-deck.md +19 -19
  85. package/assets/skills/office-presentations/tasks/edit-deck.md +14 -16
  86. package/assets/skills/office-presentations/tasks/inspect-and-verify.md +31 -34
  87. package/assets/skills/office-presentations/tasks/template-following.md +23 -28
  88. package/assets/skills/office-spreadsheets/SKILL.md +32 -39
  89. package/assets/skills/office-spreadsheets/recipes/charts.md +8 -26
  90. package/assets/skills/office-spreadsheets/recipes/conditional-formats.md +9 -26
  91. package/assets/skills/office-spreadsheets/recipes/data-tables.md +7 -23
  92. package/assets/skills/office-spreadsheets/recipes/named-ranges.md +8 -21
  93. package/assets/skills/office-spreadsheets/recipes/number-formats.md +7 -23
  94. package/assets/skills/office-spreadsheets/recipes/sparklines.md +7 -20
  95. package/assets/skills/office-spreadsheets/references/charts.md +15 -34
  96. package/assets/skills/office-spreadsheets/references/domain/financial-models.md +10 -25
  97. package/assets/skills/office-spreadsheets/references/domain/healthcare.md +8 -19
  98. package/assets/skills/office-spreadsheets/references/domain/marketing.md +8 -22
  99. package/assets/skills/office-spreadsheets/references/domain/research.md +8 -19
  100. package/assets/skills/office-spreadsheets/references/formula-patterns.md +20 -50
  101. package/assets/skills/office-spreadsheets/references/style-guidelines.md +19 -44
  102. package/assets/skills/office-spreadsheets/references/workbook-structure.md +12 -35
  103. package/assets/skills/office-spreadsheets/routing/google-sheets.md +11 -26
  104. package/assets/skills/office-spreadsheets/tasks/analyze-workbook.md +10 -25
  105. package/assets/skills/office-spreadsheets/tasks/annotations.md +12 -30
  106. package/assets/skills/office-spreadsheets/tasks/create-workbook.md +5 -5
  107. package/assets/skills/office-spreadsheets/tasks/diff-workbooks.md +2 -2
  108. package/assets/skills/office-spreadsheets/tasks/edit-workbook.md +5 -5
  109. package/assets/skills/office-spreadsheets/tasks/inspect-workbook.md +9 -9
  110. package/assets/skills/office-spreadsheets/tasks/recalc-and-check.md +10 -30
  111. package/assets/skills/shared/annotation-recipes.md +98 -120
  112. package/assets/skills/shared/common-workflow.md +70 -80
  113. package/dist/index.js +105 -29
  114. package/package.json +1 -1
  115. package/postinstall.mjs +58 -17
  116. package/python/office_cli.py +70 -7
@@ -1,6 +1,6 @@
1
1
  # Hyperlinks and fields
2
2
 
3
- A hyperlink and a field are both "a run that looks like text but is a pointer", and both break in the same way: the visible result is cached, so editing the text does not update anything.
3
+ A hyperlink and a field are both "a run that looks like text but is a pointer", and both break the same way: the visible result is cached, so editing the text updates nothing.
4
4
 
5
5
  ## Hyperlinks
6
6
 
@@ -10,11 +10,11 @@ A hyperlink and a field are both "a run that looks like text but is a pointer",
10
10
  </w:hyperlink>
11
11
  ```
12
12
 
13
- - The target is a relationship in `word/_rels/document.xml.rels` with `TargetMode="External"` for a URL, or a bare relative path for a file inside the package.
13
+ - The target is a relationship in `word/_rels/document.xml.rels`: `TargetMode="External"` for a URL, a bare relative path for a file inside the package.
14
14
  - An internal link uses `w:anchor="bookmarkName"` and no relationship at all.
15
- - `w:hyperlink` is a wrapper around runs; a link that spans paragraphs is not legal — put one link per paragraph.
15
+ - `w:hyperlink` wraps runs; a link spanning paragraphs is not legal — one link per paragraph.
16
16
 
17
- A link whose relationship is missing renders as blue underlined text that goes nowhere. That is also what a copy-paste between documents produces.
17
+ A link whose relationship is missing renders as blue underlined text that goes nowhere. Copy-paste between documents produces the same thing.
18
18
 
19
19
  ## Simple fields
20
20
 
@@ -24,7 +24,7 @@ A link whose relationship is missing renders as blue underlined text that goes n
24
24
  </w:fldSimple>
25
25
  ```
26
26
 
27
- The `w:t` inside is a cache, not the truth. Change the text and the next field update overwrites it.
27
+ The `w:t` inside is a cache, not the truth: change the text and the next field update overwrites it.
28
28
 
29
29
  ## Complex fields
30
30
 
@@ -36,13 +36,13 @@ The `w:t` inside is a cache, not the truth. Change the text and the next field u
36
36
  <w:r><w:fldChar w:fldCharType="end"/></w:r>
37
37
  ```
38
38
 
39
- The begin/instrText/separate/result/end sequence must stay in that order inside one paragraph. Word shows the result between `separate` and `end`, or recomputes on open when `w:updateFields` is set in `settings.xml`:
39
+ The begin/instrText/separate/result/end sequence keeps that order inside one paragraph. Word shows the result between `separate` and `end`, or recomputes on open when `settings.xml` sets:
40
40
 
41
41
  ```xml
42
42
  <w:updateFields w:val="true"/>
43
43
  ```
44
44
 
45
- Setting it makes Word prompt or update on open. A viewer that ignores it (a PDF export, some libraries) keeps showing the cache — which is why a document delivered as PDF can show "1" for every page number.
45
+ That makes Word prompt or update on open. A viewer that ignores it (PDF export, some libraries) keeps the cache — which is why a document delivered as PDF can show "1" for every page number.
46
46
 
47
47
  ## Which field for which job
48
48
 
@@ -57,9 +57,9 @@ Setting it makes Word prompt or update on open. A viewer that ignores it (a PDF
57
57
  ## Editing fields safely
58
58
 
59
59
  - To freeze a result, replace the whole field span with a plain run (`fields_materialize.py`, `flatten_ref_fields.py`).
60
- - To renumber, update the cached result and leave the instruction alone; do not delete the begin/end markers.
61
- - `w:instrText` is where the instruction lives — a search-and-replace over `w:t` will not find `TOC`.
62
- - Bookmarks referenced by `REF` must exist (`w:bookmarkStart`/`w:bookmarkEnd` with matching `w:id`); a missing bookmark shows "Error! Reference source not found."
60
+ - To renumber, update the cached result and leave the instruction alone; never delete the begin/end markers.
61
+ - The instruction lives in `w:instrText`, so a search-and-replace over `w:t` will not find `TOC`.
62
+ - Bookmarks referenced by `REF` must exist (`w:bookmarkStart` / `w:bookmarkEnd` with matching `w:id`); a missing bookmark shows "Error! Reference source not found.".
63
63
 
64
64
  ## See also
65
65
 
@@ -1,6 +1,6 @@
1
1
  # Relationships and content types
2
2
 
3
- A `.docx` is a zip of parts, and every relationship between parts is declared twice: once as a relationship entry, once as a content type. Miss either and the file either loses the feature or refuses to open.
3
+ A `.docx` is a zip of parts, and every relationship between parts is declared twice: once as a relationship entry, once as a content type. Miss either and the file loses the feature or refuses to open.
4
4
 
5
5
  ## The two registries
6
6
 
@@ -10,7 +10,7 @@ _rels/.rels # package -> document, core props
10
10
  word/_rels/document.xml.rels # document -> styles, numbering, media, header, footer, comments, hyperlinks
11
11
  ```
12
12
 
13
- `[Content_Types].xml` has `<Default Extension="xml" ContentType="..."/>` for extension defaults and `<Override PartName="/word/comments.xml" ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml"/>` for parts that do not follow an extension rule.
13
+ `[Content_Types].xml` uses `<Default Extension="xml" ContentType="..."/>` for extension defaults and `<Override PartName="/word/comments.xml" ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml"/>` for parts that do not follow an extension rule.
14
14
 
15
15
  A relationship:
16
16
 
@@ -20,7 +20,7 @@ A relationship:
20
20
  Target="comments.xml"/>
21
21
  ```
22
22
 
23
- `Id` is scoped to the part that owns the `.rels` file, so `rId5` in the document and `rId5` in a header are unrelated. `Target` is relative to the owner directory unless it is absolute (`/word/media/image1.png`) or external (`TargetMode="External"`, used for hyperlinks).
23
+ `Id` is scoped to the part that owns the `.rels` file, so `rId5` in the document and `rId5` in a header are unrelated. `Target` is relative to the owner directory unless absolute (`/word/media/image1.png`) or external (`TargetMode="External"`, used for hyperlinks).
24
24
 
25
25
  ## What breaks
26
26
 
@@ -32,13 +32,13 @@ A relationship:
32
32
  | Broken link | Relationship removed but `r:id` left in the body |
33
33
  | Lost image | Media copied without a new relationship id |
34
34
 
35
- Ids must be unique within a `.rels` part. When adding one, read the existing ids and take `max+1`; reusing an id silently rewires an unrelated reference.
35
+ Ids are unique within a `.rels` part. Read the existing ids and take `max+1`; reusing an id silently rewires an unrelated reference.
36
36
 
37
37
  ## The parts that exist only when used
38
38
 
39
- `word/comments.xml`, `word/footnotes.xml`, `word/endnotes.xml`, `word/headerN.xml`, `word/footerN.xml`, `word/numbering.xml`, `docProps/custom.xml` — none are required, and each needs three pieces when added: the part, the override, the relationship. Removing one means removing all three (or Word reports corruption).
39
+ `word/comments.xml`, `word/footnotes.xml`, `word/endnotes.xml`, `word/headerN.xml`, `word/footerN.xml`, `word/numbering.xml`, `docProps/custom.xml` — none are required, and each needs three pieces when added: part, override, relationship. Removing one means removing all three, or Word reports corruption.
40
40
 
41
- Headers and footers are referenced from the section properties, not from the document root:
41
+ Headers and footers are referenced from the section properties, not the document root:
42
42
 
43
43
  ```xml
44
44
  <w:sectPr>
@@ -59,4 +59,4 @@ Headers and footers are referenced from the section properties, not from the doc
59
59
 
60
60
  ## Rebuild rather than regenerate
61
61
 
62
- When a package is broken, unzipping it, fixing the two registries and rezipping with `[Content_Types].xml` first (stored, not deflated) usually recovers it. The kit writes that order on save for this reason.
62
+ When a package is broken, unzip it, fix the two registries and rezip with `[Content_Types].xml` first (stored, not deflated). The kit writes that order on save for this reason.
@@ -1,6 +1,6 @@
1
1
  # Tracked changes
2
2
 
3
- Tracked changes are markup, not a diff. The file contains both the old and the new text, wrapped in elements that say which is which, plus enough metadata for Word to show reviewer names and accept or reject each edit.
3
+ Tracked changes are markup, not a diff. The file holds both old and new text, wrapped in elements that say which is which, plus enough metadata for Word to show reviewer names and accept or reject each edit.
4
4
 
5
5
  ## The elements
6
6
 
@@ -13,7 +13,7 @@ Tracked changes are markup, not a diff. The file contains both the old and the n
13
13
  | `w:delText` | The deleted characters — not `w:t` |
14
14
  | `w:delInstrText` | A deleted field instruction |
15
15
 
16
- Each carries `w:id`, `w:author`, `w:date`. Ids must be unique within the document; reusing one makes Word show the wrong reviewer.
16
+ Each carries `w:id`, `w:author` and `w:date`. Ids are unique within the document; reusing one makes Word show the wrong reviewer.
17
17
 
18
18
  A deletion is a `w:del` containing runs with `w:delText`, not a run with a strikethrough:
19
19
 
@@ -28,21 +28,21 @@ A deletion is a `w:del` containing runs with `w:delText`, not a run with a strik
28
28
 
29
29
  ## Tracking has to be on
30
30
 
31
- `<w:trackRevisions/>` in `word/settings.xml` makes *Word* track subsequent edits. It does not affect markup already in the file. Write the markup directly when you are generating the change; turn tracking on when the user will continue editing.
31
+ `<w:trackRevisions/>` in `word/settings.xml` makes *Word* track subsequent edits; it does not affect markup already in the file. Write the markup directly when generating a change; turn tracking on when the user will continue editing.
32
32
 
33
33
  ## Accepting and rejecting
34
34
 
35
- - **Accept** — keep `w:ins` content and unwrap it; delete `w:del` entirely; for moves keep `w:moveTo`.
36
- - **Reject** — delete `w:ins` content; keep `w:del` content and convert `w:delText` back to `w:t` (unwrap the `w:del`).
37
- - Either way, remove the revision containers afterwards; leaving an empty `w:ins` shows a stray marker.
38
- - Format-change elements have no accept/reject choice in the content sense: accepted means the new properties stay, rejected means the old ones are restored.
35
+ - **Accept** — keep `w:ins` content and unwrap it, delete `w:del` entirely, and for moves keep `w:moveTo`.
36
+ - **Reject** — delete `w:ins` content, keep `w:del` content and convert `w:delText` back to `w:t` (unwrap the `w:del`).
37
+ - Either way, remove the revision containers afterwards; an empty `w:ins` shows a stray marker.
38
+ - Format-change elements are not content: accepting keeps the new properties, rejecting restores the old ones.
39
39
 
40
40
  ## Where tracking hides
41
41
 
42
- - Inside headers, footers, footnotes, endnotes, table cells, text boxes.
43
- - Table-level changes: `w:trPr/w:ins` for an inserted row, `w:tcPr/w:cellIns` for a cell.
44
- - Paragraph-level: a paragraph mark inserted or deleted uses `w:rPr/w:ins` in `w:pPr`, so "delete this paragraph" is not a `w:del` around the paragraph.
45
- - Comments are separate markup; a comment can survive its being accepted.
42
+ - Inside headers, footers, footnotes, endnotes, table cells and text boxes.
43
+ - Table level: `w:trPr/w:ins` for an inserted row, `w:tcPr/w:cellIns` for a cell.
44
+ - Paragraph level: an inserted or deleted paragraph mark uses `w:rPr/w:ins` in `w:pPr`, so "delete this paragraph" is not a `w:del` around the paragraph.
45
+ - Comments are separate markup; a comment can survive its text being accepted.
46
46
 
47
47
  ## Reading markup without a renderer
48
48
 
@@ -50,4 +50,4 @@ A deletion is a `w:del` containing runs with `w:delText`, not a run with a strik
50
50
  "<python>" "<skill>/scripts/accept_tracked_changes.py" "<file.docx>" --mode report
51
51
  ```
52
52
 
53
- The report lists insertions and deletions with authors and the text on each side. That is the honest way to answer "what changed" when there is no rendered view, and it is also how you confirm a generated change landed as markup rather than as plain text.
53
+ The report lists insertions and deletions with authors and the text on each side — the honest answer to "what changed" with no rendered view, and the way to confirm a generated change landed as markup rather than as plain text.
@@ -19,9 +19,7 @@ word/comments.xml, footnotes.xml, endnotes.xml optional
19
19
 
20
20
  ## The body
21
21
 
22
- `word/document.xml` is a sequence of block-level elements: `w:p` (paragraph), `w:tbl` (table), `w:sdt` (content control), and finally one `w:sectPr` per section (the last one sits in the body, earlier ones inside a paragraph's `pPr`).
23
-
24
- A paragraph is:
22
+ `word/document.xml` is a sequence of block elements — `w:p` (paragraph), `w:tbl` (table), `w:sdt` (content control) — plus one `w:sectPr` per section: the last sits in the body, earlier ones inside a paragraph's `pPr`.
25
23
 
26
24
  ```xml
27
25
  <w:p>
@@ -39,9 +37,9 @@ A paragraph is:
39
37
  </w:p>
40
38
  ```
41
39
 
42
- Everything a reader sees is a run inside a paragraph; everything that makes it look different from its style is direct formatting in `pPr`/`rPr`. Direct formatting is why `style_normalize.py` exists.
40
+ Everything a reader sees is a run inside a paragraph; everything that makes it differ from its style is direct formatting in `pPr`/`rPr`, which is why `style_normalize.py` exists (`tasks/style_lint_normalize.md`).
43
41
 
44
- A table is `w:tbl` > `w:tblPr` (style, width, layout) + `w:tblGrid` (column widths) + `w:tr` > `w:tc` > `w:p`. A cell always contains at least one paragraph.
42
+ A table is `w:tbl` > `w:tblPr` (style, width, layout) + `w:tblGrid` (column widths) + `w:tr` > `w:tc` > `w:p`. Every cell holds at least one paragraph.
45
43
 
46
44
  ## Units
47
45
 
@@ -52,31 +50,31 @@ A table is `w:tbl` > `w:tblPr` (style, width, layout) + `w:tblGrid` (column widt
52
50
  | eighth-point | border widths (`w:sz` on borders) | 8 per point |
53
51
  | EMU (914400/in) | drawing extents | 914400 per inch |
54
52
 
55
- A Letter page is 12240×15840 twips. Text width = page width − left − right margins (default 9360 twips with 1in margins).
53
+ A Letter page is 12240×15840 twips. Text width = page width − left − right margins (9360 twips at 1in margins).
56
54
 
57
55
  ## Styles
58
56
 
59
- `w:style` with `w:type` of `paragraph`, `character`, `table` or `numbering`. Attributes: `w:styleId` (the internal name), `w:name` (the UI name), `w:basedOn`, `w:next`, `w:link`, plus `w:pPr`/`w:rPr`.
57
+ `w:style` with `w:type` of `paragraph`, `character`, `table` or `numbering`; attributes `w:styleId` (internal name), `w:name` (UI name), `w:basedOn`, `w:next`, `w:link`, plus `w:pPr` / `w:rPr`.
60
58
 
61
- - `Normal` is the root; `Heading1`..`Heading9` drive the outline level and the TOC.
62
- - Outline level can also be set explicitly with `w:outlineLvl` (0-based) in `pPr`; a paragraph can look like a heading without being one, and the TOC will not see it.
59
+ - `Normal` is the root; `Heading1`..`Heading9` drive outline level and the TOC.
60
+ - `w:outlineLvl` (0-based) in `pPr` sets an outline level explicitly: a paragraph can look like a heading without being one, and the TOC will not see it.
63
61
  - Latent styles do not exist in the file until used; a document may reference `Heading3` while `styles.xml` has no definition for it.
64
62
 
65
63
  ## Numbering
66
64
 
67
- `word/numbering.xml` holds `w:abstractNum` (the list definition, per level: format, text, indentation) and `w:num` (`w:numId` → `w:abstractNumId`, optionally overridden). A paragraph joins a list with `w:numPr` referencing a `numId`. Two paragraphs with the same `numId` share a counter.
65
+ `word/numbering.xml` holds `w:abstractNum` (list definition: per level its format, text and indentation) and `w:num` (`w:numId` → `w:abstractNumId`, optionally overridden). A paragraph joins a list with `w:numPr` referencing a `numId`; two paragraphs with the same `numId` share a counter.
68
66
 
69
67
  ## Sections
70
68
 
71
- `w:sectPr` carries page size (`w:pgSz`), margins (`w:pgMar`), orientation (implied by width vs height, or `w:orient`), columns, and the header/footer references. A document with one section has one `sectPr`; a new section is a paragraph whose `pPr` contains the *previous* section's `sectPr`.
69
+ `w:sectPr` carries page size (`w:pgSz`), margins (`w:pgMar`), orientation (implied by width vs height, or `w:orient`), columns and header/footer references. A single-section document has one `sectPr`; a new section is a paragraph whose `pPr` contains the *previous* section's `sectPr`.
72
70
 
73
71
  ## Fields
74
72
 
75
- Simple (`w:fldSimple`) and complex (`fldChar` begin/separate/end with `w:instrText`). The visible text is a cache. `w:updateFields` in `settings.xml` asks the editor to refresh on open. See `ooxml/hyperlinks_and_fields.md`.
73
+ Simple (`w:fldSimple`) and complex (`fldChar` begin/separate/end with `w:instrText`). The visible text is a cache; `w:updateFields` in `settings.xml` asks the editor to refresh on open. See `ooxml/hyperlinks_and_fields.md`.
76
74
 
77
75
  ## Revision markup
78
76
 
79
- `w:ins`, `w:del` (with `w:delText`), `w:moveFrom`/`w:moveTo`, `w:rPrChange`/`w:pPrChange`, each with author and date. See `ooxml/tracked_changes.md`.
77
+ `w:ins`, `w:del` (with `w:delText`), `w:moveFrom` / `w:moveTo`, `w:rPrChange` / `w:pPrChange`, each with author and date. See `ooxml/tracked_changes.md`.
80
78
 
81
79
  ## Minimum valid package
82
80
 
@@ -1,19 +1,17 @@
1
1
  # Eliciting a template
2
2
 
3
- A user who says "use our house style" has a file somewhere. Getting it is worth one question; guessing produces a document that has to be redone.
3
+ A user who says "use our house style" has a file somewhere. One question gets it; guessing produces a document that has to be redone.
4
4
 
5
5
  ## Ask for the artefact, not the description
6
6
 
7
- Description ("blue headings, maybe 11pt") produces a different document every time. The artefact (`house-template.dotx`, an old `.docx` of the same kind, a PDF of the last report) carries the actual styles, margins and fonts.
8
-
9
- One sentence is enough:
7
+ A description ("blue headings, maybe 11pt") produces a different document every time. The artefact (`house-template.dotx`, an old `.docx` of the same kind, a PDF of the last report) carries the actual styles, margins and fonts.
10
8
 
11
9
  > Is there an existing document in this style I should match? Send the file (`.dotx`, or any `.docx` in that style) and I will follow it exactly.
12
10
 
13
- If they have no file, ask for two or three specifics that cannot be guessed and choose the rest from `SKILL.md` defaults:
11
+ With no file, ask for two or three specifics that cannot be guessed and take the rest from `SKILL.md` defaults:
14
12
 
15
- - page size and margins, if their organisation is not US Letter,
16
- - the heading/body typeface and sizes,
13
+ - page size and margins, if the organisation is not US Letter,
14
+ - heading and body typeface and sizes,
17
15
  - anything required by policy (logo in the header, classification mark in the footer).
18
16
 
19
17
  ## Read the template before using it
@@ -24,7 +22,7 @@ If they have no file, ask for two or three specifics that cannot be guessed and
24
22
  "<python>" "<skill>/scripts/section_audit.py" "<template.docx>"
25
23
  ```
26
24
 
27
- From `styles.xml`, note the `styleId` of what will be used: `Heading1`..`Heading3`, `Title`, `Caption`, `Quote`, `ListParagraph`. From the section audit, record page size, margins, header/footer text and whether the first page is different.
25
+ From `styles.xml`, note the `styleId` of what will be used: `Heading1`..`Heading3`, `Title`, `Caption`, `Quote`, `ListParagraph`. From the section audit, record page size, margins, header and footer text, and whether the first page is different.
28
26
 
29
27
  ## Apply it
30
28
 
@@ -32,18 +30,18 @@ From `styles.xml`, note the `styleId` of what will be used: `Heading1`..`Heading
32
30
  "<python>" "<skill>/scripts/apply_template_styles.py" --template "<template.docx>" --target "<draft.docx>" --out "<styled.docx>"
33
31
  ```
34
32
 
35
- This merges style definitions (and numbering) by id — the body content is untouched, so anything written with direct formatting keeps it. Follow with:
33
+ Merges style definitions (and numbering) by id; the body content is untouched, so anything written with direct formatting keeps it. Then:
36
34
 
37
35
  ```bash
38
- "<python>" "<skill>/scripts/style_normalize.py" "<styled.docx>" --out "<styled-final.docx>" --clear_paragraph_format --enforce_heading_spacing
36
+ "<python>" "<skill>/scripts/style_normalize.py" "<styled.docx>" --out "<styled-final.docx" --clear_paragraph_format --enforce_heading_spacing
39
37
  ```
40
38
 
41
- Now the text picks up the template's look instead of the draft's.
39
+ The text now picks up the template's look instead of the draft's.
42
40
 
43
41
  ## When the template is a PDF or an image
44
42
 
45
- Extract structure, not styles: heading hierarchy, section order, table layout, caption convention, margin proportions. Then reproduce them with named styles in a generated document. Say which parts were matched approximately — a PDF does not tell you the font size of a heading, only how it looks.
43
+ Extract structure, not styles: heading hierarchy, section order, table layout, caption convention, margin proportions. Reproduce them with named styles in a generated document. Say which parts were matched approximately — a PDF does not reveal a heading's font size, only how it looks.
46
44
 
47
45
  ## When there is no template and no details
48
46
 
49
- Fall back to the defaults in `SKILL.md` (Letter, 1in margins, 11–12pt body, black headings, `#D9D9D9` table borders) and state the assumption in one line with the delivered file. Do not stall on a question the user may not care about.
47
+ Fall back to the `SKILL.md` defaults (Letter, 1in margins, 11–12pt body, black headings, `#D9D9D9` table borders) and state the assumption in one line with the delivered file. Do not stall on a question the user may not care about.
@@ -1,49 +1,49 @@
1
1
  # Writing quality
2
2
 
3
- Content quality is the part of a document the format cannot fix. These are the rules to apply while drafting, before any rendering.
3
+ Content quality is the part of a document the format cannot fix. Apply these rules while drafting, before any rendering.
4
4
 
5
5
  ## Structure before prose
6
6
 
7
- - Every heading states a claim the reader can disagree with ("Services carried the quarter", not "Services"). A heading that only names a topic is a missed opportunity to be clear.
7
+ - Every heading states a claim the reader can disagree with ("Services carried the quarter", not "Services").
8
8
  - A section that cannot be summarised in one sentence is two sections.
9
- - Three levels of heading is the practical maximum; a fourth usually means the content should be a table or an appendix.
10
- - Nothing between a heading and its first paragraph. No label line, no restated title.
9
+ - Three heading levels is the practical maximum; a fourth means the content wants a table or an appendix.
10
+ - Nothing between a heading and its first paragraph — no label line, no restated title.
11
11
 
12
12
  ## Paragraphs
13
13
 
14
- - One idea per paragraph, first sentence carries it.
15
- - 3–6 sentences is the comfortable range; a 1600-word paragraph is a formatting defect even if the prose is good.
16
- - No em-dash pile-ups, no "furthermore/moreover" chains, no sentence that only announces the next sentence.
17
- - The last paragraph of a section says what it meant, not that it is finished.
14
+ - One idea per paragraph, carried by the first sentence.
15
+ - 3–6 sentences is comfortable; a 1600-word paragraph is a formatting defect even when the prose is good.
16
+ - No em-dash pile-ups, no "furthermore/moreover" chains, no sentence that only announces the next one.
17
+ - The last paragraph of a section says what the section meant, not that it is finished.
18
18
 
19
19
  ## Lists and tables
20
20
 
21
21
  - Bullets for parallel items of equal weight; never for a sequence (that is a numbered list).
22
- - If items have two attributes, a table beats a bulleted list with parentheticals.
23
- - Table headers are nouns, units in the header ("Revenue ($m)"), numbers right-aligned.
22
+ - Items with two attributes belong in a table, not a bulleted list with parentheticals.
23
+ - Table headers are nouns with units ("Revenue ($m)"); numbers right-aligned.
24
24
  - Every table earns its caption; a table without a purpose is a screenshot of data.
25
25
 
26
26
  ## Voice
27
27
 
28
- - Active unless the actor is unknown or unimportant; "We found", not "It was found".
28
+ - Active unless the actor is unknown or unimportant: "We found", not "It was found".
29
29
  - Present tense for findings, past for actions taken.
30
- - No unsupported superlatives. "18% growth" beats "strong growth"; if a number is unknown, say so rather than adding an adverb.
31
- - Define an acronym once, then use it. Never define it twice in different places.
30
+ - No unsupported superlatives: "18% growth" beats "strong growth"; if the number is unknown, say so instead of adding an adverb.
31
+ - Define an acronym once, then use it; never redefine it elsewhere.
32
32
 
33
33
  ## Numbers
34
34
 
35
- - Consistent precision. Do not mix "12.4%" and "8%" in one table unless the source did.
35
+ - Consistent precision: do not mix "12.4%" and "8%" in one table unless the source did.
36
36
  - Percentages below 1 take a leading zero (0.4%, not .4%).
37
- - State the period and the currency in the table or its caption, not in the surrounding prose.
38
- - A number in prose must match the number in the table; rendering does not catch this, re-reading does.
37
+ - State period and currency in the table or its caption, not in surrounding prose.
38
+ - A prose number must match the table number; rendering does not catch this, re-reading does.
39
39
 
40
40
  ## What to cut
41
41
 
42
- - Opening paragraphs that explain that the document will explain something.
43
- - Closing paragraphs that thank the reader.
42
+ - Opening paragraphs explaining that the document will explain something.
43
+ - Closing paragraphs thanking the reader.
44
44
  - Bold on every second phrase: emphasis used everywhere is emphasis used nowhere.
45
- - Sentences that begin "It is important to note that".
45
+ - Sentences beginning "It is important to note that".
46
46
 
47
47
  ## Where this connects
48
48
 
49
- `references/docx-structure.md` covers how the structure is expressed in Word — styles, captions, table layout. `tasks/verify_render.md` covers checking the result on a page. Neither replaces reading the text once with the question "would a busy reader get the point from the headings alone?"
49
+ `references/docx-structure.md` covers how structure is expressed in Word — styles, captions, table layout. `tasks/verify_render.md` covers checking the result on a page. Neither replaces reading the text once asking whether a busy reader would get the point from the headings alone.
@@ -1,8 +1,6 @@
1
1
  # Accessibility
2
2
 
3
- **Goal.** A document a screen reader can navigate: real headings, described images, tables with a header row, no fake emphasis carrying meaning.
4
-
5
- The accessibility tree in Word comes from structure, not appearance. Bold text announces as bold; a `Heading 1` announces as a heading and appears in the navigation pane. Alt text lives in `wp:docPr @descr`.
3
+ Accessibility comes from structure, not appearance: bold announces as bold, `Heading 1` announces as a heading and appears in the navigation pane. Alt text lives in `wp:docPr @descr`.
6
4
 
7
5
  ## Audit
8
6
 
@@ -10,36 +8,32 @@ The accessibility tree in Word comes from structure, not appearance. Bold text a
10
8
  "<python>" "<skill>/scripts/a11y_audit.py" "<file.docx>" --out_json "<report.json>"
11
9
  ```
12
10
 
13
- Checks: images without a description or title, tables without a repeating header row, heading levels that jump, empty headings, links whose text is only "click here" / "here" / "link", and a missing core title.
14
-
15
- Exit code 1 means at least one finding; `--out_json` writes the same report for a larger pass.
11
+ Checks images without description or title, tables without a repeating header row, heading levels that jump, empty headings, link text that is only "click here", "here" or "link", and a missing core title. Exit 1 means at least one finding.
16
12
 
17
- ## Fix the mechanical parts
13
+ ## Mechanical fixes
18
14
 
19
15
  ```bash
20
- "<python>" "<skill>/scripts/a11y_audit.py" "<file.docx>" \
21
- --fix_image_alt from_filename --fix_table_headers first_row \
22
- --out "<file-a11y.docx>"
16
+ "<python>" "<skill>/scripts/a11y_audit.py" "<file.docx>" --fix_image_alt from_filename --fix_table_headers first_row --out "<file-a11y.docx"
23
17
  ```
24
18
 
25
- Both fixes are honest placeholders: the file name as alt text is better than an empty description, and a header row that repeats across pages helps a reader who lands mid-table. Neither substitutes for real text.
19
+ These are honest placeholders, not substitutes for real text.
26
20
 
27
- ## Fix the parts that need judgement
21
+ ## Judgement fixes
28
22
 
29
- - **Alt text.** Describe what the reader would lose without the picture: "Bar chart: revenue by region, EMEA 4.1M ahead of APAC 3.2M." Decorative rules and dividers get an empty description.
30
- - **Link text.** "Download the Q2 ledger" instead of "click here".
31
- - **Reading order.** Decorative text boxes and floating images insert themselves at awkward places in the reading order; convert to inline if the flow matters.
32
- - **Colour.** Meaning carried only by colour (red = bad) fails for a colour-blind reader; add a word.
33
- - **Tables for layout.** A layout table announces as a data table. Restructure into paragraphs if the content is not tabular.
23
+ - **Alt text** describes what the reader loses, e.g. "Bar chart: revenue by region, EMEA 4.1M ahead of APAC 3.2M". Decorative rules and dividers get an empty description.
24
+ - **Link text** names the destination: "Download the Q2 ledger", not "click here".
25
+ - **Reading order:** decorative text boxes and floating images land awkwardly; convert them to inline.
26
+ - **Colour alone** (red = bad) fails colour-blind readers; add a word.
27
+ - **Layout tables** announce as data tables; restructure them as paragraphs.
34
28
 
35
- Long documents also want a TOC (`tasks/toc_workflow.md`), which is the screen-reader equivalent of the navigation pane, and language tags so a screen reader pronounces correctly.
29
+ Longer documents also want a TOC (`tasks/toc_workflow.md`) and language tags.
36
30
 
37
31
  ## Verify
38
32
 
39
- Re-run the audit to zero findings, then render and read the page: heading hierarchy visible, alt text is not visible (it is metadata), table header row distinct. If a screen reader is available, open the document and navigate by heading — that is the true test.
33
+ Re-run the audit to zero findings and render. Heading hierarchy is visible; alt text is metadata and stays invisible; the header row must be distinct. With a screen reader available, navigate by heading.
40
34
 
41
35
  ## Pitfalls
42
36
 
43
- - Alt text on a decorative image is worse than none; an empty description plus `title` marks it decorative.
44
- - A table header row is `w:tblHeader` on the row, not a bold first row.
45
- - Images inside a table cell still need descriptions.
37
+ - Alt text on a decorative image is worse than none: use an empty description plus `title` to mark it decorative.
38
+ - A header row is `w:tblHeader` on the row, not a bold first row.
39
+ - Images inside table cells still need descriptions.
@@ -1,49 +1,46 @@
1
- # Captions and cross-references
1
+ # Captions and numbered cross-references
2
2
 
3
- **Goal.** Number figures and tables automatically and refer to them from the prose without typing a number that will drift.
4
-
5
- Two parts: a caption paragraph with a `SEQ` field (`SEQ Table \* ARABIC`), and a bookmark around it that the prose reaches with a `REF` field. Without the bookmark a `REF` has nothing to point at.
3
+ A caption is a paragraph with a `SEQ` field (`SEQ Table \* ARABIC`) plus a bookmark; the prose reaches that bookmark with a `REF` field. Without the bookmark a `REF` has no target.
6
4
 
7
5
  ## Add captions
8
6
 
9
7
  ```bash
10
- "<python>" "<skill>/scripts/captions_and_crossrefs.py" "<file.docx>" "<file-captioned.docx>" \
11
- --tables --figures --bookmarks --caption_text "Source: finance ledger"
8
+ "<python>" "<skill>/scripts/captions_and_crossrefs.py" "<file.docx>" "<file-captioned.docx>" --tables --figures --bookmarks --caption_text "Source: finance ledger"
12
9
  ```
13
10
 
14
- - `--tables` adds `Table N` under each table, `--figures` adds `Figure N` under each picture. With neither flag, both run.
15
- - Captions use the `Caption` style and sit inside the same visual block as the object, so a page break cannot orphan them.
16
- - `--bookmarks` names the captions `tbl1`, `tbl2`, `fig1`, … so cross-references have targets.
17
- - `--materialize` writes literal numbers instead of `SEQ` fields; use it for a frozen PDF export, not for a document that will change.
18
- - `--caption_text` appends a fixed note after the number.
11
+ - `--tables` adds `Table N` under each table; `--figures` adds `Figure N` under each picture.
12
+ - Neither flag runs both.
13
+ - `--bookmarks` names them `tbl1`, `tbl2`, `fig1`, … — the `tblN`/`figN` pattern `insert_ref_fields.py` expects.
14
+ - `--materialize` writes literal numbers: for a frozen PDF export, not for a document that will change.
15
+ - `--caption_text` appends a fixed note.
19
16
 
20
- The bookmarks the script creates (`tblN`, `figN`) are what `insert_ref_fields.py` expects by default.
17
+ Captions use the `Caption` style and stay in the same visual block as the object, so a page break cannot orphan them.
21
18
 
22
- ## Add cross-references
19
+ ## Cross-reference
23
20
 
24
- Write placeholders in your content, then convert them:
21
+ Write `[[REF:tbl1]]` placeholders in the prose, then:
25
22
 
26
23
  ```bash
27
- "<python>" "<skill>/scripts/insert_ref_fields.py" "<file.docx>" "<file-refs.docx>"
24
+ "<python>" "<skill>/scripts/insert_ref_fields.py" "<file.docx>" "<file-refs.docx"
28
25
  ```
29
26
 
30
- `[[REF:tbl1]]` becomes a `REF tbl1 \h` field, which renumbers when the table moves. `--pattern` accepts your own regular expression as long as it has a named group `bookmark`; `--prefix` prepends text such as `Table ` to each result.
27
+ That produces a `REF tbl1 \h` field, so the number follows the table. `--pattern` accepts your own regex with the named group `bookmark`; `--prefix` prepends text such as `Table `.
31
28
 
32
- If the reference should read "Table 2" rather than just "2", set the `REF` field's `\n` behaviour off and include the label in the prose — a field cannot know whether its target is a table or a figure.
29
+ If a reference should read "Table 2" rather than "2", set the REF field's `\n` behaviour off and put the label in the prose: a field cannot know whether it points at a table or a figure.
33
30
 
34
- ## Order of operations
31
+ ## Order
35
32
 
36
- 1. Add or restructure tables and figures.
37
- 2. Run `captions_and_crossrefs.py` (creates captions and bookmarks).
38
- 3. Run `insert_ref_fields.py` (turns placeholders into fields).
39
- 4. Re-render: caption positions and numbering are a layout decision.
33
+ 1. Add or restructure the tables and figures.
34
+ 2. Run `captions_and_crossrefs.py`.
35
+ 3. Run `insert_ref_fields.py`.
36
+ 4. Re-render.
40
37
 
41
38
  ## Verify
42
39
 
43
- `fields_report.py`: one `SEQ` per caption, one `REF` per reference, no `REF` left with an empty result. Then read the rendered page — a caption above a table instead of below, or a caption separated from its object by a page break, is the usual defect.
40
+ Run `fields_report.py`: one SEQ per caption, one REF per reference, and no REF with an empty result. Then render. The usual defects are a caption above its table, or a caption separated from it by a page break.
44
41
 
45
42
  ## Pitfalls
46
43
 
47
- - Renumbering happens on field update. Two captions claim `Table 2` until Word recalculates.
48
- - A caption added by hand with the number typed in will not renumber; use the script or a `SEQ` field.
49
- - Bookmarks must be unique; copying a caption copies its bookmark name and breaks the reference.
44
+ - Numbering changes on field update, so two captions can claim `Table 2` until Word recalculates.
45
+ - A hand-typed caption number never renumbers.
46
+ - Bookmarks must be unique: copying a caption copies its bookmark name and breaks the reference.
@@ -1,49 +1,44 @@
1
- # Tracked changes
1
+ # Proposed and tracked changes
2
2
 
3
- **Goal.** Propose edits as tracked changes so a reviewer can accept or reject them, or clean up a file that arrives full of markup.
3
+ A tracked edit is markup: an insertion wraps runs in `w:ins`, a deletion wraps `w:delText` in `w:del`, a move is `w:moveFrom`/`w:moveTo` paired by `w:name`, and a formatting change is `w:rPrChange`/`w:pPrChange`. `w:trackRevisions` in `word/settings.xml` makes Word record new edits.
4
4
 
5
- A tracked edit is markup, not text: an insertion is `w:ins` wrapping runs, a deletion is `w:del` wrapping `w:delText`, and formatting changes are `w:rPrChange` / `w:pPrChange`. The setting `w:trackRevisions` in `word/settings.xml` makes Word record new edits the same way.
6
-
7
- ## Propose an edit
5
+ ## Propose
8
6
 
9
7
  ```bash
10
- "<python>" "<skill>/scripts/add_tracked_replacements.py" "<file.docx>" --out "<file-tracked.docx>" \
11
- --author "Review" --replace "18%=21%" --replace "flat=steady"
8
+ "<python>" "<skill>/scripts/add_tracked_replacements.py" "<file.docx>" --out "<file-tracked.docx>" --author "Review" --replace "18%=21%" --replace "flat=steady"
12
9
  ```
13
10
 
14
- Each `--replace` is `OLD=NEW`; the script splits runs at the match so only the changed characters are marked, keeps the surrounding formatting, and turns on `trackRevisions`. Quote the `--author` the reviewer should see.
11
+ Each `--replace` is `OLD=NEW`. The script splits runs at the match so only the changed characters are marked, keeps the surrounding formatting, and turns on `trackRevisions`. Quote the `--author` the reviewer should see.
15
12
 
16
- Limit: one replacement per pattern per paragraph, and a match split across runs is still found because the split is computed on paragraph text. Reword the pattern if the paragraph repeats the phrase.
13
+ Limit: one replacement per pattern per paragraph. A match split across runs is still found because the split is computed on paragraph text; reword if a paragraph repeats the phrase.
17
14
 
18
- ## Inspect what is proposed
15
+ ## Inspect
19
16
 
20
17
  ```bash
21
18
  "<python>" "<skill>/scripts/accept_tracked_changes.py" "<file.docx>" --mode report
22
19
  "<python>" "<skill>/scripts/docx_kit.py" xml "<file.docx>" word/document.xml
23
20
  ```
24
21
 
25
- The report counts insertions, deletions, move pairs and format changes. Use `docx_kit.py xml` when you need to know exactly which words change.
22
+ The report counts insertions, deletions, move pairs and format changes.
26
23
 
27
24
  ## Accept or reject
28
25
 
29
26
  ```bash
30
- "<python>" "<skill>/scripts/accept_tracked_changes.py" "<file.docx>" --mode accept --out "<file-accepted.docx>"
31
- "<python>" "<skill>/scripts/accept_tracked_changes.py" "<file.docx>" --mode reject --out "<file-rejected.docx>"
27
+ "<python>" "<skill>/scripts/accept_tracked_changes.py" "<file.docx>" --mode accept --out "<file-accepted.docx"
28
+ "<python>" "<skill>/scripts/accept_tracked_changes.py" "<file.docx>" --mode reject --out "<file-rejected.docx"
32
29
  ```
33
30
 
34
- Accept keeps inserted text and drops deleted text; reject does the reverse and restores `w:delText` as ordinary text. Format-only changes are discarded either way. `--keep_tracking_on` leaves `trackRevisions` enabled, so the next person's edits are also recorded.
35
-
36
- ## Before delivery
31
+ Accept keeps inserted text and drops deleted text; reject reverses that and restores `w:delText` as ordinary text. Format-only changes are discarded either way. `--keep_tracking_on` leaves `trackRevisions` enabled.
37
32
 
38
- Rendered pages contain no markup, so a document can look finished while still carrying redlines. Always check `--mode report` on a file you are about to send, and accept or reject explicitly.
33
+ Before delivery: rendered pages contain no markup, so a file can look finished while carrying redlines. Always run `--mode report` on a file about to be sent, then accept or reject explicitly.
39
34
 
40
35
  ## Verify
41
36
 
42
- After accepting, `docx_kit.py text` should show the new wording and no `w:ins`/`w:del` should remain in `word/document.xml`. Render and read the affected page.
37
+ After accepting, `docx_kit.py text` shows the new wording and `word/document.xml` contains no `w:ins`/`w:del`. Render the affected page.
43
38
 
44
39
  ## Pitfalls
45
40
 
46
- - `w:del` contains `w:delText`, not `w:t`; a text extraction that only looks at `w:t` silently loses deletions.
47
- - Tables, headers and footnotes can each carry their own tracked changes — the script covers every text part, but a hand edit in one part can miss another.
48
- - Accepting a move pair (`w:moveFrom`/`w:moveTo`) as two unrelated edits duplicates content; the script treats them as a pair.
49
- - Comments are not tracked changes. See `comments_manage.md`.
41
+ - `w:del` contains `w:delText`, not `w:t`; extraction that reads only `w:t` loses deletions.
42
+ - Tables, headers and footnotes can each carry tracked changes. The script covers every text part; a hand edit can miss one.
43
+ - Accepting a move pair as two unrelated edits duplicates content. The script treats them as a pair.
44
+ - Comments are not tracked changes; see `comments_manage.md`.