Settings

Theme

Agents.md may trick us into writing better docs

blog.kilocode.ai

28 points by justiceforsaas 7 months ago · 5 comments

Reader

blitzar 7 months ago

I recently added some big, beautiful and detailed doc strings to the code in one of my python projects. The files are now 2-3x in line count and my token usage is off the charts.

We might need new ways to document code.

  • mvanbaak 7 months ago

    Please dont stop documenting code because of tokens used. comments are meant to be read by developers, not machines. Simply dont feed the comments to the machine if you worry about tokens.

    trust me, the future you will thank you

  • becomevocal 7 months ago

    I found that too, so I updated to putting limited comments at the beginning of core files that: - Describe what the file contains (e.g. endpoints for x with their route names) - Links to docs that are also in the repo (e.g. bruno files for those endpoints)

    The core agent files links out to architectural and product decisions as well (i have a /docs folder for them)

    This works better for me and I can get a good result when asking to make sure docs are updated whenever changes are made

    • mvanbaak 7 months ago

      if the machine doesn't need the comments, dont feed them to the machine. simple

two_handfuls 7 months ago

I hope so.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection