ConventionSometimes it is useful to document connections between related pieces of code. Any text of the form This is better than using file paths and line numbers, because when the code moves around, the links don't break. As an added benefit, the links are symmetric, so you get back-links for free. And there can be more than two pieces connected by a single ID. There is a VSCode extension that helps with using this convention. ApplicationsDuplication is cheaper than the wrong abstraction. But it still has costs:
Having a low-friction way to document connections mitigates both. Guilt-free copy-pastingImplement the feature now, add a Up-to-date documentationUse anchors to link code to related docs. When somebody changes the code in the future, they'll see that the doc exists elsewhere and maybe even go out of their way to update it. Synchronizing alien stacksFor example, the list of application routes can be present both in a switch statement in VSCode extension featuresNavigation.
CodeLens shows other occurrences; click to jump.
Searches the whole workspace and respects
ID generation.
Code completion after
Agent instructionsCopy this to your
|

