agentleFS
dspace-groupdspace-group/SystemDeskMCP/AGENTS.md

SystemDeskMCP

AGENTS.md3 starsChanged 15 days agoApache-2.0View on GitHub

Python MCP server (FastMCP, stdio) that automates dSPACE SystemDesk via its COM interface (pywin32). Windows only. See README.md for user-facing setup and usage. Use uv for everything; do not use pip directly. When adding or changing a tool, follow Extending the Server in the README. Tool modules are imported explicitly in tools/__init__.py. Add new domain modules to its imports and __all__; no server imports or re-exports are needed. Adding tools to an already imported module requires no registration changes. Shared…

  • Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.

    Of the AGENTS.md files we read, the 31,774 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 repositoryOne other file it gives its agents.

The file

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

7 rules. About 0 are common, 1 is distinctive, and 6 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 6

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Use uv for everything; do not use pip directly.

    line 20
  2. Distinctive:

    When adding or changing a tool, follow Extending the Server in the README.

    line 31
  3. Very specific:

    Use the autouse app fixture (a MagicMock installed as runtime._application).

    line 38
  4. Very specific:

    Import tools from their owning modules and call them directly with keyword arguments, e.g.

    line 39
  5. Very specific:

    Add schema tests for new input constraints to the owning domain's test module under tests/tools/, using pytest.raises(ValidationError) …

    line 41
  6. Very specific:

    Keep tool behavior and constraint tests together under tests/tools/.

    line 42
  7. Very specific:

    Use tmp_path for any files.

    line 43

≈ “Common” is an estimate: at least 1 in 5 of the 40,246 AGENTS.md 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
AGENTS.md

AGENTS.md

Python MCP server (FastMCP, stdio) that automates dSPACE SystemDesk via its COM interface (pywin32). Windows only. See README.md for user-facing setup and usage.

Layout

  • src/systemdesk_mcp/server.py: imports the tools package and starts the stdio server.
  • src/systemdesk_mcp/mcp_app.py: shared FastMCP instance and instructions.
  • src/systemdesk_mcp/runtime.py: sole owner of COM state, worker thread, timeouts, and cleanup; also provides tool invocation logging.
  • src/systemdesk_mcp/common.py: shared errors, responses, and input constraints.
  • src/systemdesk_mcp/tools/: domain-specific tool implementations. Domain helpers stay alongside their tools; tool modules never import server.py.
  • tests/: tool behavior and constraint tests and server integration contracts; COM is mocked, no SystemDesk needed.
  • tests/tools/: package for domain-specific tool behavior tests; inherits the parent COM fixture.
  • tests/conftest.py: shared autouse COM application fixture with automatic state restoration.
  • tests/helpers.py: shared argument validation helpers.
  • .github/skills/smoke-test/SKILL.md: end-to-end smoke test against a real SystemDesk installation (requires a license).

Commands

Use uv for everything; do not use pip directly.

uv sync --extra dev        # install runtime + dev dependencies
uv run pylint src tests    # lint (must pass, CI runs this)
uv run pytest              # unit tests (must pass, CI runs this)
uv run pytest --cov=systemdesk_mcp

Tool conventions

When adding or changing a tool, follow Extending the Server in the README.

Tool modules are imported explicitly in tools/__init__.py. Add new domain modules to its imports and __all__; no server imports or re-exports are needed. Adding tools to an already imported module requires no registration changes. Shared helpers and constraints have public names; module implementation details remain underscore-prefixed.

Testing conventions

  • Arrange / act / assert structure with comments.
  • Use the autouse app fixture (a MagicMock installed as runtime._application); set runtime._application = None to simulate "not started".
  • Import tools from their owning modules and call them directly with keyword arguments, e.g. autosar.validate_autosar(output_format=autosar.ValidateOutputFormat.JSON). Direct calls skip Pydantic validation.
  • Assert on status, error_type, and error_code, not just messages.
  • Add schema tests for new input constraints to the owning domain's test module under tests/tools/, using pytest.raises(ValidationError) around validate_args(<module>.<tool>, ...), imported from tests.helpers. Shared valid and invalid absolute-path examples also live in tests.helpers.
  • Keep tool behavior and constraint tests together under tests/tools/. Keep all-tools schema contracts, cross-module workflows, and MCP calls in tests/test_server.py. Never import helpers from another test module or directly from conftest.py.
  • Use tmp_path for any files; do not write outside it.

Gotchas

  • SystemDesk is started with BatchMode = True to suppress dialogs; modal dialogs still cause transient BLOCKED_BY_DIALOG failures.
  • On timeout the COM call keeps running on the single worker thread; subsequent calls queue behind it.
  • The package version comes only from version in pyproject.toml; __version__ reads it from installed metadata, so run uv sync after bumping. The server re-exports the package version.
  • Versioning, API review, and releases follow MAINTAINERS.md.

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.