I'm having a hard time explaining my problem, therefore, I've drawn an example directed graph, as you can see below. The edges are annotated with colours. Those colours/annotations would be the output of the process. The input would be the graph without coloured edges. The circle on the left is the starting vertex, the filled circle on the right is the end vertex.
The goal is to find sets of edges. Each edge in a set has the the following property: if one edge is visited as a part of a possible path (from start to end) through the directed graph, it is guaranteed that all other edges in this set will be visited as well. For example, the green edges are green, because if the first green edge is visited, it is guaranteed that all other green edges will be visited as well. Same goes for all colours.
What algorithm could achieve such an annotation?
A test for a potential set would be checking all possible paths from the starting vertex to the end vertex and finding no path that just contains a subset of the proposed set.
I feel like I'm missing the obvious solution. Could anyone please help?