We are considering removing support for ephemeral packages in favour of scripts.
At the moment packages can't have dependencies on scripts, so we'd have to extend Leeway to allow that.
We should ensure that any script a package depends on has the workdir setting set to packages to ensure they don't modify anything in the source tree (intentional or not)
More context in this internal meeting note.