To facilitate the creation of own filters, it would be great to have “Script Layers”: a layer that works like a filter layer (i.e. takes the image from layers beneath it as input and modifies it), but whose logic is written by the user in Python. So a Python function that receives an image as input and outputs the filtered resulting image. Just like filter layers, it’s executed automatically after each brush stroke on lower layers.
The problem with achieving the same result by writing a Plugin is that apparently a Plugin can’t react to brush strokes, i.e. you’d have to run it manually after each brush stroke.