Ragex.Analysis.Suggestions.Actions
(Ragex v0.3.1)
View Source
Generates actionable refactoring plans for suggestions.
Creates step-by-step instructions for executing refactoring operations using existing MCP tools and validated workflows.
Each action plan includes:
- Ordered list of steps with tool invocations
- Validation checks (syntax, tests)
- Rollback procedures
- Estimated time per step
Usage
alias Ragex.Analysis.Suggestions.Actions
{:ok, plan} = Actions.generate_action_plan(suggestion)
# Plan structure:
# %{
# suggestion_id: "...",
# steps: [
# %{order: 1, action: "...", tool: "...", params: %{...}},
# ...
# ],
# validation: [...],
# rollback: [...]
# }
Summary
Functions
Estimates the effort level for executing an action plan.
Formats an action plan for display.
Generates an action plan for a suggestion.
Functions
Estimates the effort level for executing an action plan.
Returns one of: :trivial, :easy, :moderate, :significant, :major
Formats an action plan for display.
Returns a human-readable string representation of the plan.
Generates an action plan for a suggestion.
Parameters
suggestion- Scored suggestion with pattern, target, and metrics
Returns
{:ok, action_plan}- Executable action plan{:error, reason}- Error if plan generation fails