Docs Index feature for your Cursor

Is your Cursor agent losing track of your project?

(A hackneyed topic that I have already tried to solve, but this time a more technological approach)

The bigger your codebase, the more often the agent goes “out of context”: it forgets where things are, mixes up modules, or suggests outdated solutions. Cursor doesn’t have a built-in mechanism to keep project architecture context up to date — so I added one.

cursor-docs-hook — a rule + hook in a single package.

  • Rule: tells the agent to create and use docs/INDEX.md and module-level INDEX.md files as a project map — read them to get an overview of structure, module purposes, and where to find things. One entry point instead of scattered files.
  • Hook: tracks which files Cursor changed during a run. When Cursor finishes and changes were made, the hook runs cursor-agent in the background and updates docs/INDEX.md and module-level INDEX.md. The context the agent reads and maintains stays in sync with the code, so it doesn’t lose orientation as the project grows.

One command installs both rule and hook together:

npx cursor-hook install beautyfree/cursor-docs-hook

If you use Cursor in growing projects — give it a try.

:backhand_index_pointing_right: GitHub - beautyfree/cursor-docs-hook: Cursor Agent hook so project documentation stays consistent after edits.

P.S. Your GitHub stars and sharing among Cursor users is a great way to say thanks​:sparkles: