r/coding • u/Pretty-Skill925 • Apr 28 '26
@agent — inline annotations to make cross-project relationships explicit for AI agents
https://github.com/codebasedlearning/agent-annotations-spec.git
0
Upvotes
3
u/klaxxxon Apr 28 '26
Shouldn't these be just regular human friendly comments? It's already becoming clear that AIs benefit greatly from well commented code. The structure of these relationships should be outlined in agents.md, and comments should do the rest. Don't want to pollute my code with more unnecessary crap
1
u/hennell Apr 28 '26
This should already have a comment though. Humans might have hard won context, but they move on or forget stuff. A comment above dependent code is pretty standard if there's no way to combine it into one place.
It should have a test as well, even if the test just confirms the structure of the object. People can miss comments, but a failing test has to be dealt with.
Not sure why if you've already failed to either of those you would remember to do this.
But in the spirit of more helpful feedback, what happens if you reuse a tag? Or misspell one? Does it start syncing stuff that makes no sense, or recognise the obvious problem?
1
u/ultrathink-art Apr 28 '26
The gap isn't comment quality — it's explicit relationship graphs. Regular comments explain why code exists; agent annotations map cross-system relationships that no human ever documents because they're obvious in context: which service owns which data, which API contract is authoritative, which schema wins on conflict. Humans keep that model in their heads. Agents don't have one.