The Inform 7 Documentation and Resources sticky post has a selection of games with published source code. And, of course, there’s plenty more I7 code to consult in the Friends of I7 extensions repo.
I’ve got the above and the examples from the docs and more all under one directory; a script to search for text in them is one of my go-to’s to check syntax.