← KaTeX Error FixerCONTENT HISTORY

Update to KaTeX Error Fixer

Snapshot Sep 30, 2026 · 23:17 UTC · version 0.1.1

Collection source: not recorded for this historical snapshot.

WHAT CHANGED · RULE-BASED ANALYSIS

First saved snapshot

No earlier snapshot is available to establish a change.

Compare saved observations

Download comparison JSON
Full technical diff · 0 changed fields
Full snapshot data
{
  "description": "Find and fix KaTeX and LaTeX rendering errors in math content. Distinguish currency such as $5 from math such as $x+2$, repair broken delimiters and malformed formulas, and verify source data, builds, and learner pages so the error does not return after deployment. Use when math renders incorrectly or raw TeX appears.",
  "included_files": [
    {
      "relative_path": "agents/openai.yaml",
      "size_in_bytes": 266
    },
    {
      "relative_path": "references/math-content-contract.md",
      "size_in_bytes": 3601
    },
    {
      "relative_path": "references/migration-architecture.md",
      "size_in_bytes": 3557
    },
    {
      "relative_path": "references/source-authority.md",
      "size_in_bytes": 2731
    },
    {
      "relative_path": "references/verification-procedure.md",
      "size_in_bytes": 3720
    },
    {
      "relative_path": "scripts/math-contract-fixtures.json",
      "size_in_bytes": 9643
    },
    {
      "relative_path": "scripts/validate_fixture_schema.py",
      "size_in_bytes": 9089
    }
  ],
  "name": "math-content-integrity",
  "skill_md_contents": "---\nname: math-content-integrity\ndescription: Find and fix KaTeX and LaTeX rendering errors in math content. Distinguish currency such as $5 from math such as $x+2$, repair broken delimiters and malformed formulas, and verify source data, builds, and learner pages so the error does not return after deployment. Use when math renders incorrectly or raw TeX appears.\n---\n\n# KaTeX Error Fixer\n\nUse this skill when KaTeX or LaTeX renders incorrectly in math content. Give it the approved source plus the data, build, or learner page that shows the problem. It finds raw TeX, broken delimiters, malformed formulas, missing math, and dollar signs misread as math; fixes the owning layer; and verifies that rebuilding or deploying does not bring the error back.\n\nProtect the complete path from an approved source to the learner screen. The recurring risk is not the math renderer alone: it is untyped notation in flat prose being reinterpreted by ingestion, generation, build, or browser stages. Treat visible agreement with the approved source as the outcome. A successful build or syntactically valid data file is supporting evidence only.\n\n## Route the task\n\nRespect the requested scope.\n\n- For an audit, inspect and report without editing. Preserve unrelated worktree changes and use temporary or isolated outputs for safe reproduction.\n- For an authorized correction, edit the owning source, parser, generator, renderer, or packaging layer; regenerate owned outputs; and verify the affected surfaces.\n- For release verification, use the repository's real build and release gates and verify the deployed authenticated route when access is available.\n- A skill run does not itself authorize deployment, dependency installation, destructive cleanup, or external publication.\n\nChoose the smallest intervention that closes the demonstrated risk:\n\n- Correct a confirmed learner-visible defect at the layer that owns it.\n- When current content passes and the request is recurrence prevention, preserve it and strengthen regression, artifact, and browser gates.\n- When a structured-data migration is in scope, preserve the approved source unchanged and generate a reproducible typed projection. Do not rewrite canonical strings merely to remove ambiguity from derived data.\n\nRead [source-authority.md](references/source-authority.md) when identifying the original, comparing a PDF, or changing generated content. Read [math-content-contract.md](references/math-content-contract.md) for ingestion, delimiter, typed-block, or renderer work. Read [migration-architecture.md](references/migration-architecture.md) for a durable structured-ingestion design. Read [verification-procedure.md](references/verification-procedure.md) before declaring a correction, build, or release verified.\n\n## Required workflow\n\n1. Enumerate the program, level, route, item IDs, fields, canonical sources, generators, generated artifacts, renderers, build target, and learner surfaces in scope. Mark an inapplicable field `N/A` with a reason.\n2. Establish source authority. Record the approved source path and, when practical, its page, item ID, version, and hash. Do not silently promote generated data or the current screen to the original.\n3. Capture the current state before editing. Separate confirmed defects, candidates, false positives, and unverified surfaces.\n4. At ingestion, retain the canonical source value and create a separate typed projection for prose, currency, inline math, display math, and structured visual blocks. Use source context and metadata; never decide whether `$` means currency or math from regex shape alone. Emit `unresolved` when evidence is insufficient.\n5. Correct the owning layer and regenerate outputs through their declared owner. If an artifact has no reproducible owner, report that pipeline defect before treating an output edit as durable.\n6. Render only typed math segments with the shared renderer. Keep currency and prose as text. Preserve structured-block content, order, count, display mode, association, and placement.\n7. Validate canonical source, typed projection, generated data, production artifact, browser output, and deployed authenticated learner screen as separate layers. Make the relevant gate fail on malformed math, missing blocks, raw delimiters or TeX, generated drift, and packaging drift.\n8. Report what changed, what passed, what failed, what was not run, and whether the verified path still depends on legacy classification. Never turn partial, historical, local, or unauthenticated evidence into current production proof.\n\n## Invariants\n\n- The latest approved PDF or explicitly designated authored source outranks derived files.\n- Preserve canonical source bytes and provenance. Structured data is a reproducible projection, not replacement authority.\n- Change generated files through their generator and check reproducibility.\n- Balanced `$...$` is not proof of mathematical intent. Currency remains literal learner text and is never rescanned as math.\n- Migrated screens use one typed contract and shared renderer; page-specific dollar heuristics are prohibited.\n- Structured blocks preserve semantic content, order, count, display mode, association, and placement unless the approved source changes them.\n- Validation uses throwing math parsing or an equivalent hard failure. Learner-facing error containment is not proof of valid math.\n- Expected math-expression counts match rendered math-root counts on representative and defect fixtures.\n- Renderer trust is disabled by default. Any exception uses a command and protocol allowlist shared by validation and learner rendering.\n- Confirmed defects and false positives become regression fixtures with source references.\n- Production packaging proves that math-bearing data and renderers were not omitted, replaced, or unexpectedly transformed.\n- Build success, static preview, and an unauthenticated route do not prove the authenticated learner experience.\n\n## Stop and report\n\nDo not guess when the approved source is missing, versions conflict, notation is semantically ambiguous, a generator would overwrite the proposed change, or the authenticated surface cannot be reached. Preserve evidence, label the exact gap, and complete only the independent checks that remain valid.\n"
}

SHA-256 of public snapshot: 24134fe8aa1b7a23aeb57821c82e435b08b7416d44a2082f59c17f724b0a0cd7