Preparing the ground for a pergola next to a new drainage swale
https://louiskgqu246.lucialpiazzale.com/a-drainage-minded-look-at-a-retaining-wall-on-a-wet-hillside
Take time at the beginning and the rest goes easier. Sort out where the posts should sit relative to the swale before choosing finishes. Then the rest of the plan can fall into place