by diwank · 1y ago · 0 comments
But, there are a few nuggets we figured are worth sharing, like Anchor Comments [1], which have really made a difference:
——
# CLAUDE.md
### Anchor comments
Add specially formatted comments throughout the codebase, where appropriate, for yourself as inline knowledge that can be easily `grep`ped for.
- Use `AIDEV-NOTE:`, `AIDEV-TODO:`, or `AIDEV-QUESTION:` as prefix as appropriate.
- *Important:* Before scanning files, always first try to grep for existing `AIDEV-…`.
- Update relevant anchors, after finishing any task.
- Make sure to add relevant anchor comments, whenever a file or piece of code is:
* too complex, or
* very important, or
* could have a bug
——[1]: https://diwank.space/field-notes-from-shipping-real-code-wit...
As a very experienced engineer who uses LLMs sporadically* and not in any systematic way, I really appreciated seeing how you use them in production in a real project. I don’t know why people are being negative, you just mentioned your project in details where it was appropriate to talk about the structure of it. Doesn’t strike me as gratuitous self promotion at all.
Your post is giving me motivation to empower the LLMs a little bit more in my workflows.
*: They absolutely don’t get the keys to my projects but I have had great success with having them complete specific tasks.
Hi, AI skeptic with an open-mind here. How much will this cost me to try? I don't see that mentioned in your writeup.
I admit I have no idea what the real differences are. Everybody seems to claim to be the best and most comprehensive AI coding solution.
One thing I would have liked to know is the difference between a workflow like this and the use of aider. If you have any perspective on that, it would be great.
You mentioned that LLM should never touch tests. Then followed up with an example refactoring changing 500+ endpoints completed in 4 hours. This is impressive! I wonder if these 4 hours included test refactoring as well or it is just prompting time?
And regarding the HN post getting buried for a while there...[1] Somewhat ironic that an article about using AI to help write code would get canned for using an AI to help write it :D
here's the original chat: https://chatgpt.com/share/6844eaae-07d0-8001-a7f7-e532d63bf8...
I also used bits from claude research but apparently if you use claude research, they don't let you create a share link -_-
I recently wrote a long Markdown document, and asked Claude, ChatGPT, Grok, and Gemini to improve it.
Comparing outputs, it was very close between Gemini and Claude, but I decided that Claude was slightly better-written.
1. Add instructions in CLAUDE.md to not touch tests.
2. Disallow the Edit tool for test directories in the project’s .claude/settings.json file
I meant though in the wider context of the team - everyone uses it but not everyone will work the same, use the same underlying prompts as they work. So how do you ensure everyone keeps to that agreement?
There's nothing specific to using Claude or any other automation tool here. You still use code reviews, linters, etc. to catch anything that isn't following the team norms and expectations. Either that or, as the article points out, someone will cause an incident and may be looking for a new role (or nothing bad happens and no one is the wiser).