Skip to content

Comprehensive documentation overhaul and modernization - #133

Merged
id774 merged 1 commit into
masterfrom
claude/automaticruby-modernization-r2tw6q
Aug 14, 2026
Merged

Comprehensive documentation overhaul and modernization#133
id774 merged 1 commit into
masterfrom
claude/automaticruby-modernization-r2tw6q

Conversation

@id774

@id774 id774 commented Aug 14, 2026

Copy link
Copy Markdown
Owner

This PR replaces outdated documentation with a complete, modern specification suite and updates the codebase to match current practices.

Summary

Replaces fragmented, outdated documentation (doc/README, doc/PLUGINS, doc/ChangeLog) with a comprehensive four-document specification suite covering requirements, design, policies, and deployment. Updates the CLI architecture to be testable, modernizes Ruby compatibility to 3.2+, and improves code quality throughout.

Key Changes

Documentation

  • Added doc/REQUIREMENTS.md: Specifies what the system is for, what it accepts/produces, and responsibility boundaries
  • Added doc/BASIC_DESIGN.md: Explains composition, architecture, and how values flow through the pipeline
  • Added doc/POLICY.md: Establishes implementation rules, invariants, and change criteria
  • Added doc/PLUGINS.md: Complete specification of Recipe format and plugin contract with all shipped plugins catalogued
  • Added doc/DEPLOYMENT.md: Installation, setup, and operational guidance
  • Added doc/VERSIONS: Version history with breaking changes documented
  • Added doc/LICENSE.md: Explicit GPL-3.0 licensing statement
  • Marked doc/README.ja and doc/PLUGINS.ja as historical documents
  • Removed obsolete doc/README, doc/PLUGINS, and doc/ChangeLog

CLI Architecture

  • Extracted command-line logic into new lib/automatic/cli.rb with testable interface
  • CLI.run() returns exit status instead of calling exit(), enabling testing without process spawning
  • Simplified bin/automatic to minimal entry point that delegates to CLI
  • Added comprehensive spec/lib/automatic/cli_spec.rb test suite

Recipe Safety

  • Implemented YAML.safe_load for Recipe loading to prevent arbitrary class instantiation
  • Added Automatic::InvalidRecipeError for malformed recipes
  • Added Automatic::Error base class for framework exceptions
  • Added spec/lib/automatic/recipe_safety_spec.rb tests

Ruby Modernization

  • Raised minimum Ruby version to 3.2 (from 1.9+)
  • Replaced deprecated Kernel#open with URI.open for URL fetching
  • Replaced deprecated File.exists? with File.exist?
  • Updated CI to test on Ruby 3.2, 3.3, and 3.4 via .github/workflows/ci.yml

Build & Packaging

  • Converted automatic.gemspec from Jeweler-generated to hand-maintained format
  • Version now read from VERSION file at build time
  • Updated Gemfile to reference dependencies from gemspec
  • Enhanced script/build with documentation and integration test support
  • Updated .gitignore to reflect modern bundler practices

Code Quality

  • Updated copyright headers to 2026 throughout codebase
  • Standardized file headers with Name, Author, Created, Updated, Copyright, License
  • Improved README.md with comprehensive table of contents and clearer structure
  • All existing plugins updated with consistent header format

Notable Implementation Details

  • The four-document specification (REQUIREMENTS, BASIC_DESIGN, POLICY, PLUGINS) forms a complete, self-contained reference with no external dependencies
  • CLI architecture enables full test coverage of command-line behavior without spawning processes
  • Recipe safety prevents code injection while preserving YAML aliases for configuration reuse
  • Minimum Ruby 3.2 requirement aligns with modern Ruby ecosystem standards
  • Hand-maintained gemspec provides explicit control over dependencies and metadata

https://claude.ai/code/session_012h5Tae3PL4LJDkT7tr1Jdw

First stage of the modernization. The core, the Recipe format and the plugin
contract are unchanged; what changes is that the framework runs on a current
Ruby, installs from a current RubyGems, and says plainly which of its plugins
still work.

Documentation is the substance of this change. Added doc/REQUIREMENTS.md,
doc/BASIC_DESIGN.md, doc/POLICY.md, doc/PLUGINS.md, doc/DEPLOYMENT.md,
doc/LICENSE.md and doc/VERSIONS, and rewrote README.md. doc/PLUGINS.md
specifies the Recipe format and the plugin contract, and catalogues all 44
plugins as Supported, Supported (external), Needs rework or Unsupported with
the reason for each. The release history moved from doc/ChangeLog into
doc/VERSIONS without changing an entry or a date; doc/README and doc/PLUGINS
were removed once their content had a new home. doc/README.ja and
doc/PLUGINS.ja are kept as historical Japanese documentation and marked as
describing the software as it was. No document refers to another repository.

Compatibility: Kernel#open no longer opens URLs on Ruby 3, so fetching now
goes through URI.open; File.exists?, Sanitize.clean and the AWS SDK v1
requirement at load time are likewise addressed. Recipes are loaded with
YAML.safe_load and a malformed one is refused with a message instead of a
backtrace. The command line moved out of bin/automatic into Automatic::CLI,
which returns an exit status and never calls exit, gaining -v/--version and
fixed exit codes along the way.

Packaging: the Jeweler-generated gemspec is replaced by a hand-maintained one
stating required_ruby_version, licence and metadata. Gems needed by a single
plugin are no longer runtime dependencies, so installing this no longer
installs an AWS SDK. The gem source is HTTPS and gems.github.com is gone.

Tests: RSpec 3, with a plugin spec skipped and named when its gem is absent
rather than aborting the suite, and the examples that reach real hosts tagged
:network and excluded by default. Two long-standing spec defects are fixed:
one deleted the developer's real ~/.automatic/assets/siteinfo, and one failed
at random on one shuffle in twenty-four. CI runs the suite on Ruby 3.2, 3.3
and 3.4 with no credential configured.

Two behaviour changes worth noting: PublishConsole and PublishConsoleLink no
longer print a stray "info" line before each item, and PublishInstapaper now
verifies TLS certificates, which it previously disabled.

No plugin was deleted, no dead service was stubbed to make a test pass, and
the GPLv3 licence is unchanged.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012h5Tae3PL4LJDkT7tr1Jdw
@id774
id774 merged commit 8eb1f07 into master Aug 14, 2026
0 of 6 checks passed
@id774
id774 deleted the claude/automaticruby-modernization-r2tw6q branch August 14, 2026 15:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants