defmodule Mix.Tasks.UsageRules.Sync.Docs do @moduledoc false @spec short_doc() :: String.t() def short_doc do "Combine the package rules for the provided packages into the provided file, or list/gather all dependencies." end @spec example() :: String.t() def example do "mix usage_rules.sync CLAUDE.md --all --link-to-folder deps" end @spec long_doc() :: String.t() def long_doc do """ #{short_doc()} ## Package Specifications Packages can be specified in the following formats: * `package_name` - Include the main usage-rules.md file for the package * `package_name:sub_rule` - Include a specific sub-rule from the package's usage-rules/ folder * `package_name:all` - Include all sub-rules from the package's usage-rules/ folder Sub-rules are discovered from `usage-rules/` folders within package directories. For example: * `deps/ash/usage-rules/testing.md` can be included with `ash:testing` * `deps/phoenix/usage-rules/views.md` can be included with `phoenix:views` ## Options * `--all` - Gather usage rules from all dependencies that have them (includes both main rules and all sub-rules) * `--list` - List all dependencies with usage rules. If a file is provided, shows status (present, missing, stale) * `--remove` - Remove specified packages from the target file instead of adding them * `--remove-missing` - Remove any packages from the target file that are not listed in the command * `--link-to-folder ` - Save usage rules for each package in separate files within the specified folder and create links to them * `--link-style