Class: Rigor::CLI::SkillCommand
- Defined in:
- lib/rigor/cli/skill_command.rb
Overview
‘rigor skill` — discover and print the SKILL.md files bundled with the `rigortype` gem.
Rigor ships a small set of Agent Skills under ‘skills/` that walk an AI coding agent through onboarding (`rigor-project-init`), baseline reduction (`rigor-baseline-reduce`), and authoring a plugin (`rigor-plugin-author`). When Rigor is installed via `mise` / `gem install` / etc. the SKILL files live inside the gem checkout — the project being analysed has no copy, so an AI agent has no a priori way to find them.
Grammar (mirrors ‘rigor docs`): the positional slot is always a skill name; alternative outputs are flags, so a skill named `list` or `path` can never be shadowed by a verb.
-
‘rigor skill` — list bundled skills (the default).
-
‘rigor skill <name>` — print the SKILL.md body (header + body).
This is the form AI agents call; the inline body plus the header's absolute paths let the agent act with or without a file-reading tool. -
‘rigor skill –path <name>`— one-line absolute path, for a Read tool.
-
‘rigor skill –list` — table of name + absolute path.
-
‘rigor skill –describe` — ADR-73’s live entry point: a cheap
project-state probe + the recommended next skill + every skill's current description. The `rigor-next-steps` SKILL routes off this so no version-coupled guidance is frozen into the SKILL. Also spelled `describe`, and surfaced top-level as `rigor describe`.
The pre-v0.3.0 verb spellings ‘rigor skill list` / `print <name>` / `path <name>` still work but emit a stderr deprecation notice; they are removed in v0.3.0 (see docs/ROADMAP.md § “Scheduled CLI deprecations”). `describe` is a no-argument action, not a name-slot verb, so it stays first-class alongside `–describe`.
Constant Summary collapse
- USAGE =
<<~USAGE Usage: rigor skill [<name>] [--path <name>] [--list] [--describe] With no argument, lists the bundled skills. rigor skill List bundled skills rigor skill <name> Print the SKILL.md body for <name> (with a header) rigor skill --path <name> Print the absolute path of the SKILL.md file for <name> rigor skill --list List bundled skills (name + absolute path) rigor skill --describe Report project state + recommend the next skill to run Examples: rigor skill rigor skill rigor-project-init rigor skill --path rigor-baseline-reduce rigor skill --describe (also: rigor describe) Deprecated (removed in v0.3.0) — use the forms above: rigor skill list -> rigor skill --list rigor skill print <name> -> rigor skill <name> rigor skill path <name> -> rigor skill --path <name> USAGE
- SKILLS_ROOT =
The bundled skills live at ‘<gem_root>/skills/`. From `lib/rigor/cli/skill_command.rb` that is three directories up.
File.("../../../skills", __dir__)
- LEGACY_VERB_REMOVAL =
The verb subcommands the flags superseded keep working with a stderr deprecation notice until this version drops them. Each maps to the canonical advice printed and the flag it rewrites to.
"v0.3.0"- LEGACY_VERBS =
{ "list" => { old: "list", advice: "--list", flag: "--list" }, "print" => { old: "print <name>", advice: "<name>", flag: "--print" }, "path" => { old: "path <name>", advice: "--path <name>", flag: "--path" } }.freeze
Instance Method Summary collapse
-
#run ⇒ Integer
CLI exit status.
Methods inherited from Command
Constructor Details
This class inherits a constructor from Rigor::CLI::Command
Instance Method Details
#run ⇒ Integer
Returns CLI exit status.
83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 |
# File 'lib/rigor/cli/skill_command.rb', line 83 def run rewrite_legacy_verb! case @argv.first when nil run_list when "-h", "--help", "help" print_usage(@out) 0 when "describe", "--describe" @argv.shift run_describe when "--list" @argv.shift run_list when "--path" @argv.shift run_path(@argv.shift) when "--print" @argv.shift run_print(@argv.shift) else run_print(@argv.shift) end end |