I’m a few days late with this, but here is what I did to get this working.
In Devonthink, open the scripts folder, and open Templates.noindex. Do a Show package contents for Project.templatescriptd.
Inside, open Contents, then Resources. Locate the folder matching your localization (en.lproj in my case).
In this folder there is a folder called New Project. This is the top node of the New From Template > Project folder tree that ships with Devonthink. Move (not copy) the New Project folder to a safe place if you think you may want to restore it at some point. Otherwise, delete it.
Create a new folder called New Project (this is what the existing script expects and it will be replaced anyway). In New Project, create the folders (groups) you would like the template to create for you. Important part When naming the folders, any folder you want to use the project name, substitute %project% for the name you will supply when you run the script. For example, for a project called Manhattan, a desired group name of Manhattan Project Documents would be named %project% Project Documents.
If you want to populate your groups with template files, copy the files into the appropriate folders. As with the folder/group names, replace the project name with %project%. So, Manhattan Project Notebook.pages is saved as %project% Project Notebook.pages.
If you like changing the icons of files and groups in Devonthink (as I do) change the ones you want in your folder tree using the standard Finder method. I use 1024x1024 PNG files for this.
Back up to the en.lproj level and open the folder called Scripts. Inside, there is a single file called Main.scpt. Open this in the script editor. I wanted my top level group in DT to read Project: Manhattan (in this example). To do that, go to the line just above the last End Tell (just before the error handler) and change it to read:
set the name of theRecord to "Project: " & theProjectName
This step is not required if you’re OK with the top group being named simply Manhattan.
When you’re done, you can select New From Template > Project from within DT, it will ask for a project name, and will build your group structure substituting the name you gave it for %project% where ever you used it.
Now, two issues.
#1 - Don’t make the folder tree a copy of an existing structure you made in DT using File > Export > as Template. If you do that, DT puts a file called DEVONtech_storage in each folder that contains another folder or a file. The existence if the DEVONtech_storage file appears to break the %project% name substitution. I don’t know why, but you can fix it by deleting those files (or by creating your structure manually external to DT as I described).
#2 - Any icon I used for the top level folder/group of my project structure (only the top level, all others are fine) seemed to be shrunk by DT. This is a bad thing since the DT group icons are too small anyway. I found no solution to this other than going back to the default DT project icon (a box with a check mark)
I hope this helps someone.