Skip to content
CAI
Software that uses CAICheck a score

lsegal/yard

53.6

Adequate · 19 September 2026

28.5k

lines of production code

Ruby

primary language

1

measurement over time

CAI band scale
CAI lens gauges

What this system is

YARD is a Ruby documentation generation tool that parses source code from Ruby, C, and RBS files to produce structured documentation. It supports multiple output formats, including HTML, text, and Graphviz DOT graphs, and provides a built-in web server for browsing the generated content. The system features a modular architecture with extensible parsers, handlers, and templates, alongside capabilities for internationalization, configuration management, and integration with RubyGems and Rake.

How it got here

2007–2008 — Architecture refactoring and extensibility

28 changes.

This period focused on a comprehensive internal restructuring of YARD, replacing legacy parsing and handler systems with a modular, extensible architecture that supports multiple languages. The work involved migrating to RSpec, formalizing gem packaging with Bundler, and introducing new features like C and RBS parsing alongside a flexible CLI and serialization framework.

2009 — Ripper parser migration and template overhaul

36 changes.

The project replaced the legacy Ruby parser with a new Ripper-based implementation to support modern syntax and improve accuracy, while simultaneously refactoring the template engine into a modular, cache-enabled architecture. This period also saw a comprehensive redesign of the HTML documentation output, featuring a mobile-responsive layout, vanilla JavaScript, and enhanced visualizations for classes, modules, and graphs.

2010–2012 — Server modernization and C parser support

30 changes.

This period focused on modernizing the YARD documentation server by replacing jQuery with native JavaScript, adopting HTML5 layouts, and implementing a modular Command pattern architecture. It also introduced significant new capabilities, including a C/C++ parser for documenting Ruby extensions, a comprehensive i18n infrastructure for translations, and a new HTML guide template.

2013–2026 — RBS support and workflow automation

8 changes.

This period focused on extending YARD's parsing capabilities to support Ruby Signature Files (.rbs) and introducing a single-file HTML guide template. It also significantly improved development workflows by adding Rake tasks for release automation, linting, and error map maintenance, while vendoring the IRB lexer to remove external dependencies.

Features

Add DOT graph layout templates for YARD documentation

New ERB and Ruby template files have been added to the default layout to support generating DOT graph visualizations. The header template defines the Graphviz digraph structure, while the setup script initializes the content sections and handles object type detection (distinguishing between RootObjects and other types) to properly render the graph output.

templates/default/layout/dot · high confidence

Add DOT graph templates for module structure visualization

New ERB templates and a setup script have been added to the default module DOT template to generate Graphviz diagrams of module hierarchies. The templates render module children as subgraphs, display class and method signatures (including attribute read/write indicators and return types), and optionally draw dotted dependency arrows for instance mixins when the dependencies option is enabled.

templates/default/module/dot · high confidence

Add HTML layout template for the guide

Introduces a new HTML layout template for the guide, including a setup script that configures navigation links (previous, next, index) and manages the Table of Contents visibility based on the presence of topics.

templates/guide/layout · high confidence

Add HTML template for rendering module documentation

New ERB templates and a Ruby setup script have been added to the \templates/guide/module/html\ directory to define how module documentation is rendered. The \header.erb\ template displays the module's type, namespace, and name, along with any 'since' tags, while \method\_list.erb\ iterates through methods to render their details. The \setup.rb\ script configures the section order (header, docstring, method list) and implements logic to filter, sort, and prioritize methods, excluding special methods like writers with readers, 'new', 'method\_missing', and constructors from the main listing.

templates/guide/method, templates/guide/module · high confidence

Add HTML5-based processing page for library generation

A new HTML5 template and setup script are introduced for the documentation server's processing state. This page displays a status message while the library is being parsed, using vanilla JavaScript (replacing previous jQuery dependencies) to poll the server via XHR with a \?process=true\ query parameter. The implementation includes conservative caching for timestamped assets and ensures the page is only triggered on-demand to avoid accidental bot parsing.

_lib/yard/server/templates/doc\server/processing · high confidence

Add YARD graph and HTML output templates for the root module

New templates have been added to generate Graphviz DOT files and HTML documentation specifically for the root module. The DOT template (\dot/child.erb\) renders the root node with its inner content, supported by a setup script (\dot/setup.rb\) that includes the standard module DOT logic and defines a placeholder path formatter. Similarly, an HTML output path is now supported via a new setup script (\html/setup.rb\) that includes the standard module HTML logic. These changes enable the generation of visual graphs and HTML documentation for the root level of the project structure.

templates/default/root · high confidence

Add frameset and full-list HTML templates for YARD documentation

The default HTML template now includes new files to support a frames-based documentation view and searchable full lists. The \frames.erb\ template provides a JavaScript-driven frameset entry point that handles URL hash navigation and displays a fallback message for users with JavaScript disabled. Additionally, \full\_list.erb\ and its sub-templates (\full\_list\_class.erb\, \full\_list\_method.erb\, \full\_list\_file.erb\) generate searchable, paginated lists of classes, methods, and files, enhancing navigation within the generated documentation.

templates/default/fulldoc/html · high confidence

Add one-file HTML guide template support

The guide template system now supports serializing guides into a single HTML file. This change introduces new template files (setup.rb, toc.erb, files.erb) that define the layout, table of contents, and file inclusion logic for this specific output format, enabling users to generate self-contained HTML documentation.

templates/guide/onefile · high confidence

Add search functionality to the documentation server

The documentation server now includes a search feature, allowing users to query and view results for documentation content. This change introduces new template files (search.erb and setup.rb) that render a search results page, displaying matching items with their names, paths, and namespaces, and highlighting the search query within the results.

_lib/yard/server/templates/doc\server/search · high confidence

Add text template for constant objects

A new text-based template has been added for documenting constant objects, enabling a specific output format for these items. The template includes a header with the object title and value, handles long values by inserting line breaks, and utilizes a setup script that enables Ruby 2.3+ frozen string literals for the template logic.

templates/default/constant · high confidence

Add text-format docstring templates for specific tags

New ERB templates have been added to the text output format to render specific documentation tags. Users will now see formatted sections for abstract, deprecated, note, private API warnings, TODOs, and void return values in text-based documentation. The main text template also ensures proper wrapping and indentation of the docstring content.

templates/default/docstring/text · high confidence

Add text-format documentation templates for modules

New ERB templates and a setup script have been added to the text output format, enabling the generation of plain-text documentation for modules. This includes sections for the module header, defined namespaces (children), included modules, class mixins (labeled 'Extended by'), and lists of both class and instance methods. The setup.rb file configures the rendering order and provides helper methods to filter methods by scope, ensuring that text-based documentation output is now available for module-level details.

templates/default/module/text · high confidence

Add text-format templates for documentation tags

New ERB templates have been added to the text output format for rendering specific documentation tags, including @example, @option, @overload, @see, and generic @tag entries. This allows users generating plain-text documentation to see structured sections for code examples, method options with defaults, method overloads, and cross-references, rather than having these details omitted or formatted incorrectly.

templates/default/class/text, templates/default/tags/text · high confidence

A new 'gh-fix' skill has been added to the .claude/skills directory. It is implemented as a symbolic link pointing to ../../.agents/skills/gh-fix, enabling the system to access the GitHub fix functionality through the standard skills path.

.claude · high confidence

Added Japanese translation file

Users can now view the YARD documentation in Japanese. A new translation file (ja.po) has been added to the project, providing Japanese translations for the README and core documentation strings.

po · high confidence

Added benchmark suite for YARD performance analysis

A new set of benchmark scripts has been added to the \benchmarks/\ directory to measure and compare the performance of various YARD operations. These include comparisons between built-in exception checks and eval, string concatenation methods, ERB versus Erubis template engines, argument formatting strategies, registry lookup speeds with different storage types, and parsing performance using Ripper versus legacy parsers. Additional benchmarks evaluate the speed of YARD documentation generation against RDoc, the efficiency of marshaling versus DBM for registry storage, and the caching benefits of the \yri\ command-line tool.

benchmarks · high confidence

Added text format method header template

A new ERB template for the text output format has been added at templates/default/method/text/header.erb. This template serves as the header component for method documentation in the text format, currently yielding all content to allow for flexible header structures.

templates/default/method/text · high confidence

Class documentation now displays subclasses and constructor details

The class documentation templates have been updated to explicitly render a list of subclasses for each class (excluding the root Object class) and to include detailed information about constructors. This change introduces a new setup template that configures the section order to place subclasses before children and constructor details before method-missing sections, ensuring these elements are consistently visible in the generated documentation.

templates/default/class · high confidence

Initial styling for the RDoc guide template

Adds a new CSS stylesheet (style.css) that defines the visual appearance for the generated HTML documentation guide. This includes typography settings (Georgia serif for body, monospace for code), layout rules for the sidebar and page container, and specific styles for documentation elements such as method headers, parameter tags, tables, and RDoc definition lists.

templates/guide/fulldoc/html/css · high confidence

Introduce YARD::Verifier for tag validation and add RBS parser support

Users can now validate documentation tags using the new YARD::Verifier class, which allows running Ruby expressions against code objects to check for missing or incorrect tags (e.g., ensuring no objects are missing @private tags). Additionally, YARD now supports parsing Ruby Signature Files (.rbs) via the new RBS parser, enabling the inclusion of type signatures from .rbs files in generated documentation. The release also includes a new YARD::OpenStruct for performance benchmarking against standard Ruby OpenStruct.

yard · high confidence

Introduce extensible SourceParser architecture with custom parser registration

YARD now uses a new \SourceParser\ class that replaces the previous monolithic parsing logic, allowing users and plugin developers to register custom parsers for specific file extensions via \SourceParser.register\_parser\type\. This change introduces a \Parser::Base\ abstract class that defines the interface for custom parsers, enabling support for non-Ruby languages (such as C/C++ or Java) and improving extensibility. The default parsing behavior remains focused on Ruby files (\lib/\\/\.{rb,rbs}\, \app/\\/\*.{rb,rbs}\) and C source files in \ext/\, but the underlying mechanism is now modular, supporting callbacks for pre/post-parse hooks and global parser type configuration.

lib/yard/parser · high confidence

Introduction of new code object types and namespace mapping infrastructure

YARD now includes dedicated code objects for class variables (ClassVariableObject), extra documentation files (ExtraFileObject), and macros (MacroObject), alongside a new ExtendedMethodObject to handle methods mixed into class scopes. The library introduces a NamespaceMapper module to manage separator registration and type lookups, and adds a CodeObjectList class to replace previous array-based object lists, ensuring unique entries and preventing Proxy objects from being added directly.

_lib/yard/code\objects · high confidence

New C extension documentation handlers

Added a suite of new handlers in lib/yard/handlers/c/ to parse and document Ruby C extensions. This includes handlers for classes, modules, methods, attributes, constants, aliases, and mixins, along with a base handler and shared methods to support them. These changes enable YARD to generate documentation for C extension code by recognizing standard Ruby C API calls like rb\_define\_class, rb\_define\_method, and rb\_define\_const.

lib/yard/handlers/c · high confidence

New C/C++ parser implementation for YARD

YARD now includes a new C parser (\lib/yard/parser/c\) that enables documentation generation for C and C++ source files. This parser supports parsing C++ namespaces, handling \call-seq\ blocks with type mapping (including \ary\/\new\_ary\), and recognizing \Document-attr\ overrides in comments. It also introduces \ToplevelStatement\ and \BodyStatement\ classes to represent parsed code structures and deprecates the \group\ attribute on statements in favor of directive-based grouping.

lib/yard/parser/c · high confidence

New HTML guide template with one-file serialization and README handling

A new HTML guide template has been added that supports serializing the entire documentation into a single file via the --one-file option, consolidating CSS and JavaScript into the output. It also improves link resolution by mapping README files to index.html and ensuring all generated file links are downcased for consistency.

templates/guide/fulldoc/html · high confidence

New YardocTask Rake task with configurable hooks and stats

Users can now use the new YARD::Rake::YardocTask to generate documentation via a Rake task. This task allows configuration of the task name, source files, and options passed to the YARD CLI. It introduces support for before and after hooks (procs) to run custom logic around the documentation generation. Additionally, it supports separate options for the YARD stats utility, enabling documentation statistics generation alongside the main task. The task name defaults to :yard, and it respects environment variables OPTS and FILES for command-line-like configuration.

lib/yard/rake · high confidence

New core extension methods for Array, File, Hash, String, and Module

This change introduces several new methods to Ruby's core classes within the YARD library to improve usability and compatibility. Array gains a \place\ method that returns an Insertion object, allowing users to easily insert values before or after existing items in a list. File receives \relative\_path\ for calculating relative paths between files, \cleanpath\ for sanitizing path strings by removing redundant separators and dot segments, \open!\ to automatically create parent directories before opening a file, and \read\_binary\ for reading files with binary encoding. Hash gets a \create\ class method that backports Ruby 1.8.7+ behavior to earlier versions, allowing construction from an array of key-value pairs. String adds \shell\_split\ to tokenize text respecting shell-like quoting rules, and \class\_name\ on Module extracts the final part of a namespace path. SymbolHash is also introduced as a Hash subclass that automatically symbolizes keys and optionally values.

_lib/yard/core\ext · high confidence

New filesystem-based serialization format with case-insensitive path handling

YARD now supports a new \FileSystemSerializer\ that writes documentation objects to individual files on disk (defaulting to the \doc/\ directory with \.html\ extension) instead of a single binary database. This serializer handles case-insensitive filesystems by mapping object names to unique filenames, removes special characters from paths, and supports configurable base paths and file extensions. Additionally, new \StdoutSerializer\ and \ProcessSerializer\ allow outputting documentation to standard output or piping to external commands, while the existing \YardocSerializer\ continues to support the legacy \.yardoc\ binary format with transactional locking.

lib/yard/serializers · high confidence

New internal i18n infrastructure for extracting and applying translations

YARD introduces a new internal internationalization (i18n) subsystem to support translating documentation. This change adds several new classes under the YARD::I18n namespace: Locale for managing translation sets and loading .po files, Text for parsing and translating docstring content, PotGenerator for extracting translatable strings from code objects into .pot template files, and POParser to abstract gettext library differences. These components work together to enable the extraction of msgids from documentation and their subsequent translation into different locales, laying the groundwork for multi-language support in YARD output.

lib/yard/i18n · high confidence

New release, linting, and error-map maintenance tasks

The project introduces three new Rake tasks to streamline development and release workflows. The \release:tag\ task automates the release process by updating the version file, rotating the changelog entries under '\# main' into a versioned section, committing the changes, and creating a git tag when invoked with \VERSION=X.Y.Z\. A new \lint\ namespace provides commands to run RuboCop for Ruby code and Biome for JavaScript formatting and linting. Additionally, an \update\_error\_map\ task downloads Ruby's source error definitions and automatically patches the C handler's error class name lookup table in \lib/yard/handlers/c/base.rb\ to keep it synchronized with upstream Ruby.

tasks · high confidence

Project initialization and configuration scaffolding

The repository has been initialized with essential configuration files to standardize development and build workflows. A \.rubocop.yml\ file enforces code style rules, while \.yardopts\ and \.yardopts\_guide\ define default options for documentation generation. Build and test automation is configured via a \Rakefile\ and \.rspec\, and static analysis for JavaScript is set up with \biome.json\. Repository hygiene is improved with \.gitignore\ and \.gitattributes\, and the project now includes standard documentation files such as \README.md\, \CHANGELOG.md\, \LICENSE\, \SECURITY.md\, and \CODE\_OF\_CONDUCT.md\.

(repo-wide) · high confidence

Support for Ruby Signature Files (.rbs)

YARD now parses .rbs type signature files to automatically populate documentation. The new RBS handler suite extracts type information for classes, modules, methods, attributes, constants, and mixins, converting RBS types into YARD @param, @return, @yield, and @overload tags. This allows users to generate documentation that includes type signatures defined in separate .rbs files without needing to duplicate them in Ruby comments.

lib/yard/handlers/rbs · high confidence

YARD server now supports Rack-based hosting alongside WEBrick

The documentation server now includes a new \RackAdapter\ and \RackMiddleware\, allowing YARD docs to be served within any Rack-compatible application (e.g., Rails, Sinatra) or via the \rackup\ command, in addition to the existing WEBrick server. This change introduces a modular \Adapter\ architecture that decouples the routing logic (now in a dedicated \Router\ class) from the underlying HTTP server implementation. Users can now mount the YARD server as middleware, pass custom library versions via \LibraryVersion\, and benefit from improved URL handling, static caching, and support for modern Rack versions.

lib/yard/server · high confidence

YARD v0.9.46 introduces new CLI commands, C parser support, and i18n capabilities

This release adds several new command-line tools including \yard display\, \yard diff\, \yard gems\, \yard list\, \yard markups\, and \yard stats\ for enhanced library inspection and comparison. It introduces a new C parser implementation (\Parser::C\) and corresponding handlers for documenting C extensions, alongside support for Ruby Signature Files (.rbs). Internationalization is expanded with new \YARD::I18n\ modules and a \yard i18n\ command to generate .pot files. The configuration system is refactored into a \YARD::Config\ class, allowing users to manage plugin loading, ignored plugins, and safe mode via \\~/.yard/config\. Additionally, the \P()\ global method is added for convenient object resolution, and the \Registry\ is converted from a Singleton class to a module with singleton methods.

lib/yard · high confidence

Removals

Removal of Ruby parser handlers

The library has removed the entire set of Ruby code parsing handlers located in lib/handlers. This includes the base CodeObjectHandler and specific handlers for processing classes, modules, methods, attributes, constants, class variables, visibility modifiers, exceptions, and yield statements. As a result, the tool will no longer be able to parse or document these specific Ruby language constructs.

lib/handlers · high confidence

Architecture

Introduces a new modular CLI command architecture

YARD now uses a structured command-line interface where each subcommand (such as \doc\, \server\, \stats\, \diff\, \gems\, \config\, \graph\, \help\, \i18n\, \list\, \markups\, and \display\) is implemented as a distinct class inheriting from a new \CLI::Command\ base. This refactoring centralizes common option parsing, logging, and error handling in the base class and the \CLI::CommandParser\, which routes user input to the appropriate command handler. This change improves maintainability and allows for easier addition of new subcommands.

lib/yard/cli · high confidence

Behavioural changes

Backport Gem::SourceIndex for older RubyGems versions

The library now includes a backport of the Gem::SourceIndex class and a compatible Gem.source\_index method within the lib/yard/rubygems/backports directory. This ensures that YARD continues to function correctly on older RubyGems installations (such as 1.8.x) that lack these APIs, while also supporting Ruby 2.3+ frozen string literals and cleaning up deprecation warnings.

lib/yard/rubygems/backports · high confidence

Binaries now delegate to the CLI module

The \yard\, \yardoc\, and \yri\ executables have been rewritten to require the \yard\ library and immediately delegate to their respective classes in the \YARD::CLI\ namespace (\YARD::CLI::CommandParser\, \YARD::CLI::Yardoc\, and \YARD::CLI::YRI\). This change centralizes command-line argument parsing and execution logic within the library's CLI module, moving the operational logic out of the binary scripts themselves.

bin · high confidence

Default HTML documentation template rewritten in vanilla JavaScript

The default HTML documentation template has been refactored to remove its dependency on jQuery. The previous jQuery-based scripts have been replaced with new, standalone JavaScript files (app.js, full\_list.js) that implement the same navigation, search, and UI interaction features using modern vanilla DOM APIs. This change reduces the template's bundle size and eliminates the need to load the jQuery library for generating documentation.

templates/default/fulldoc/html/js · high confidence

Enhanced docstring generation with new tags and return-text fallback

The default docstring template now supports additional tags including @abstract, @todo, and @note, and displays a specific notification for @api private usage. It also improves summary generation by using the text from a single @return tag as the docstring when no explicit docstring is present, prefixing it with 'Returns' and ensuring proper punctuation. Additionally, void methods now display a note instead of a @return tag, and the template handles overloaded signatures more accurately.

templates/default/docstring · high confidence

Enhanced module documentation with inherited members and grouping

The default module template now provides a more comprehensive view of module structure by explicitly documenting inherited attributes, constants, and methods in dedicated sections. It also supports grouping inherited methods by their assigned groups and displays which classes or modules include or extend the current module. Additionally, the template now embeds mixin methods into the current namespace's method list when configured, and uses return tags as summaries when docstrings are missing.

templates/default/module · high confidence

Exclude BasicObject from class dependency diagrams

The class diagram template now explicitly ignores BasicObject as a superclass. When generating dependency graphs, classes inheriting from BasicObject are no longer linked to it, preventing clutter in the output. This change is implemented in the new setup.rb and superklass.erb files within the templates/default/class/dot directory.

templates/default/class/dot · high confidence

Fix source display for overloaded methods

The method details view now correctly handles source code display for overloaded methods. Previously, source might have been shown incorrectly or caused issues; the new logic explicitly skips rendering the source section if the method is an overload tag, ensuring that only the primary method's source is displayed while avoiding confusion with overloaded variants.

_templates/default/method\details · high confidence

HTML documentation templates for abstract, deprecated, private, and note tags

The HTML documentation generator now includes specific templates to render abstract, deprecated, private, and note (including TODO) tags with distinct visual styling. Users will see highlighted notices for abstract types, deprecation warnings, private API usage alerts, and inline notes or TODOs within the generated HTML output.

templates/default/docstring/html · high confidence

The YARD server documentation now uses a modern, frameless HTML5 layout. This update replaces the previous frames-based design with a single-page interface that includes a breadcrumb navigation bar, a search input field, and a library selector. The layout integrates new JavaScript assets for autocomplete functionality and custom styling, while removing dependencies on jQuery to improve performance and compatibility with modern browsers.

lib/yard/server/templates/default/layout · high confidence

Improved class documentation with constructor and subclass details

The HTML documentation templates for classes have been restructured to provide more granular and accurate information. A new dedicated section now displays constructor details, including a notice if the constructor is inherited from a parent class. Additionally, a new section lists direct known subclasses for each class. These changes are supported by a new setup file that includes module templates and enables frozen string literals for Ruby 2.3+ compatibility.

templates/default/class/html · high confidence

Initial guide templates with Ruby 2.3+ compatibility and tag filtering

Added new setup files for the guide module's class, docstring, and tags HTML templates. These files enable Ruby 2.3+ frozen string literals for performance and safety. Specifically, the tags template initializes by inheriting from the default tags HTML template but removes the 'since', 'see', and 'return' sections from the index, altering how these specific metadata tags are displayed in the generated guide.

templates/guide/class, templates/guide/docstring, templates/guide/tags · high confidence

Introduce method setup template with frozen string literal

A new setup template for methods has been added to the default template set. This file initializes the method's header section and includes the standard Ruby frozen string literal directive to ensure consistent string handling behavior.

templates/default/method · high confidence

Introduces a new tag parsing factory and directive system

The tag parsing logic in lib/yard/tags has been refactored to use a new DefaultFactory class, which centralizes the parsing of tag text into structured Tag objects (including support for types, names, titles, and defaults). This change introduces new tag classes such as DefaultTag, OptionTag, OverloadTag, and RefTag to handle specific metadata structures. Additionally, a new Directive system is added, allowing for custom directives like @!group, @!endgroup, and macro expansion to modify code objects during parsing. The Library class now manages these tags and directives via a factory method system, enabling more flexible and extensible tag definitions.

lib/yard/tags · high confidence

Legacy Ruby parser moved to dedicated namespace with improved comment and block handling

The legacy Ruby parser and its supporting lexer/tokenizer classes have been relocated from the root \lib/\ directory into the \YARD::Parser::Ruby::Legacy\ namespace. This move consolidates the legacy parsing logic, which now explicitly handles \=begin\/\=end\ comment blocks, prioritizes prepended comments over appended ones, and correctly associates comments with statements. The parser also improves block parsing for \do\/\end\ structures and fixes issues with multiline signatures and alias statements, ensuring that docstrings are accurately linked to the code objects they document.

lib/yard/parser/ruby/legacy · high confidence

Legacy parser handlers moved to dedicated namespace

The Ruby legacy parser handlers (such as AliasHandler, AttributeHandler, ClassHandler, and MethodHandler) have been moved into the YARD::Handlers::Ruby::Legacy namespace. This change isolates the legacy parsing logic from the primary Ripper-based handlers, ensuring that the legacy parser operates independently without interfering with the default parsing behavior.

lib/yard/handlers/ruby/legacy · high confidence

Library listing page refactored to HTML5 with version grouping

The library listing template has been rewritten to use HTML5 and split into modular ERB files (headers, layout, listing, title). The listing now groups and displays multiple versions of the same library, showing the primary version link alongside links to other available versions. The page also includes a proper meta charset tag and uses a helper for absolute URLs to ensure correct asset loading.

_lib/yard/server/templates/doc\_server/library\list · high confidence

Native JavaScript Table of Contents generation replaces jQuery

The guide documentation template now generates the table of contents using native browser APIs instead of jQuery. This change removes the external jQuery dependency for this feature, resulting in a lighter client-side footprint and faster load times for users viewing the full documentation.

templates/guide/fulldoc/html/js · high confidence

Native JavaScript search autocomplete replaces jQuery

The documentation server's search functionality now uses a native JavaScript implementation (autocomplete.js) instead of jQuery, removing the external library dependency. This change introduces a new, accessible autocomplete widget for the search input, featuring keyboard navigation (arrow keys, Enter, Escape), ARIA attributes for screen readers, and debounced fetch requests to the server, providing a smoother and more modern user experience without requiring jQuery.

lib/yard/server/templates/default/fulldoc/html/js · high confidence

New HTML templates for documentation tags

The default HTML documentation generator now includes dedicated templates for rendering specific YARD tags, improving the structure and readability of generated docs. Users will see examples displayed in syntax-highlighted code blocks with optional titles, method overloads listed clearly (with single overloads shown inline to avoid unnecessary headers), and option/hash parameters detailed with their types, defaults, and descriptions. Additionally, @see links are now rendered with optional descriptive text, and the general tag listing uses a consistent layout for names, types, and default values.

templates/default/tags/html · high confidence

New Ripper-based Ruby handlers replace legacy parser logic

YARD now uses a new set of handlers in lib/yard/handlers/ruby (e.g., AliasHandler, AttributeHandler, ClassHandler, MethodHandler, MixinHandler, VisibilityHandler) built on the Ripper AST parser. This changes how Ruby code is parsed and documented, adding support for modern Ruby features (keyword arguments, Data.define, endless methods, inline visibility) and fixing prior parsing issues (multiline signatures, alias/keyword conflicts, mixin ordering). Users may see updated documentation for aliases, attributes, class/module structures, method signatures, and visibility, with improved accuracy and coverage of newer Ruby syntax.

lib/yard/handlers/ruby · high confidence

New Ripper-based Ruby parser with improved AST node handling

The Ruby parser has been replaced with a new implementation based on Ruby's Ripper library, providing more accurate source ranges and better support for modern Ruby syntax (including percent arrays, keyword arguments, and endless method definitions). This change introduces a new \AstNode\ class hierarchy that maps Ripper events to specific node types (e.g., \MethodDefinitionNode\, \ConditionalNode\), improving the precision of documentation generation and auto-linking for constants and identifiers.

lib/yard/parser/ruby · high confidence

New hybrid Markdown and RDoc markup renderers

The markup helper now includes a new \HybridMarkdown\ class that implements a practical subset of GitHub-flavored Markdown alongside common RDoc markup forms, including support for RDoc-style headings, code blocks, and link syntax. It also introduces \RDocMarkdown\ and \RDocMarkup\ classes to provide compatibility with various RDoc versions (3.10 through 8+), handling initialization differences and ensuring correct rendering of typewriter text and dashes. Additionally, a comprehensive \HtmlEntities\ module has been added to support all valid HTML named character references from the WHATWG standard, improving the accuracy of entity conversion in generated documentation.

lib/yard/templates/helpers/markup · high confidence

The method details template now generates permalinks that correctly URL-encode the object's serialized path, ensuring valid links for identifiers with special characters. Additionally, the permalink is now explicitly inserted immediately after the method signature section rather than relying on previous placement logic, and the implementation uses vanilla JavaScript instead of jQuery to avoid parsing issues with invalid ID values.

_lib/yard/server/templates/default/method\details · high confidence

Redesign HTML documentation layout with mobile support and SVG icons

The default HTML documentation layout has been updated to use HTML5, improving mobile responsiveness through viewport meta tags and CSS adjustments. The navigation menu now uses an SVG icon for better cross-platform rendering, and the footer link to yardoc.org has been updated to use HTTPS with a target of \_parent. The layout structure has been refactored into modular template sections (breadcrumb, search, footer, etc.) to support cleaner separation of concerns and easier customization.

templates/default/layout/html · high confidence

Redesign of documentation layout and navigation styles

The default HTML documentation templates now use a modern, responsive layout powered by CSS Flexbox, replacing the previous fixed-width or frameset-based designs. This change introduces a resizable navigation sidebar that collapses into a mobile-friendly overlay on smaller screens, along with updated styling for search interfaces, class lists, and content headers to improve readability and accessibility across devices.

templates/default/fulldoc/html/css · high confidence

Redesigned search interface and mobile layout for documentation server

The YARD documentation server's default HTML template now features a completely new CSS stylesheet (custom.css) that replaces the previous styling. This update introduces a modernized search box with autocomplete support, improved visual hierarchy for search results, and a dedicated 'processing' state indicator. The layout is also responsive, with specific media queries ensuring the search bar and menu adapt correctly on smaller screens (phones and tablets), fixing previous issues where the search box added unwanted padding or scaled poorly on mobile devices.

lib/yard/server/templates/default/fulldoc/html/css · high confidence

Refactor onefile HTML template into modular components

The onefile HTML generation logic has been restructured to improve maintainability and fix initialization warnings. The previous monolithic layout has been split into distinct partials: \headers.erb\ now handles embedded CSS and JavaScript data, \files.erb\ iterates over documentation files, \readme.erb\ processes top-level comments, and \layout.erb\ serves as the main HTML5 shell. The \setup.rb\ script was updated to include these new partials, initialize instance variables like \@title\ and \@readme\ to prevent warnings, and enable frozen string literals for Ruby 2.3+ compatibility.

templates/default/onefile · high confidence

Refactored handler architecture with new Base class and Processor state management

The handler processing system has been restructured to improve extensibility and state management. A new \Handlers::Base\ class introduces explicit \\#register\ methods for adding attributes and a \\#process\ directive for easier mixin-based extension, replacing previous implicit registration patterns. The \Handlers::Processor\ now manages global and file-specific state via \\#globals\ and \\#extra\_state\ attributes, allowing handlers to share data across the post-processing phase and within individual files. Additionally, the processor supports registering custom handler namespaces via \register\_handler\_namespace\, enabling better organization for different parser types (e.g., Ruby, C, RBS).

lib/yard/handlers · high confidence

Refactored tag rendering logic and visibility rules

The default tags template now uses a centralized library to determine which tags are visible, explicitly excluding abstract, deprecated, note, and todo tags from the main index. Rendering behavior has been refined: return tags are suppressed for constructors and void methods, parameter tags are only shown for method objects, and yield tags no longer display types or names. The template also dynamically generates helper methods for visible tags and configures whether to display types and names based on the tag's factory method classification.

templates/default/tags · high confidence

Refactored template engine with new options and caching architecture

The template rendering system has been restructured to improve performance and maintainability. A new \TemplateOptions\ class now centralizes configuration, introducing a \serialize\ option (defaulting to true) to control output serialization and an \embed\_mixins\ option to manage mixin embedding. Template rendering performance is improved by caching compiled ERB methods via the new \ErbCache\ module. Additionally, the \Section\ class has been refactored to support tree-like structures for subsections, and the \Engine\ now ensures the \object\ is never nil during generation by defaulting to \Registry.root\.

lib/yard/templates · high confidence

Refactored template helpers into a modular architecture

The template helper logic has been reorganized from a single monolithic module into distinct, specialized modules (BaseHelper, HtmlHelper, MarkupHelper, MethodHelper, ModuleHelper, TextHelper, UmlHelper, FilterHelper, and HtmlSyntaxHighlightHelper). This change introduces new templating syntaxes including \{include:ObjectName}\ for inlining docstrings, \{include:file:FILENAME}\ for including extra files, and \{render:Object}\ for formatting objects inline. It also adds support for additional markup providers such as Asciidoctor, CommonMarker, and org-ruby, and implements a caching mechanism for markup providers to improve performance and provide earlier error detection when gems are missing.

lib/yard/templates/helpers · high confidence

Restructure method details text templates

The text-based documentation templates for method details have been reorganized into a dedicated \method\_details/text\ directory. This change introduces new template files (\header.erb\, \method\_signature.erb\) and a setup script (\setup.rb\) to handle the rendering of method headers, signatures (including overloads), and object titles, replacing the previous flat structure.

_templates/default/method\details/text · high confidence

Restructured method detail page templates for better semantic HTML and source display

The default templates for method details have been reorganized into specific partials (header, method\_signature, source) to improve the structure of the generated documentation. The method signature now uses an h3 tag for better semantic hierarchy and explicitly lists aliases and the original definition location. The source code view has been updated to display line numbers alongside the syntax-highlighted code, with highlighting applied only to Ruby source files.

_templates/default/method\details/html · high confidence

Restructured method page layout with dedicated header template

The method page rendering has been refactored to use a new dedicated header template (header.erb) that explicitly structures the method title, definition location, and details list. This change moves the header content out of the main method template, allowing for more modular and overridable template structures while maintaining the same user-facing information display.

templates/default/method/html · medium confidence

Restructured module documentation with inherited members and status badges

The default HTML templates for modules have been significantly restructured to improve documentation clarity. Inherited methods, attributes, and constants are now explicitly listed in separate sections, distinguishing between class inheritance and module inclusion. The layout now separates method and attribute summaries into distinct class and instance sections, with collapsible lists for better navigation. Additionally, status badges for abstract, deprecated, and private items are now displayed in headers and summaries, and mixin relationships are clearly labeled as 'Extended by', 'Includes', and 'Included in'.

templates/default/module/html · high confidence

RubyGems plugin refactored into dedicated module with gem removal support

The RubyGems integration code has been reorganized into the new \lib/yard/rubygems\ directory, separating concerns into \hook.rb\ (installation/uninstallation hooks), \doc\_manager.rb\ (documentation generation), \specification.rb\ (specification extensions), and \backports.rb\ (compatibility for RubyGems 1.8.x). This change introduces a pre-uninstallation hook that automatically removes YARD and yri documentation data when a gem is uninstalled, and adds configuration switches (\--gem-install-yard\/\--gem-install-yri\) to control documentation generation during gem installation.

lib/yard/rubygems · high confidence

Vendor IRB lexer and handle missing dependencies

The IRB lexer (SLex) is now vendored directly within YARD, removing the external dependency on the \e2mmap\ library. To ensure compatibility with Ruby 2.7.0 and environments where the \irb/notifier\ module is unavailable, the code now gracefully defines stub implementations for the missing notifier components, preventing load errors during parsing.

lib/yard/parser/ruby/legacy/irb · high confidence

YARD library restructured with new entry points and legacy code removal

The library's entry point has been reorganized: \lib/yard.rb\ now serves as the main module, providing version-checking helpers (e.g., \ruby18?\, \ruby19?\, \ruby2?\, \ruby3?\, \ruby31?\), a \parse\ alias, and explicit loading of core extensions and configuration. A new \lib/rubygems\_plugin.rb\ handles RubyGems integration, conditionally loading either the new hook-based approach for RubyGems 2.0+ or the legacy specification/doc\_manager files for older versions. To support this cleaner structure, several legacy files (\lib/code\_object.rb\, \lib/hash\_struct.rb\, \lib/namespace.rb\, \lib/quick\_doc.rb\, \lib/source\_parser.rb\, \lib/tag\_library.rb\, \lib/tag\_type.rb\) have been removed, indicating a significant internal refactoring of how code objects, parsing, and tags are managed.

lib · high confidence

YARD server refactored into a Command pattern architecture

The YARD server's request handling has been restructured from a monolithic adapter into a modular Command pattern. New classes in lib/yard/server/commands now handle specific URL mappings: Base provides the core request lifecycle, LibraryCommand manages library-specific logic and optional forking, DisplayObjectCommand serves documentation objects, DisplayFileCommand handles READMEs and extra files, FramesCommand renders framed views, LibraryIndexCommand lists libraries, ListCommand generates object lists, RootRequestCommand handles the root path, SearchCommand performs object searches, and StaticFileCommand serves assets. This change improves routing clarity, allows easier customization of server behavior, and introduces features like on-demand processing via XHR requests and improved static file caching.

lib/yard/server/commands · high confidence

Fixes

Fix duplicate return tags for predicate methods

The method handler now prevents the generation of duplicate return tags when processing predicate methods. Previously, if a method already had an empty return tag, the handler would add another one, resulting in redundant documentation. The updated logic checks for existing empty return tags and updates them in place, or only adds a new Boolean return tag if no return tag exists at all, ensuring clean and accurate method documentation.

lib/yard/handlers/common · high confidence

Test coverage

Added comprehensive RSpec tests for YARD template rendering; Added comprehensive test coverage for Ruby source code handlers; Added comprehensive test suite for YARD CodeObjects; Added integration tests for markup processors; Added server test suite; Added specs for Ruby parser AST nodes, parsing logic, and token resolution; Added specs for YARD::Handlers::Ruby::Base handler matching logic; Added specs for legacy Ruby parser statement and token list handling; Added template example specs for classes, modules, methods, constants, and tags; Added test coverage for C extension handlers; Added test coverage for FileSystemSerializer and YardocSerializer; Added test coverage for HybridMarkdown and RDocMarkup helpers; Added test coverage for RBS handler implementations; Added test coverage for RubyGems documentation manager; Added test coverage for YARD CLI commands; Added test coverage for YARD configuration, docstring parsing, and registry operations; Added test coverage for YARD i18n components; Added test coverage for YARD server command classes; Added test coverage for YARD tag parsing and directive handling; Added test coverage for core extension methods; Added test coverage for parser base, C parser, source parser callbacks, and tag handling; Added test coverage for template helper methods; Added tests for Ruby legacy handler inheritance and block parsing; Added tests for YARD Rake task configuration and callbacks; Removal of legacy test suite and fixtures.

Dependencies

Introduce Bundler support and formalize gem packaging

Users can now manage development and optional dependencies using Bundler via a new Gemfile, which includes conditional requirements for RDoc, SimpleCov, Coveralls, and Rack based on the Ruby version. The project also introduces a formal gemspec (yard.gemspec) that defines the library's metadata, executable entries (yard, yardoc, yri), and file inclusions, enabling standard gem installation and packaging workflows.

(dependencies) · high confidence

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

Baseline

  • First survey — no prior run to compare against. CAI 54.

Lenses

  • Code Health 83
  • Architecture 99
  • Maturity 65
  • Readiness 77
  • Security 68
  • Accessibility 34

Changes since last survey

  • 300 commits — 233 feature/other, 67 fixes

By area

  • (repo) — 75 commits
  • lib/yard — 74 commits
  • (root) — 70 commits
  • templates/default — 27 commits
  • .github/workflows — 15 commits
  • po/ja.po — 8 commits
  • spec/handlers — 7 commits
  • spec/templates — 6 commits
  • docs/Tags.md — 3 commits
  • docs/Parser.md — 2 commits
  • docs/WhatsNew.md — 2 commits
  • spec/spec_helper.rb — 2 commits
  • tasks/prepare_tag.rake — 2 commits
  • .agents/skills — 1 commit
  • .github/ISSUE_TEMPLATE — 1 commit
  • .github/dependabot.yml — 1 commit
  • benchmarks/parsing.rb — 1 commit
  • docs/Templates.md — 1 commit
  • spec/parser — 1 commit
  • spec/tags — 1 commit

Notable commits

  • fix: --one-file fixes
  • fix: Create a gh-fix skill
  • fix: Fix CI checkout
  • fix: Fix Gem::Specification for Ruby 4.x
  • fix: Fix HTML generation for RBS constants
  • fix: Fix JS bug
  • fix: Fix JS linter
  • fix: Fix RSpec deprecations
  • fix: Fix Ruby 3.4 regex warning: remove duplicated range in character class
  • fix: Fix Ruby 3.4 regex warning: remove duplicated range in character class (#1640)
  • fix: Fix a test and optimize
  • fix: Fix alternating rows when loading a module in default HTML templates with subelements in the nav frame
  • fix: Fix another scroll issue with cross frame nav
  • fix: Fix aref_field bracket consumption causing invalid source_range
  • fix: Fix aref_field bracket consumption causing invalid source_range (#1642)
  • fix: Fix array-within-word-array parsing
  • fix: Fix attribute registration in .rbs files
  • fix: Fix autoload path for RipperParser
  • fix: Fix bracket/brace map corruption from Ruby 3.0+ pattern matching deconstruction
  • fix: Fix bracket/brace map corruption from Ruby 3.0+ pattern matching deconstruction (#1671)
  • …and 280 more

Architecture

  • 0 containers · 1 bounded contexts · 0 dependency edges (baseline)

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

lsegal/yard was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.

About this page

  • The score is its most recent published measurement, taken on 19 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit 3d8670543d2408baea3a1360b2258fde2ee65917 — the exact code this score is about.
  • Scored under rubric-2026.09.15 — the same rubric and the same method as every other entry in this index.
  • Measured by watchdog.canine.dev using codehealth-analyzer preprod-13a154b7f5d1.