# Word Review Redline

> Enforce reviewer-friendly Word editing with real tracked changes and a short Chinese comment at every modified location. Use when Codex edits an existing `.docx` for revision, polishing, correction, review response, bilingual cleanup, or redline delivery and the user needs each change to remain visible and explainable for manual review.

- Skill: `whisperas/word-review-redline` (Agent Skill, multi-file: 9 files)
- Install (CLI): `npx skillmds@latest add whisperas/word-review-redline`
- Raw SKILL.md: https://api.skillmd.com/api/skills/whisperas/word-review-redline/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Docs & Writing
- Author: WhisperAS (https://skillmd.com/u/whisperas)
- Updated: 2026-09-22
- Page: https://skillmd.com/skills/whisperas/word-review-redline

---


# Word Review Redline

Use this skill when editing an existing Word document must stay reviewable.

This skill does not replace the system `documents` skill. It narrows how edits must be applied on top of that foundation:
- always use real Word tracked changes, not silent replacement
- add a short Chinese comment at every modified location
- keep comments simple and reviewer-oriented, such as `修改措辞`、`更正术语`、`补充说明`
- finish with the `documents` verification flow

## Workflow

1. Read the system `documents` skill first.
   - Primary foundation: `C:\Users\AS\.codex\plugins\cache\openai-primary-runtime\documents\26.514.12219\skills\documents\SKILL.md`
   - For real tracked changes: load `ooxml/tracked_changes.md`
   - For real Word comments: load `ooxml/comments.md`
2. Decide whether the requested edit can stay local and surgical.
   - Prefer minimal replacements over rewriting large spans.
   - Preserve surrounding structure, formatting, and review history.
3. Apply changes with tracked revisions enabled.
   - Do not make silent text substitutions in final deliverables.
   - Do not accept tracked changes unless the user explicitly asks for a clean copy.
4. Attach a Chinese comment at every changed location.
   - Each inserted or replaced location needs one concise comment.
   - Comments should explain the edit category, not restate the full sentence.
5. Verify structurally and visually.
   - Comments require structural verification.
   - Layout requires render verification through the `documents` workflow.

## Comment Rules

Use short Chinese phrases that help a reviewer scan edits quickly.

Preferred patterns:
- `修改措辞`
- `统一表述`
- `更正错别字`
- `更正术语`
- `补充说明`
- `补充背景`
- `精简表述`
- `增强语气`
- `弱化绝对表述`
- `修正格式`

For longer paragraph-level rewrites, make the comment more informative.
Examples:
- `重写本段以增强逻辑衔接和表达清晰度`
- `补充限制条件并弱化绝对表述`
- `整合重复表述，压缩本段长度`
- `按审稿语气重写本段结论表述`

Avoid:
- long explanations
- English comments unless the user asks
- one summary comment covering multiple distant edits
- comments only at paragraph level when the actual edit is a small local replacement

## Editing Rules

- Default to editing existing `.docx` files, not creating a fresh rewrite.
- Prefer true tracked replacements so Word can show delete/insert markup.
- For each replacement, keep the comment anchored to the changed range.
- If a requested change is too large for precise range comments, split it into smaller edits when practical.
- If a full paragraph rewrite is unavoidable, explain that in one local Chinese comment attached to that rewritten area.

## Tools

Use the system `documents` skill scripts as the base workflow.

Important helpers:
- `render_docx.py` for DOCX render QA
- `scripts/comments_extract.py` for structural verification
- `scripts/accept_tracked_changes.py` only when the user requests a clean accepted copy

This skill adds one local helper:
- `scripts/tracked_review_edit.py`
- `scripts/render_docx_via_documents.ps1`
- `scripts/render_docx_windows.py`
- `scripts/review_docx_workflow.ps1`

Use `tracked_review_edit.py` when the change can be represented as exact text replacements and each replacement needs an attached Chinese comment.
Use `render_docx_via_documents.ps1` as the main Windows render entrypoint for this machine.
Use `render_docx_windows.py` when you want the direct Python entrypoint behind that wrapper.
Use `review_docx_workflow.ps1` when you want the end-to-end flow in one command.

## Local Helper

`tracked_review_edit.py` performs all of the following in one pass:
- enables `w:trackRevisions`
- replaces one occurrence per requested target with real `<w:del>` + `<w:ins>`
- adds a real Word comment anchored to the inserted replacement
- writes author/date metadata for both tracked changes and comments

Expected request shape:
- start from an existing `.docx`
- provide one or more replacement specs
- provide a short Chinese comment per replacement

Example:

```powershell
& "<bundled-python>" "C:\Users\AS\.codex\skills\word-review-redline\scripts\tracked_review_edit.py" `
  input.docx `
  --out output.docx `
  --author "Codex" `
  --edit "旧表述=>新表述=>修改措辞" `
  --edit "错误术语=>正确术语=>更正术语"
```

Batch example:

```powershell
& "<bundled-python>" "C:\Users\AS\.codex\skills\word-review-redline\scripts\tracked_review_edit.py" `
  input.docx `
  --out output.docx `
  --edit-file edits.csv `
  --require_all
```

The batch file may be `.csv` or `.json`. When `comment` is empty, the helper auto-generates a short Chinese review comment. Read `references/batch_edit_lists.md` for the schema.

## Render QA

For visual QA, keep following the system `documents` workflow, but on this machine use the local wrapper implementation so LibreOffice and Poppler are injected in a Windows-safe way:

```powershell
& "C:\Users\AS\.codex\skills\word-review-redline\scripts\render_docx_via_documents.ps1" `
  -InputPath output.docx `
  -OutputDir render-out `
  -EmitPdf
```

Fallback:

```powershell
& "<bundled-python>" "C:\Users\AS\.codex\skills\word-review-redline\scripts\render_docx_windows.py" `
  output.docx `
  --output_dir render-out
```

## One-Click Workflow

Use the orchestration script when you want one command to:
- detect Strict OOXML
- normalize through local Word when needed
- apply tracked edits with Chinese comments
- extract comments to JSON
- render PDF/PNG QA artifacts

```powershell
& "C:\Users\AS\.codex\skills\word-review-redline\scripts\review_docx_workflow.ps1" `
  -InputPath input.docx `
  -EditFile edits.csv `
  -RequireAll
```

Outputs are written into a timestamped working folder under `D:\codex\tmp\review_docx_workflow\` unless `-WorkDir` is provided.

## Validation

For each meaningful edit batch:
1. Extract comments structurally with the system `comments_extract.py` helper.
2. Confirm comment count matches edit count.
3. Confirm each comment text is Chinese and reviewer-friendly.
4. Render the DOCX through `scripts/render_docx_via_documents.ps1` on this machine.
5. If you need the lower-level direct entrypoint, use `scripts/render_docx_windows.py`.
6. If you want the full Windows workflow in one step, use `scripts/review_docx_workflow.ps1`.

## References

Read `references/review_comment_patterns.md` when you need examples or want to normalize comment wording across edits.
Read `references/batch_edit_lists.md` when preparing CSV or JSON replacement lists.

