Skip to content

v0.20.0

Choose a tag to compare

@github-actions github-actions released this 04 Jul 16:16
v0.20.0
45b5a7f

[0.20.0] — 2026-07-04

Highlights

Zenzic v0.20.0 "The Extensibility Update" opens the engine's core to the community. With the introduction of the Custom Rules API v2, engineering teams can now write bespoke Python plugins to enforce corporate-specific documentation governance, operating directly on Zenzic's lossless Abstract Syntax Tree.

Core Features

  • Custom Rules API (AST Walker): Developers can now create custom rules by subclassing BaseASTRule. The API provides direct access to traverse and inspect Markdown nodes (Headings, Paragraphs, Links) and HTML tags extracted by the Polyglot engine, with zero configuration required (auto-discovery from .zenzic/rules/*.py).
  • Deterministic Sandbox (Z901 & Z902): To protect the $O(N)$ performance invariant and the "Zero Crash" policy, custom rules are executed within a strict deterministic sandbox.
    • Unhandled Python exceptions emit a Z901 (RULE_ENGINE_ERROR), allowing the main scan to continue uninterrupted.
    • Rules are subject to a Visitation Budget (max_visits = 10000). If a custom rule inspects too many nodes (indicating an infinite loop or inefficient logic), the engine terminates the rule and emits a Z902 (RULE_TIMEOUT) warning.
  • Auto-Fix Expansion: The zenzic fix command has been expanded. Code definitions in the registry now support a fixable boolean flag, surfaced via zenzic explain.
    • Z121 (Missing href): Automatically injects href="#", safely converting a structural error into a trackable hygiene warning (Z122).
    • Z603 (Dead Suppression): Automatically removes obsolete <!-- zenzic:ignore --> comments and data-zenzic-ignore attributes from the source.

Fixed & Improved

  • Polyglot Leak Resolved: Fixed an architectural blind spot where data-zenzic-ignore attributes failed to suppress Z104 errors generated by the Uniform Resolver Pipeline (URP).
  • Documentation Overhaul: Added comprehensive guides for writing AST rules (write-ast-rule.md).

Technical Details

  • DQS Invariant: Repository Documentation Quality Score verified at 99/100 (1 pt calculated debt for build-time artifact suppression).
  • Exit Code Contract: 0 (Pass), 1 (Quality), 2 (Security), 3 (Traversal).

Full Changelog: v0.19.6...v0.20.0