Validate model titles

Hey, I’m using studio and I have all my models moved out to the /models folder with the default ModelName.v1.yaml naming convention.

What I’m wanting to do is validate with spectral that the title field in the model file matches the filename.
Is there a way to do that?
I seem to be able to access the title field with $..title but it doesn’t seem to super accurate. It gets other attributes as well for some reason.

I have no idea what the path is for the ./models directory and nothing I assumed it might be has worked for me.
I also don’t know how I’d get the filename to be able to compare the two.