I think the word you are looking for is recursive.
pertaining to or using a rule or procedure that can be applied repeatedly.
In your example YAML Ain't Markup Language YAML is a recursive acronym
Although God is...well, only God can define God. is more like circular reasoning, which I suppose could be seen as a basic form of recursion. Similar to this example: