agentleFS
yukiyokotaniyukiyokotani/office-open-xml-viewer/.agents/skills/docx-architecture-audit/SKILL.md

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
  1. Very specific:

    Read AGENTS.md and docs/docx-layout-engine-redesign.md completely.

    line 13
  2. Distinctive:

    Prefer ECMA-376 / ISO/IEC 29500, then the applicable Microsoft implementation note.

    line 17
  3. Distinctive:

    Run the deterministic gates:

    line 19
  4. Distinctive:

    no migration flag, silent legacy fallback, dry-render geometry collection, or transitional allowance remains.

    line 39
  5. Distinctive:

    Run focused behavior tests for every suspicious path.

    line 51

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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

  1. Read AGENTS.md and docs/docx-layout-engine-redesign.md completely.
  2. 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.
  3. 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.
  4. 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 --check
  5. Audit 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 DocumentLayout and 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.ts remains a thin adapter with no hidden layout or paint algorithm;
    • public declarations remain compatible;
    • shared OOXML primitives live in core or ooxml-common only when the abstraction is genuinely cross-format.
  6. 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.
  7. 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.
  8. End with an explicit APPROVE only when no unresolved finding remains and every required command passes. Otherwise use REQUEST_CHANGES and list the blockers. Never approve based only on green tests.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.