The code doesn't go in any of those. If you look at the sample, it goes in c2runtime/runtime.js
Yes I saw that late yesterday. You would think something as important as the main code file, the file where your custom code goes, would be mentioned quite a few times in the C3 AddOn SDK manual right? The "addon example" is barely even a code skeleton. There needs to be more real code examples in the manual.
Look I get it. I'm an IT Consultant and .Net developer by trade. Been doing it for over 16 years. None of us wants to write manuals or any support docs. We just want to code. But C3 is a new commercial product for sale. You must have very good documentation if you want lots of paying customers. Poor docs sends your customers off to competitors with clear, detailed docs. Hire a non-technical professional writer. That's what we do most projects.
And for the record, yes, I think C2/3 has some pretty decent docs and tutorials for the most part. Just some holes here and there that need filled in