MathZetta CAS rule editor
The rule engine under MathZetta CAS: each simplification and derivative step is a rule written in YAML, which you can read and change. Write a rule, see which structure keys it lands under and which rules share them, and fire it at sample expressions before adding it.
For the whole CAS (exact simplify, factor, solve and integrate, with the steps drawn as maths) see Inline Math's CAS page; to use it in code, npm install @mathzetta/cas. How the rules are written and found: the package's README.
Rule
a a -. Write a derivative as u v der.How this rule gets indexed
The structure keys this pattern is filed under (its shape with the operands blanked out, read every way it can be), and the rules already filed there: those compete with it for the same expressions, separated by their requirements and priority. How keys work.