{
  "version": "act 1.0.17",
  "language_id": "ruby",
  "language_name": "Ruby",
  "url": "https://act101.ai/docs/languages/ruby",
  "is_premium": false,
  "operations": [
    {
      "anchor": "op-callers",
      "name": "callers",
      "category": "Query",
      "description": "Find every call site of a function or method across the codebase. Use to understand who depends on a function before changing its signature. Requires LSP. Params: symbol (string) [, file (string)]"
    },
    {
      "anchor": "op-control-flow",
      "name": "control_flow",
      "category": "Query",
      "description": "Get a function's control flow \u2014 branches, loops, early returns, and basic blocks in execution order. Use to understand complex logic without reading the full implementation. Params: target (string), file (string)"
    },
    {
      "anchor": "op-definition",
      "name": "definition",
      "category": "Query",
      "description": "Jump to definition \u2014 find where a symbol is defined given a usage location. Uses abstract syntax trees by default, no LSP required. Params: symbol (string), file (string), line (u32), column (u32)"
    },
    {
      "anchor": "op-diagnostics",
      "name": "diagnostics",
      "category": "Query",
      "description": "Get compiler errors and warnings from the language server. Omit `file` for workspace-wide diagnostics. Pass a file path or directory path to scope results. Requires LSP."
    },
    {
      "anchor": "op-fix-auto",
      "name": "fix_auto",
      "category": "Query",
      "description": "Auto-fix all deterministic issues in a file, directory, or workspace \u2014 missing imports, unused imports, simple type errors. Runs multiple fix-revalidate cycles. Use after making changes to clean up automatically. Requires LSP. Params: none [, file (string), workspace_mode (bool), category (string), commit (bool), max_rounds (u32)]"
    },
    {
      "anchor": "op-get-type",
      "name": "get_type",
      "category": "Query",
      "description": "Get the compiler-inferred type of any expression at a position. Use to understand types without reading surrounding code. Requires LSP. Params: file (string), line (u32), column (u32)"
    },
    {
      "anchor": "op-graph",
      "name": "graph",
      "category": "Query",
      "description": "Build a dependency graph from a file \u2014 trace what it imports and what imports it, across multiple hops. Use to understand module relationships and change impact before refactoring. Params: file (string) [, depth (u32), direction (string), leaves (bool), order (string)]"
    },
    {
      "anchor": "op-import-organize",
      "name": "import_organize",
      "category": "Query",
      "description": "Organize, sort, and deduplicate imports in a file. Removes unused imports. Use after adding new code or moving symbols to clean up import blocks automatically. Params: file (string) [, preview (bool)]"
    },
    {
      "anchor": "op-interface",
      "name": "interface",
      "category": "Query",
      "description": "Get a symbol's public API \u2014 signatures, types, and docstrings without implementation bodies. Like skeleton but for a single symbol. Use to understand how to call something without reading its internals. Params: target (string), file (string) [, include_private (bool)]"
    },
    {
      "anchor": "op-mutations",
      "name": "mutations",
      "category": "Query",
      "description": "Identify side effects \u2014 what external state a function reads or writes (globals, file I/O, network, etc.). Use to understand if a function is pure or has hidden dependencies. Params: target (string), file (string)"
    },
    {
      "anchor": "op-references",
      "name": "references",
      "category": "Query",
      "description": "Find every usage of a symbol across the entire codebase \u2014 all files, not just the current one. Use before renaming, refactoring, or deleting to understand full impact. Requires LSP. Params: symbol (string), file (string)"
    },
    {
      "anchor": "op-repo-outline",
      "name": "repo_outline",
      "category": "Query",
      "description": "Get a compressed overview of the entire repository in one call \u2014 file tree with languages, line counts, and optionally symbol names per file. Orders of magnitude cheaper than listing directories and reading files individually. Params: none [, path (string), depth (u32), include (glob), exclude (glob), symbols (bool), max_files (u32), relative (bool)]"
    },
    {
      "anchor": "op-skeleton",
      "name": "skeleton",
      "category": "Query",
      "description": "Get a file's structure \u2014 function signatures, class declarations, type definitions \u2014 without implementation bodies. Use INSTEAD of reading the full file to understand its API. Typically 5-10x fewer tokens than reading the raw file. Params: file (string)"
    },
    {
      "anchor": "op-symbols",
      "name": "symbols",
      "category": "Query",
      "description": "List all symbols (functions, classes, variables, types, constants) defined in a file with their locations and kinds. Use INSTEAD of reading a file when you need to know what's defined in it. Much cheaper than reading the full file. IMPORTANT: file must be a path to a single source file \u2014 never a directory or empty string. Params: file (string)"
    },
    {
      "anchor": "op-symbols-batch",
      "name": "symbols_batch",
      "category": "Query",
      "description": "Retrieve symbols from multiple files in a single call. Use instead of calling symbols() in a loop \u2014 one request instead of N. Params: none [, files (string[]), ids (string[]), kinds (string[])] \u2014 provide files or ids"
    },
    {
      "anchor": "op-add-attr-accessor",
      "name": "add-attr-accessor",
      "category": "Refactor",
      "description": "Create explicit attr_accessor from getter+setter"
    },
    {
      "anchor": "op-add-attr-class-variable",
      "name": "add-attr-class-variable",
      "category": "Refactor",
      "description": "Add @@var class variable"
    },
    {
      "anchor": "op-add-attr-reader",
      "name": "add-attr-reader",
      "category": "Refactor",
      "description": "Create explicit attr_reader from getter method"
    },
    {
      "anchor": "op-add-attr-writer",
      "name": "add-attr-writer",
      "category": "Refactor",
      "description": "Create explicit attr_writer from setter method"
    },
    {
      "anchor": "op-add-ensure-clause",
      "name": "add-ensure-clause",
      "category": "Refactor",
      "description": "Add ensure block for cleanup"
    },
    {
      "anchor": "op-add-namespace",
      "name": "add-namespace",
      "category": "Refactor",
      "description": "Wrap code in module Namespace; end"
    },
    {
      "anchor": "op-add-raise-statement",
      "name": "add-raise-statement",
      "category": "Refactor",
      "description": "Add explicit raise for error condition"
    },
    {
      "anchor": "op-add-self-parameter",
      "name": "add-self-parameter",
      "category": "Refactor",
      "description": "Explicit self in class method definition"
    },
    {
      "anchor": "op-add-type-comment",
      "name": "add-type-comment",
      "category": "Refactor",
      "description": "Add @type [Type] comment for static analysis"
    },
    {
      "anchor": "op-change-visibility",
      "name": "change-visibility",
      "category": "Refactor",
      "description": "Change method access level (private/protected/public)"
    },
    {
      "anchor": "op-convert-block-to-lambda",
      "name": "convert-block-to-lambda",
      "category": "Refactor",
      "description": "Convert block to lambda declaration"
    },
    {
      "anchor": "op-convert-block-to-proc",
      "name": "convert-block-to-proc",
      "category": "Refactor",
      "description": "Convert block to &:method_name syntax"
    },
    {
      "anchor": "op-convert-braces-to-do-end",
      "name": "convert-braces-to-do-end",
      "category": "Refactor",
      "description": "Convert { } block to do...end"
    },
    {
      "anchor": "op-convert-case-to-if",
      "name": "convert-case-to-if",
      "category": "Refactor",
      "description": "Convert case statement to if/elsif"
    },
    {
      "anchor": "op-convert-class-to-module",
      "name": "convert-class-to-module",
      "category": "Refactor",
      "description": "Convert class to module (if no constructor)"
    },
    {
      "anchor": "op-convert-do-end-to-braces",
      "name": "convert-do-end-to-braces",
      "category": "Refactor",
      "description": "Convert do...end block to { }"
    },
    {
      "anchor": "op-convert-double-to-single-quotes",
      "name": "convert-double-to-single-quotes",
      "category": "Refactor",
      "description": "Double quote to single quote literals"
    },
    {
      "anchor": "op-convert-each-to-for",
      "name": "convert-each-to-for",
      "category": "Refactor",
      "description": "Convert .each to for loop"
    },
    {
      "anchor": "op-convert-exception-to-specific-type",
      "name": "convert-exception-to-specific-type",
      "category": "Refactor",
      "description": "Make rescue catch specific exception type"
    },
    {
      "anchor": "op-convert-for-to-each",
      "name": "convert-for-to-each",
      "category": "Refactor",
      "description": "Convert for loop to .each iteration"
    },
    {
      "anchor": "op-convert-for-to-while",
      "name": "convert-for-to-while",
      "category": "Refactor",
      "description": "Convert for loop to while"
    },
    {
      "anchor": "op-convert-heredoc-to-string",
      "name": "convert-heredoc-to-string",
      "category": "Refactor",
      "description": "Convert heredoc back to string literal"
    },
    {
      "anchor": "op-convert-if-else",
      "name": "convert-if-else",
      "category": "Refactor",
      "description": "Convert between if-else patterns"
    },
    {
      "anchor": "op-convert-if-to-case",
      "name": "convert-if-to-case",
      "category": "Refactor",
      "description": "Convert multiple elsif to case"
    },
    {
      "anchor": "op-convert-if-to-unless",
      "name": "convert-if-to-unless",
      "category": "Refactor",
      "description": "Convert if !x to unless x"
    },
    {
      "anchor": "op-convert-lambda-to-block",
      "name": "convert-lambda-to-block",
      "category": "Refactor",
      "description": "Convert lambda to block when passed to method"
    },
    {
      "anchor": "op-convert-loop-to-break",
      "name": "convert-loop-to-break",
      "category": "Refactor",
      "description": "Convert loop to conditional iteration"
    },
    {
      "anchor": "op-convert-method-body-to-one-liner",
      "name": "convert-method-body-to-one-liner",
      "category": "Refactor",
      "description": "Collapse multi-line method to single line"
    },
    {
      "anchor": "op-convert-method-to-property",
      "name": "convert-method-to-property",
      "category": "Refactor",
      "description": "Convert accessor method to attr_accessor"
    },
    {
      "anchor": "op-convert-modifier-if",
      "name": "convert-modifier-if",
      "category": "Refactor",
      "description": "Convert if modifier to block form"
    },
    {
      "anchor": "op-convert-module-to-class",
      "name": "convert-module-to-class",
      "category": "Refactor",
      "description": "Convert module to class"
    },
    {
      "anchor": "op-convert-one-liner-to-method-body",
      "name": "convert-one-liner-to-method-body",
      "category": "Refactor",
      "description": "Expand one-liner to multi-line"
    },
    {
      "anchor": "op-convert-percent-literal-to-string",
      "name": "convert-percent-literal-to-string",
      "category": "Refactor",
      "description": "Convert %w() word array to string literal"
    },
    {
      "anchor": "op-convert-proc-to-block",
      "name": "convert-proc-to-block",
      "category": "Refactor",
      "description": "Convert proc parameter to explicit block"
    },
    {
      "anchor": "op-convert-property-to-method",
      "name": "convert-property-to-method",
      "category": "Refactor",
      "description": "Convert attr_accessor to explicit getter/setter"
    },
    {
      "anchor": "op-convert-require-relative-to-require",
      "name": "convert-require-relative-to-require",
      "category": "Refactor",
      "description": "Convert require_relative to require"
    },
    {
      "anchor": "op-convert-require-to-require-relative",
      "name": "convert-require-to-require-relative",
      "category": "Refactor",
      "description": "Convert require to require_relative"
    },
    {
      "anchor": "op-convert-rescue-to-rescue-in-method",
      "name": "convert-rescue-to-rescue-in-method",
      "category": "Refactor",
      "description": "Extract rescue to method-level"
    },
    {
      "anchor": "op-convert-single-to-double-quotes",
      "name": "convert-single-to-double-quotes",
      "category": "Refactor",
      "description": "Single quote to double quote literals"
    },
    {
      "anchor": "op-convert-singleton-to-class-method",
      "name": "convert-singleton-to-class-method",
      "category": "Refactor",
      "description": "Convert singleton method to class method definition"
    },
    {
      "anchor": "op-convert-string-to-symbol",
      "name": "convert-string-to-symbol",
      "category": "Refactor",
      "description": "Convert string to symbol for hash keys"
    },
    {
      "anchor": "op-convert-symbol-to-string",
      "name": "convert-symbol-to-string",
      "category": "Refactor",
      "description": "Convert symbol to string literal"
    },
    {
      "anchor": "op-convert-ternary",
      "name": "convert-ternary",
      "category": "Refactor",
      "description": "Convert ternary expressions and conditionals"
    },
    {
      "anchor": "op-convert-to-guard-clause",
      "name": "convert-to-guard-clause",
      "category": "Refactor",
      "description": "Extract common condition to guard at method start"
    },
    {
      "anchor": "op-convert-to-heredoc",
      "name": "convert-to-heredoc",
      "category": "Refactor",
      "description": "Convert string to heredoc for multiline"
    },
    {
      "anchor": "op-convert-to-rbs-signature",
      "name": "convert-to-rbs-signature",
      "category": "Refactor",
      "description": "Convert method to RBS type signature format"
    },
    {
      "anchor": "op-convert-to-safe-navigation",
      "name": "convert-to-safe-navigation",
      "category": "Refactor",
      "description": "Convert if check to safe navigation operator (&.)"
    },
    {
      "anchor": "op-convert-to-string-interpolation",
      "name": "convert-to-string-interpolation",
      "category": "Refactor",
      "description": "Convert string concatenation to interpolation"
    },
    {
      "anchor": "op-convert-unless-to-if",
      "name": "convert-unless-to-if",
      "category": "Refactor",
      "description": "Convert unless x to if !x"
    },
    {
      "anchor": "op-convert-while-to-for",
      "name": "convert-while-to-for",
      "category": "Refactor",
      "description": "Convert while loop to for"
    },
    {
      "anchor": "op-copy-method",
      "name": "copy-method",
      "category": "Refactor",
      "description": "Duplicate method declaration"
    },
    {
      "anchor": "op-delete",
      "name": "delete",
      "category": "Refactor",
      "description": "Delete unused symbol"
    },
    {
      "anchor": "op-extract-block-parameter",
      "name": "extract-block-parameter",
      "category": "Refactor",
      "description": "Name unnamed block parameters"
    },
    {
      "anchor": "op-extract-constant",
      "name": "extract-constant",
      "category": "Refactor",
      "description": "Extract value to named constant"
    },
    {
      "anchor": "op-extract-method",
      "name": "extract-method",
      "category": "Refactor",
      "description": "Extract code into a new method"
    },
    {
      "anchor": "op-extract-variable",
      "name": "extract-variable",
      "category": "Refactor",
      "description": "Extract expression to variable"
    },
    {
      "anchor": "op-extract-function",
      "name": "extract_function",
      "category": "Refactor",
      "description": "Extract a code selection into a new function \u2014 automatically infers parameters, return types, and inserts the call site. Use instead of manually cutting/pasting code. Works without LSP; LSP improves type inference. Params: file (string), new_name (string), start_line (u32), start_column (u32), end_line (u32), end_column (u32) [, preview (bool)]"
    },
    {
      "anchor": "op-extract-variable",
      "name": "extract_variable",
      "category": "Refactor",
      "description": "Extract an expression into a named variable \u2014 inserts the declaration and replaces the expression with the variable name. Works without LSP. Params: file (string), new_name (string), start_line (u32), start_column (u32), end_line (u32), end_column (u32) [, preview (bool)]"
    },
    {
      "anchor": "op-generate-accessors",
      "name": "generate-accessors",
      "category": "Refactor",
      "description": "Generate attr_reader, attr_writer, attr_accessor"
    },
    {
      "anchor": "op-generate-class",
      "name": "generate-class",
      "category": "Refactor",
      "description": "Generate new class skeleton"
    },
    {
      "anchor": "op-generate-class-methods-block",
      "name": "generate-class-methods-block",
      "category": "Refactor",
      "description": "Generate class << self section"
    },
    {
      "anchor": "op-generate-clone",
      "name": "generate-clone",
      "category": "Refactor",
      "description": "Generate clone (deep copy)"
    },
    {
      "anchor": "op-generate-comparable-implementation",
      "name": "generate-comparable-implementation",
      "category": "Refactor",
      "description": "Generate <=> for sorting"
    },
    {
      "anchor": "op-generate-constructor",
      "name": "generate-constructor",
      "category": "Refactor",
      "description": "Generate initialize method from class variables"
    },
    {
      "anchor": "op-generate-custom-exception",
      "name": "generate-custom-exception",
      "category": "Refactor",
      "description": "Generate custom exception class"
    },
    {
      "anchor": "op-generate-debug-print",
      "name": "generate-debug-print",
      "category": "Refactor",
      "description": "Add debug output statement"
    },
    {
      "anchor": "op-generate-define-method",
      "name": "generate-define-method",
      "category": "Refactor",
      "description": "Generate define_method for dynamic methods"
    },
    {
      "anchor": "op-generate-dup",
      "name": "generate-dup",
      "category": "Refactor",
      "description": "Generate dup (shallow copy)"
    },
    {
      "anchor": "op-generate-enum-like-class",
      "name": "generate-enum-like-class",
      "category": "Refactor",
      "description": "Generate class with enum-like constants"
    },
    {
      "anchor": "op-generate-enumerable-delegation",
      "name": "generate-enumerable-delegation",
      "category": "Refactor",
      "description": "Generate include Enumerable with iteration"
    },
    {
      "anchor": "op-generate-equals",
      "name": "generate-equals",
      "category": "Refactor",
      "description": "Generate ==, !=, eql? implementations"
    },
    {
      "anchor": "op-generate-example-usage",
      "name": "generate-example-usage",
      "category": "Refactor",
      "description": "Generate usage examples in comments"
    },
    {
      "anchor": "op-generate-fixture-method",
      "name": "generate-fixture-method",
      "category": "Refactor",
      "description": "Generate test fixture setup"
    },
    {
      "anchor": "op-generate-getter-method",
      "name": "generate-getter-method",
      "category": "Refactor",
      "description": "Generate a getter method for an instance variable"
    },
    {
      "anchor": "op-generate-guard-statements",
      "name": "generate-guard-statements",
      "category": "Refactor",
      "description": "Generate nil/type guards at method start"
    },
    {
      "anchor": "op-generate-hash",
      "name": "generate-hash",
      "category": "Refactor",
      "description": "Generate hash for use in collections"
    },
    {
      "anchor": "op-generate-initialize-from-attributes",
      "name": "generate-initialize-from-attributes",
      "category": "Refactor",
      "description": "Generate initialize accepting attribute hashes"
    },
    {
      "anchor": "op-generate-inspect",
      "name": "generate-inspect",
      "category": "Refactor",
      "description": "Generate inspect method"
    },
    {
      "anchor": "op-generate-keyword-initialize",
      "name": "generate-keyword-initialize",
      "category": "Refactor",
      "description": "Generate keyword argument initialize(**kwargs)"
    },
    {
      "anchor": "op-generate-method-missing",
      "name": "generate-method-missing",
      "category": "Refactor",
      "description": "Generate method_missing handler"
    },
    {
      "anchor": "op-generate-method-signature-doc",
      "name": "generate-method-signature-doc",
      "category": "Refactor",
      "description": "Generate method signature documentation"
    },
    {
      "anchor": "op-generate-mixin",
      "name": "generate-mixin",
      "category": "Refactor",
      "description": "Generate module for inclusion as mixin"
    },
    {
      "anchor": "op-generate-mock-object",
      "name": "generate-mock-object",
      "category": "Refactor",
      "description": "Generate mock/stub object for testing"
    },
    {
      "anchor": "op-generate-module",
      "name": "generate-module",
      "category": "Refactor",
      "description": "Generate module with namespace"
    },
    {
      "anchor": "op-generate-precondition-checks",
      "name": "generate-precondition-checks",
      "category": "Refactor",
      "description": "Generate argument validation"
    },
    {
      "anchor": "op-generate-rdoc-comment",
      "name": "generate-rdoc-comment",
      "category": "Refactor",
      "description": "Generate RDoc documentation skeleton"
    },
    {
      "anchor": "op-generate-respond-to-missing",
      "name": "generate-respond-to-missing",
      "category": "Refactor",
      "description": "Generate respond_to_missing?"
    },
    {
      "anchor": "op-generate-setter-method",
      "name": "generate-setter-method",
      "category": "Refactor",
      "description": "Generate a setter method for an instance variable"
    },
    {
      "anchor": "op-generate-singleton-class",
      "name": "generate-singleton-class",
      "category": "Refactor",
      "description": "Generate singleton methods for object"
    },
    {
      "anchor": "op-generate-subclass",
      "name": "generate-subclass",
      "category": "Refactor",
      "description": "Generate subclass extending parent"
    },
    {
      "anchor": "op-generate-tests",
      "name": "generate-tests",
      "category": "Refactor",
      "description": "Generate test method skeleton"
    },
    {
      "anchor": "op-generate-to-h",
      "name": "generate-to-h",
      "category": "Refactor",
      "description": "Generate to_h for hash conversion"
    },
    {
      "anchor": "op-generate-to-string",
      "name": "generate-to-string",
      "category": "Refactor",
      "description": "Generate to_s string representation"
    },
    {
      "anchor": "op-generate-todo-comment",
      "name": "generate-todo-comment",
      "category": "Refactor",
      "description": "Generate TODO/FIXME placeholder"
    },
    {
      "anchor": "op-generate-validation-method",
      "name": "generate-validation-method",
      "category": "Refactor",
      "description": "Generate method for parameter validation"
    },
    {
      "anchor": "op-generate-with-index-iteration",
      "name": "generate-with-index-iteration",
      "category": "Refactor",
      "description": "Generate each_with_index method"
    },
    {
      "anchor": "op-import-add",
      "name": "import-add",
      "category": "Refactor",
      "description": "Add require statement"
    },
    {
      "anchor": "op-import-organize",
      "name": "import-organize",
      "category": "Refactor",
      "description": "Organize and sort requires"
    },
    {
      "anchor": "op-import-remove",
      "name": "import-remove",
      "category": "Refactor",
      "description": "Remove unused require statement"
    },
    {
      "anchor": "op-inline",
      "name": "inline",
      "category": "Refactor",
      "description": "Inline a variable, function, or method \u2014 replace every usage with its definition body, then remove the original. The inverse of extract. Works without LSP (single-file); LSP enables cross-file inlining. Params: file (string), symbol (string) [, line (u32), preview (bool)]"
    },
    {
      "anchor": "op-inline-method",
      "name": "inline-method",
      "category": "Refactor",
      "description": "Inline method body at call sites"
    },
    {
      "anchor": "op-inline-variable",
      "name": "inline-variable",
      "category": "Refactor",
      "description": "Inline variable at all references"
    },
    {
      "anchor": "op-insert-body",
      "name": "insert_body",
      "category": "Refactor",
      "description": "Replace a function's implementation body with new code. AST-validated \u2014 rejects if the result has parse errors, so you can't accidentally break syntax. Use instead of manual text editing for function rewrites. Params: file (string), symbol (string), code (string) [, commit (bool)]"
    },
    {
      "anchor": "op-introduce-variable",
      "name": "introduce-variable",
      "category": "Refactor",
      "description": "Extract expression to local variable"
    },
    {
      "anchor": "op-invert-if-else",
      "name": "invert-if-else",
      "category": "Refactor",
      "description": "Swap if and else branches, negate condition"
    },
    {
      "anchor": "op-join-string-literals",
      "name": "join-string-literals",
      "category": "Refactor",
      "description": "Concatenate adjacent string literals"
    },
    {
      "anchor": "op-make-method-instance",
      "name": "make-method-instance",
      "category": "Refactor",
      "description": "Convert class method to instance method"
    },
    {
      "anchor": "op-make-method-static",
      "name": "make-method-static",
      "category": "Refactor",
      "description": "Convert instance method to class method"
    },
    {
      "anchor": "op-merge-nested-if",
      "name": "merge-nested-if",
      "category": "Refactor",
      "description": "Merge nested if conditions into compound condition"
    },
    {
      "anchor": "op-merge-rescue-clauses",
      "name": "merge-rescue-clauses",
      "category": "Refactor",
      "description": "Combine multiple rescue handlers"
    },
    {
      "anchor": "op-move",
      "name": "move",
      "category": "Refactor",
      "description": "Move method to another class/module"
    },
    {
      "anchor": "op-move-symbol",
      "name": "move_symbol",
      "category": "Refactor",
      "description": "Move a function, class, or type to a different file and automatically update all imports across the codebase. Use instead of manually cut/paste + fixing imports. Works without LSP (single-file); LSP enables cross-file import updates. Params: file (string), symbol (string), destination (string) [, preview (bool)]"
    },
    {
      "anchor": "op-remove-attr-class-variable",
      "name": "remove-attr-class-variable",
      "category": "Refactor",
      "description": "Convert class variable to instance variable"
    },
    {
      "anchor": "op-remove-empty-else",
      "name": "remove-empty-else",
      "category": "Refactor",
      "description": "Remove empty else clause"
    },
    {
      "anchor": "op-remove-empty-rescue",
      "name": "remove-empty-rescue",
      "category": "Refactor",
      "description": "Remove rescue clause that does nothing"
    },
    {
      "anchor": "op-remove-redundant-require",
      "name": "remove-redundant-require",
      "category": "Refactor",
      "description": "Remove duplicate or unnecessary require"
    },
    {
      "anchor": "op-remove-safe-navigation",
      "name": "remove-safe-navigation",
      "category": "Refactor",
      "description": "Convert &.method to .method when safe"
    },
    {
      "anchor": "op-remove-self-parameter",
      "name": "remove-self-parameter",
      "category": "Refactor",
      "description": "Remove explicit self when not needed"
    },
    {
      "anchor": "op-remove-type-comment",
      "name": "remove-type-comment",
      "category": "Refactor",
      "description": "Remove type comment annotation"
    },
    {
      "anchor": "op-remove-unnecessary-block",
      "name": "remove-unnecessary-block",
      "category": "Refactor",
      "description": "Remove block when method doesn't use it"
    },
    {
      "anchor": "op-rename",
      "name": "rename",
      "category": "Refactor",
      "description": "Rename a symbol and automatically update ALL references across the codebase. Safer and faster than find-and-replace \u2014 AST-aware, won't rename strings or comments. Works without LSP (single-file); LSP enables cross-file renames. Params: file (string), old_name (string), new_name (string) [, line (u32), column (u32), preview (bool)]"
    },
    {
      "anchor": "op-rename",
      "name": "rename",
      "category": "Refactor",
      "description": "Rename symbol and all references"
    },
    {
      "anchor": "op-simplify-boolean-assignment",
      "name": "simplify-boolean-assignment",
      "category": "Refactor",
      "description": "Simplify x = x || y to x ||= y"
    },
    {
      "anchor": "op-sort-method-declarations",
      "name": "sort-method-declarations",
      "category": "Refactor",
      "description": "Sort methods by visibility (private/public)"
    },
    {
      "anchor": "op-split-if-condition",
      "name": "split-if-condition",
      "category": "Refactor",
      "description": "Split compound if into nested if"
    },
    {
      "anchor": "op-split-string-literal",
      "name": "split-string-literal",
      "category": "Refactor",
      "description": "Split long string into multiple parts"
    },
    {
      "anchor": "op-swap-statements",
      "name": "swap-statements",
      "category": "Refactor",
      "description": "Reorder two adjacent statements"
    },
    {
      "anchor": "op-wrap-in-begin-rescue",
      "name": "wrap-in-begin-rescue",
      "category": "Refactor",
      "description": "Wrap statement in exception handler"
    },
    {
      "anchor": "op-wrap-null-check",
      "name": "wrap-null-check",
      "category": "Refactor",
      "description": "Wrap expression in nil check guard"
    },
    {
      "anchor": "op-wrap-try-catch",
      "name": "wrap-try-catch",
      "category": "Refactor",
      "description": "Wrap code in begin...rescue...end block"
    },
    {
      "anchor": "op-analyze-chokepoints",
      "name": "analyze_chokepoints",
      "category": "Analysis",
      "description": "Find files that act as critical bottlenecks \u2014 high betweenness centrality in the dependency graph (R4). Params: none [, include (string[]), exclude (string[])]. Use include/exclude to restrict the scan scope (e.g. include=[\"crates\"], exclude=[\"corpus\"])."
    },
    {
      "anchor": "op-analyze-clusters",
      "name": "analyze_clusters",
      "category": "Analysis",
      "description": "Identify tightly coupled groups of files using community detection. Use to discover natural module boundaries and understand which files change together. Params: none [, granularity (string), min_size (u32), include (string[]), exclude (string[])]. Use include/exclude to restrict the scan scope (e.g. include=[\"crates\"], exclude=[\"corpus\"])."
    },
    {
      "anchor": "op-analyze-cohesion",
      "name": "analyze_cohesion",
      "category": "Analysis",
      "description": "Measure intra-module cohesion for each file \u2014 ratio of internal to total symbol edges (H2). Params: none [, include (string[]), exclude (string[])]. Use include/exclude to restrict the scan scope (e.g. include=[\"crates\"], exclude=[\"corpus\"])."
    },
    {
      "anchor": "op-analyze-coupling",
      "name": "analyze_coupling",
      "category": "Analysis",
      "description": "Measure coupling per file \u2014 how many files depend on it (afferent) vs how many it depends on (efferent), plus instability and abstractness scores. Use to find the most critical/fragile files. Params: none [, granularity (string), sort (string), threshold (f64), include (string[]), exclude (string[])]. Use include/exclude to restrict the scan scope (e.g. include=[\"crates\"], exclude=[\"corpus\"])."
    },
    {
      "anchor": "op-analyze-cycle-risk",
      "name": "analyze_cycle_risk",
      "category": "Analysis",
      "description": "Score each circular dependency cycle by its external risk surface (R6 circular risk zones analysis). Params: none [, include (string[]), exclude (string[])]. Use include/exclude to restrict the scan scope (e.g. include=[\"crates\"], exclude=[\"corpus\"])."
    },
    {
      "anchor": "op-analyze-cycles",
      "name": "analyze_cycles",
      "category": "Analysis",
      "description": "Find circular dependency chains in the codebase. Use to identify import cycles that cause build issues or indicate architecture problems. Params: none [, granularity (string), max_length (u32), include (string[]), exclude (string[])]. Use include/exclude to restrict the scan scope (e.g. include=[\"crates\"], exclude=[\"corpus\"])."
    },
    {
      "anchor": "op-analyze-dead-code",
      "name": "analyze_dead_code",
      "category": "Analysis",
      "description": "Find dead code \u2014 functions, classes, and types that are never referenced from any entry point. Use before cleanup to safely identify what can be deleted. Params: none [, entry (string[]), granularity (string), include_tests (bool), include (string[]), exclude (string[])]. Use include/exclude to restrict the scan scope (e.g. include=[\"crates\"], exclude=[\"corpus\"])."
    },
    {
      "anchor": "op-analyze-depth",
      "name": "analyze_depth",
      "category": "Analysis",
      "description": "Compute longest transitive dependency chain per file (S4 dependency depth analysis). Params: none [, include (string[]), exclude (string[])]. Use include/exclude to restrict the scan scope (e.g. include=[\"crates\"], exclude=[\"corpus\"])."
    },
    {
      "anchor": "op-analyze-entry-points",
      "name": "analyze_entry_points",
      "category": "Analysis",
      "description": "Detect entry points: main functions, HTTP routes, CLI commands, event listeners, test files (S5). Params: none [, include (string[]), exclude (string[])]."
    },
    {
      "anchor": "op-analyze-export",
      "name": "analyze_export",
      "category": "Analysis",
      "description": "Export the full semantic graph (files, symbols, dependencies) in JSON, DOT (Graphviz), or CSV format. Use for visualization or external analysis. Params: none [, format (string), include (string[]), exclude (string[])]. Use include/exclude to restrict the scan scope (e.g. include=[\"crates\"], exclude=[\"corpus\"])."
    },
    {
      "anchor": "op-analyze-extraction",
      "name": "analyze_extraction",
      "category": "Analysis",
      "description": "Score clusters for service or package extraction viability (M2 extraction candidates analysis). Params: none [, include (string[]), exclude (string[])]. Use include/exclude to restrict the scan scope (e.g. include=[\"crates\"], exclude=[\"corpus\"])."
    },
    {
      "anchor": "op-analyze-fan-balance",
      "name": "analyze_fan_balance",
      "category": "Analysis",
      "description": "Compute fan-in/fan-out imbalance for migration ordering guidance (M6 fan balance analysis). Params: none [, include (string[]), exclude (string[])]. Use include/exclude to restrict the scan scope (e.g. include=[\"crates\"], exclude=[\"corpus\"])."
    },
    {
      "anchor": "op-analyze-features",
      "name": "analyze_features",
      "category": "Analysis",
      "description": "Inventory language-specific AST features used in the codebase \u2014 async, generics, decorators, etc. (M3). Params: none [, include (string[]), exclude (string[])]. Use include/exclude to restrict the scan scope (e.g. include=[\"crates\"], exclude=[\"corpus\"])."
    },
    {
      "anchor": "op-analyze-hotspots",
      "name": "analyze_hotspots",
      "category": "Analysis",
      "description": "Rank files by composite complexity score \u2014 max cyclomatic complexity, statement count, nesting depth (H1). Params: none [, top_n (u32), include (string[]), exclude (string[])]. Use include/exclude to restrict the scan scope (e.g. include=[\"crates\"], exclude=[\"corpus\"])."
    },
    {
      "anchor": "op-analyze-impact",
      "name": "analyze_impact",
      "category": "Analysis",
      "description": "Compute change impact for a target file \u2014 finds all files directly and transitively depending on it (R1). Params: target (string) [, max_depth (u32), include (string[]), exclude (string[])]. Use include/exclude to restrict the scan scope (e.g. include=[\"crates\"], exclude=[\"corpus\"])."
    },
    {
      "anchor": "op-analyze-inconsistencies",
      "name": "analyze_inconsistencies",
      "category": "Analysis",
      "description": "Detect inconsistent abstractions \u2014 sibling files in the same directory that diverge from the group's structural pattern (H5). Params: none [, include (string[]), exclude (string[])]."
    },
    {
      "anchor": "op-analyze-inheritance",
      "name": "analyze_inheritance",
      "category": "Analysis",
      "description": "Detect tangled inheritance \u2014 deep hierarchies (>N levels) and diamond inheritance (H6). Params: none [, include (string[]), exclude (string[])]."
    },
    {
      "anchor": "op-analyze-interface-bloat",
      "name": "analyze_interface_bloat",
      "category": "Analysis",
      "description": "Detect interface bloat \u2014 files where the public API is disproportionately large relative to implementation (H3). Params: none [, include (string[]), exclude (string[])]."
    },
    {
      "anchor": "op-analyze-interfaces",
      "name": "analyze_interfaces",
      "category": "Analysis",
      "description": "Map cross-module interfaces \u2014 symbols that cross directory-module boundaries, ranked by interface width (M4). Params: none [, include (string[]), exclude (string[])]. Use include/exclude to restrict the scan scope (e.g. include=[\"crates\"], exclude=[\"corpus\"])."
    },
    {
      "anchor": "op-analyze-layers",
      "name": "analyze_layers",
      "category": "Analysis",
      "description": "Detect architectural layers from directory names and find dependency direction violations (S1+S2). Params: none [, detect_only (bool), include (string[]), exclude (string[])]. Use include/exclude to restrict the scan scope (e.g. include=[\"crates\"], exclude=[\"corpus\"])."
    },
    {
      "anchor": "op-analyze-orphan-types",
      "name": "analyze_orphan_types",
      "category": "Analysis",
      "description": "Find type definitions used exclusively outside their defining directory (H4 orphan types analysis). Params: none [, include (string[]), exclude (string[])]. Use include/exclude to restrict the scan scope (e.g. include=[\"crates\"], exclude=[\"corpus\"])."
    },
    {
      "anchor": "op-analyze-patterns",
      "name": "analyze_patterns",
      "category": "Analysis",
      "description": "Find code smells \u2014 god functions, deep nesting, high coupling, and other structural issues. Use to identify refactoring targets or assess code quality. Params: none [, tier (string), pattern (string), file (string), severity (string), include (string[]), exclude (string[])]. Use include/exclude to restrict the scan scope (e.g. include=[\"crates\"], exclude=[\"corpus\"])."
    },
    {
      "anchor": "op-analyze-platform-deps",
      "name": "analyze_platform_deps",
      "category": "Analysis",
      "description": "Detect platform-specific API usage by scanning imports (M5 platform dependencies analysis). Params: none [, include (string[]), exclude (string[])]. Use include/exclude to restrict the scan scope (e.g. include=[\"crates\"], exclude=[\"corpus\"])."
    },
    {
      "anchor": "op-analyze-readiness",
      "name": "analyze_readiness",
      "category": "Analysis",
      "description": "Compute migration readiness scores per file \u2014 composite of complexity, coupling, porting blockers (M1). Params: none [, include (string[]), exclude (string[])]. Use include/exclude to restrict the scan scope (e.g. include=[\"crates\"], exclude=[\"corpus\"])."
    },
    {
      "anchor": "op-analyze-roles",
      "name": "analyze_roles",
      "category": "Analysis",
      "description": "Classify files by architectural role: entry point, routing, business logic, data access, config, test, utility, types, generated (S3). Params: none [, include (string[]), exclude (string[])]."
    },
    {
      "anchor": "op-analyze-seams",
      "name": "analyze_seams",
      "category": "Analysis",
      "description": "Find the natural boundaries between file clusters \u2014 the narrowest points where groups of files communicate. Use to identify where to split modules or add API boundaries. Params: none [, min_cluster_size (u32), max_seam_width (u32), include (string[]), exclude (string[])]. Use include/exclude to restrict the scan scope (e.g. include=[\"crates\"], exclude=[\"corpus\"])."
    },
    {
      "anchor": "op-analyze-stability",
      "name": "analyze_stability",
      "category": "Analysis",
      "description": "Compute stability index (R2) and detect stable dependency violations (R3) \u2014 flags edges where stable modules depend on unstable ones. Params: none [, index_only (bool), include (string[]), exclude (string[])]."
    },
    {
      "anchor": "op-analyze-surface",
      "name": "analyze_surface",
      "category": "Analysis",
      "description": "Measure API surface area \u2014 count exposed functions, types, and complexity at a module boundary. Use to assess whether an API is too large or leaky. Params: none [, boundary (string), files (string), include (string[]), exclude (string[])]. Use include/exclude to restrict the scan scope (e.g. include=[\"crates\"], exclude=[\"corpus\"])."
    },
    {
      "anchor": "op-analyze-test-gaps",
      "name": "analyze_test_gaps",
      "category": "Analysis",
      "description": "Detect source files with no or partial test coverage based on graph import analysis (R5). Params: none [, include (string[]), exclude (string[])]. Use include/exclude to restrict the scan scope (e.g. include=[\"crates\"], exclude=[\"corpus\"])."
    },
    {
      "anchor": "op-analyze-type-completeness",
      "name": "analyze_type_completeness",
      "category": "Analysis",
      "description": "Analyze type boundary completeness \u2014 detect 'any' types, untyped parameters, missing return types at exported function boundaries (M7). Params: none [, include (string[]), exclude (string[])]."
    }
  ]
}