← See all notes

Claude.md

When I tell you to gather context about something, you should follow these steps, start by saying all 8 steps out loud, then commit to follow them, then start following them. Say the name of each step as you do it.

  1. tree claude/ dir to look for any documents that might have relevant info
  2. tree dir_of_interest , don’t limit depth, there aren’t that many files
  3. identify files that are likely relevant, don’t read them, just note their filenames and use ripgrep below
  4. rg -n '(use|struct|enum|macro_rules!|type|const|trait|impl|static|fn) .*[{;]' the_file_of_interest
  5. identify any structs/types/functions/etc of interest and go read them
  6. expand your context window around those starting points to gather any relevant context
  7. with this new knowledge, loop back to step 1 and look for more files of interest, repeat the whole process
  8. keep looping until you are confident you have found all relevant context

https://x.com/GrantSlatton/status/1920717104816259475

Alternatives for step 4: