iRule Scaffold
Steps
- Read
../_prompts/irules_system.md. - Take the event names from the request. If none were given, list the
common ones (RULE_INIT, CLIENT_ACCEPTED, HTTP_REQUEST, HTTP_RESPONSE,
HTTP_REQUEST_DATA, HTTP_RESPONSE_DATA, SERVER_CONNECTED, CLIENT_CLOSED,
SERVER_CLOSED, CLIENTSSL_HANDSHAKE, SERVERSSL_HANDSHAKE, DNS_REQUEST,
DNS_RESPONSE, LB_SELECTED, LB_FAILED) with when each fires, and ask.
- Generate the skeleton: with any HTTP event, a CLIENT_ACCEPTED block with
set debug 0 and if {$debug} around every log (never static:: for
this); HTTP::uri / HTTP::host / HTTP::method extracted to locals at the
top of HTTP events; commented placeholder sections
(# --- Request routing ---); K&R braces, 4-space indent; a comment on
when each event fires.
- Write the file, then call
mcp__tcl-lsp__analyzewith the contents as
source; fix and re-validate up to 3 iterations, then report the status
and anything remaining.
$ARGUMENTS