DEV Community

Alexey Elizarov
Alexey Elizarov

Posted on

Docs Index feature for your Cursor

Demo

Is your Cursor agent losing track of your project?

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
Enter fullscreen mode Exit fullscreen mode

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

👉 https://github.com/beautyfree/cursor-docs-hook

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

Top comments (0)