Profile Repository
The profiles of one project in the library folder: <library>/<projectId>/<profile id>/, each a ProfileFolder. The library lives outside every repository and is shared by all projects; the project id comes from the project's roto.json. Profile ids follow SafeName, since they become folder names and the {profile} value in output paths.
Functions
The folder profile id lives in, whether or not it exists yet.
Reads profile id; a missing profile is a NoSuchFileException, a bad one a ProfileException. A variant's base is read too and must exist and not be a variant; with colours, the variant's ramps and outline are checked against them as well.
Applies change to the clip clipId of profile id as profile.json holds it now, so nothing saved since the caller read the clip is lost; returns the clip as saved. A clip the profile no longer has is an IllegalArgumentException.