Like drawing a rough mask manually and having AI improve it? That sounds interesting and I support that idea … but in my humble opinion I fear it’s a lot more complicated that what’s been implemented so far. I would like to be proven wrong tho.
From a high-level perspective, I can see two ways how this could work.
create an draw mask, create the ai mask ( just from the whole image) and take the intersection of those two. There is hardly any new functionality needed for this, actually I think you can already try this is the current darktable version or else with the new masking features that likely will hit 5.8.
or, somehow the AI masking is only run on the part of that selected by the draw mask. This seems hard, because wha pixels to you fed the masking process? As an easier intermediate solution we might fed the bounding box of the drawn mask…