Loose connection, but made me remember https://code.world/ uses a Haskell-like functional language to define still pictures, animations, or even games.
I suspect you could implement this as a Haskell DSL.
The discussion part where you are not allowed (from Terraform lang) to create behavior dependent on the actual values of "Unknown" values (to prevent an ambiguous / non-deterministic plan), reminds of Applicatives vs Monads a bit.
For example, if you write a command-line parsing library using a Monad, then the set of command-line options is not an upfront fixed set easy to list with --help, but can change depending on previous command line options (here the command line parsing can peek into the upfront "Unknown" values, the options used and their values, to generate even more options).
While if you write it using Applicative, then peeking into the actual values is not possible, you can't create branching behaviour.
...but maybe you don't need to go as far as Haskell. Any language with generics could work, like Java. (Or well, void pointers or anonymous interfaces..). Just make sure the user-written plan code doesn't get any meaningful info about the unknown values, only able to pass it around.
Yes, Pulumi has the concept of `Input` and `Output`. You need to unwrap an `Output` to inspect the computed value, but that unwrap only exists because Pulumi allows you to.
EDIT: and note that Pulumi has language targets in C#, Typescript, golang, and Python
For the grepping aspect, https://github.com/google/zoekt is a powerful one-stop-shop. For the navigating, I don't know. SourceGraph maybe, but the linking is somewhat heuristic I assume, not compilation-graph powered. But maybe that changes or depends per language.
> As more operations are demanded, it is more likely that the existing partitioning of the world into the nice distinct cases won’t suit that operation anymore. Then, as a fix, we can introduce more specific cases, or make existing ones more general - leading to ambiguity, bloat and mental load for the existing operations.
About the $40+ for the advice part - seriously, that is a few hours of developer salary. Compared to the few days it would take reading, it is essentially nothing.
Now the question is, investing those few days total saves you more worries. And doesn't derail you. That's hard to evaluate, and I don't attempt to. But for information, $40 is cheap.
Shameless plug: my work-in-progress book Programming Without Anxiety [0] might be interesting for you. It got a bit of scope creep which I'll have to cut back on, but I'm pretty enthusiastic about the content so far.