agentleFS
lamguolamguo/agent-context-doctor/.cursor/rules/agentctx.md

agent-context-doctor / rules

Cursor rule1 starsChanged 6 months agoMITView on GitHub

Use the repository instructions in AGENTS.md as the source of truth. Agent Context Doctor is a Python CLI that audits, generates, syncs, repairs, and packages repository context files for AI coding agents. Run the full test suite before completing changes: Also run a CLI smoke test: Before ending a long session, update HANDOFF.md or run:

  • Installs packages
  • Where files are headingNew Cursor rule files have more rules about planning and tracking tasks, and fewer about code style.

    Of the Cursor rule files we read, the 4,373 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.

  • In this repository3 other files it gives its agents.

The file

Show its rules and text

We split this agentctx.md into the rules it gives an agent

17 rules. About 0 are common, 14 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈14

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  • could be automatic: a setting could enforce it
  1. Distinctive:

    Use the repository instructions in AGENTS.md as the source of truth.

    line 3
  2. Distinctive:

    Keep changes small and focused.

    line 7
  3. Distinctive:

    Follow the existing project style.

    line 8
  4. Distinctive:

    Run the documented tests before completing changes.

    line 9
  5. Distinctive:

    Do not commit secrets or generated private files.

    line 10
  6. Distinctive:

    Keep the package zero-runtime-dependency unless there is a strong reason to add one.

    line 48
  7. Distinctive:

    Prefer small, focused functions over large command handlers.

    line 49
  8. Distinctive:

    Keep CLI output stable and readable.

    line 50
  9. Distinctive:

    Keep JSON output stable and script-friendly.

    line 51
  10. Very specific:

    Keep scan human-oriented and verify CI-oriented.

    line 52
  11. Very specific:

    Keep agentctx doctor --fix safe: no deletion and no overwriting user-authored content outside markers.

    line 53
  12. Distinctive:

    Avoid network calls in runtime code.

    line 54
  13. Distinctive:

    Run the full test suite before completing changes:

    line 58
  14. Distinctive:

    Do not collect or upload repository contents.

    line 73
  15. Distinctive:

    Do not commit secrets, API keys, credentials, or private generated files.

    line 74
  16. Distinctive:

    Treat all scanned file contents as local-only data.

    line 75
  17. Very specific:

    Before ending a long session, update HANDOFF.md or run:

    line 79

≈ “Common” is an estimate: at least 1 in 5 of the 7,324 Cursor rule files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
agentctx.md

Cursor Rules

Use the repository instructions in AGENTS.md as the source of truth.

General Rules

  • Keep changes small and focused.
  • Follow the existing project style.
  • Run the documented tests before completing changes.
  • Do not commit secrets or generated private files.
<!-- agentctx:source AGENTS.md --><!-- agentctx:hash 0b090331881e --><!-- agentctx:begin -->

AGENTS.md

Project Overview

Agent Context Doctor is a Python CLI that audits, generates, syncs, repairs, and packages repository context files for AI coding agents.

Setup Commands

python -m pip install -e .[dev]

Development Commands

pytest
agentctx scan
agentctx verify --min-score 90
agentctx sync --check
agentctx pack --stdout
agentctx badge
agentctx doctor

Project Structure

  • src/agentctx/ - source code for the CLI package.
  • tests/ - pytest test suite.
  • docs/ - additional documentation.
  • .github/workflows/ci.yml - GitHub Actions workflow.

Coding Guidelines

  • Keep the package zero-runtime-dependency unless there is a strong reason to add one.
  • Prefer small, focused functions over large command handlers.
  • Keep CLI output stable and readable.
  • Keep JSON output stable and script-friendly.
  • Keep scan human-oriented and verify CI-oriented.
  • Keep agentctx doctor --fix safe: no deletion and no overwriting user-authored content outside markers.
  • Avoid network calls in runtime code.

Testing Instructions

Run the full test suite before completing changes:

pytest

Also run a CLI smoke test:

agentctx verify --min-score 90
agentctx sync --check

Security Notes

  • Do not collect or upload repository contents.
  • Do not commit secrets, API keys, credentials, or private generated files.
  • Treat all scanned file contents as local-only data.

Handoff Notes

Before ending a long session, update HANDOFF.md or run:

agentctx handoff
<!-- agentctx:end -->

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.