How to "Create A New Class/Mastery" corectly?

In theory you can structure your mod however you feel like. Personally I like separating it from the vanilla files with an eye on allowing for an easy merge with other mods. To that end I would prefer a mod to be under database/records/[modname] rather than mixed in with the vanilla files, same for tags, I start mine with tagModName… where modname really is some kind of abbreviation, not the full name.

Within the modname dir I mostly stick to the hierarchy as it is used by GD, as you will need to be familiar with that anyway.

Of course to a degree the mod will have to change vanilla dbr entries, that cannot be avoided. Any new file I add, I like to keep separated at the dir level however, instead of placing them in the same dirs as the vanilla files. Having the modname subdir makes this easy.

One thing I always do and which would highlight the mistake you made is run a reference check over my mod to see if there are any broken references, which is what you had because the files were not in the dir they should have been in.
I have my own custom tool for that (not very user friendly and with specific features I wanted, so I did not publish it), Ceno released one that you can use for this

[Tool] [Modding] Grim Dawn Modding Suite use the ModChecker part of it

That is about it, there is no great wisdom to impart here, or at least if there is, it will have to come from someone more experienced than me :wink: