General suggestions from M.B. regarding the construction of templates
1) When in doubt, go step by step. Start with VERY SIMPLE templates -- perhaps just exporting the name of the note. Add complexity step by step. If you find the results unexpected or confusing, simplify again! Then step back, figure out why the unexpected was happening, and move forward.
2) Set the default template (Document Preferences) to something simple, safe, and small.
3) From time to time, make a copy of everything-- Tinderbox documents and templates. Consider putting it on a CDR. That way, you can easily go back and see how something used to work.
4) Don't be afraid to experiment with different approaches. Sometimes, you might not know whether it's best to use an agent or a container. Sometimes, you might think of using an attribute, and then you might realize that you could do the same thing with links. Tinderbox gives you lots of ways to do things; you're first approach might not be the best.
5) Before you start to do something really boring and repetitious, stop and think: is there a way to do this automatically with an agent? Do you really have to do it at all? Try it on a small scale, make sure it works.