docx-architecture-audit
Skill866 starsChanged 3 months agoMITView on GitHub
Audit the office-open-xml-viewer DOCX layout architecture for a single immutable layout-to-paint pipeline. Use after major DOCX layout, pagination, measurement, paint, parser-model, worker, or compatibility changes, and before declaring Issue #1037-style architecture work complete.
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 4 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 13
Read AGENTS.md and docs/docx-layout-engine-redesign.md completely.
- Distinctive: line 17
Prefer ECMA-376 / ISO/IEC 29500, then the applicable Microsoft implementation note.
- Distinctive: line 19
Run the deterministic gates:
- Distinctive: line 39
no migration flag, silent legacy fallback, dry-render geometry collection, or transitional allowance remains.
- Distinctive: line 51
Run focused behavior tests for every suspicious path.
≈ “Common” is an estimate: at least 1 in 5 of the 308,232 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
DOCX Architecture Audit
Audit semantics that static identifier checks cannot prove. Report only evidence-backed findings with an exact code reference or a reproducible command.
Workflow
- Read
AGENTS.mdanddocs/docx-layout-engine-redesign.mdcompletely. - Inspect the complete change against
main; do not limit review to the latest commit. Read the owning modules and focused tests, not only the diff. - Consult the relevant local
spec/material before judging OOXML behavior. Prefer ECMA-376 / ISO/IEC 29500, then the applicable Microsoft implementation note. Do not disclose private sample contents or paths. Run the deterministic gates:
mise exec -- node scripts/check-docx-layout-boundaries.mjs --final mise exec -- pnpm test:docx-boundaries mise exec -- pnpm test:docx-compatibility mise exec -- pnpm test:docx-public-api mise exec -- pnpm test:docx-package-build mise exec -- pnpm typecheck git diff --checkAudit the final dependency direction and runtime behavior:
- one production layout algorithm exists for each supported feature class;
- parser facts flow into immutable point-space layout and then measurement-free paint;
- paint performs no measurement, shaping, style resolution, pagination, or parser-model access, including through transitive imports;
- parser objects and retained layouts are not mutated or runtime-stamped;
- no migration flag, silent legacy fallback, dry-render geometry collection, or transitional allowance remains;
- body, stories, tables, text boxes, and supported floating content participate
in
DocumentLayoutand preserve page/layer ownership; - main and worker use the same contracts and stable layout fingerprints;
- compatibility decisions are isolated with exact evidence, while normative rules and unsupported diagnostics are not mislabeled as observations;
renderer.tsremains a thin adapter with no hidden layout or paint algorithm;- public declarations remain compatible;
- shared OOXML primitives live in
coreorooxml-commononly when the abstraction is genuinely cross-format.
- Run focused behavior tests for every suspicious path. Run the full repository test suite and browser conformance checks when declaring the architecture complete or when the touched surface crosses package/runtime boundaries.
- Classify findings by severity. For each finding, state the violated invariant, exact evidence, affected behavior, and smallest coherent fix. Distinguish a proven defect from a question or missing evidence.
- End with an explicit
APPROVEonly when no unresolved finding remains and every required command passes. Otherwise useREQUEST_CHANGESand list the blockers. Never approve based only on green tests.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

