A rule template is a text (file) intended to be expanded repeatedly using different sets of template parameters, similar to a macro processor. Each expansion will generate - more or less - the same rule, unless you put the flexibility into the parameter, which just passes the buck to the code driving the expansion.
Let's say that you want to be alerted if one of your lucky numbers becomes a fact. You can write a template, create a collection of your lucky numbers and run the expander to create one rule for each of your lucky numbers. This is explained in section "Expanding a Template".
Most of the time, sets of almost identical rules can be avoided if facts containing parameter sets are inserted and rules are written to match the values from a ParameterSet fact rather than literals, as would be done by generated rules. Consider
when
Integer( valueOf == 7 )
when
Integer( valueOf == 13 )
as opposed to
when
Parameter( $n: number )
Integer( valueOf == $n )
with appropriate Parameter facts (7, 13).
-W