iRule Convert (Modernise)
Steps
- Read
../_prompts/irules_system.md, then the iRule. - Call
mcp__tcl-lsp__find-legacywith the contents assource. On a tool
error report it; with no findings, report the iRule already follows best
practice.
- Apply the conversions with Edit:
matchclass→class match
(IRULE2001); unbraced expr → braced (W100); string concat for lists →
lappend (W104); == / != on strings → eq / ne (W110); missing --
→ add it (W304); ungated log in a hot event → `CLIENT_ACCEPTED { set
debug 0 } plus if {$debug}` (IRULE5001).
- Re-read and re-validate with
mcp__tcl-lsp__analyze; fix new issues, up
to 3 iterations.
- Report what was converted and the final validation status.
$ARGUMENTS