Hey Saxon, by saying top-level comp, you mean some particular comp in the project panel root, or all comps in the root?
Its possible, logic would be according these lines:
1. Loop through all items in the project panel.
2. Check if that item is 'composition' type.
3. Check if that item doesn't have parentFolder attached.
4. Do necessary actions with found comp (add marker & comment)
It might be possible to loop through 'root' items only, but not sure and can't check it atm. Cheers!
Find out more:
After Effects Tutorials: motion design, expressions, scripting.
Boxer - Dynamic Text Boxes Template with a Live Preview