How to Add Writing Ideas to a Document

This is one way to do it:
template.typ
create-note() is a function that returns a function. The returned function will be used in main.typ.

#let create-note(visible) = (body) => if visible {body}

main.typ
Use the create function from the template to define a local note() function which can be used in this document.

#import "template.typ": create-note

#let note = create-note(true)

#lorem(10)
#note(text(red)[This is a note.])
#lorem(10)

One side benefit of doing it this way is you can have different types or categories of notes. You would define multiple functions within main.typ each with their own visibility setting, then it would be possible to select which category of notes are visible.
For instance if multiple people add notes they could each have their own function:

/*main.typ*/
//Only notes from Alice will be visible
#let note-alice  = create-note(true)
#let note-bob = create-note(false)
#let note-claire = create-note(false)
1 Like