MSMCP
AGENTS.md1 starsChanged 24 days agoMITView on GitHub
- Zed agent — the in-editor agent. Makes changes here, runs the local gate, and keeps its own conversation in Zed. - Hermes agent — runs locally from this repository. It reads AGENTS.md from the working directory only (parent and subdirectory copies are ignored), so run it from the repo root for these rules to bind. It carries its own persistent memory and skills across sessions. Work lanes — use the right one rather than duplicating: - Independent review is…
- Commits and pushes
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,700 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 repository6 other files it gives its agents.
- add-mcp-toolSkill
- data-referencesSkill
- instrument-class-defaultsSkill
- ms-data-ingestionSkill
- quality-gateSkill
- security-boundarySkill
The file
We split this AGENTS.md into the rules it gives an agent
9 rules. About 0 are common, 6 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈6
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
- Distinctive: line 50
Add tests for behavioural changes.
- Distinctive: line 51
Do not silently change mzML/MGF semantics.
- Distinctive: line 52
Do not invent mzML metadata.
- Distinctive: line 57
Run relevant tests after modifications.
- Distinctive: line 58
Run ruff and type checking before declaring a task complete.
- Distinctive: line 67
Create one per task, based on the integration branch:
- Very specific: line 104
If the shell exports VIRTUAL_ENV from the primary checkout, uv run reports that it "does not match the project environment path" and …
- Very specific: line 108
Remove when done: git worktree remove .worktrees/<name>, then delete the branch.
- Very specific: line 127
If git push fails with could not read Username, the credential helper is not wired up for a non-interactive shell.
≈ “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.
Files
MSMCP Development Instructions
Project
Mass spectrometry data MCP server.
Agent coordination
This repository is worked on by two agents at once, and this file is the shared contract between them. Keep it accurate — both read it.
- Zed agent — the in-editor agent. Makes changes here, runs the local gate, and keeps its own conversation in Zed.
- Hermes agent — runs locally from this repository. It reads
AGENTS.mdfrom the working directory only (parent and subdirectory copies are ignored), so run it from the repo root for these rules to bind. It carries its own persistent memory and skills across sessions.
Work lanes — use the right one rather than duplicating:
- Independent review is the user-typed
/reviewlane (gpt-6-luna); it snapshots the last ten messages and treatsskills/as binding, so aim it at the end of a work block, before the diff scrolls out. Hermes' automatic background review only adds memory entries and is not a verification step. - Multi-file or risky work gets a written plan first (
/plan→.hermes/plans/). - Hermes runs scheduled sweeps via cron with
workdirset to the repo root, and does isolated edits in git worktrees; it never forks, opens PRs/issues, or publishes a release without explicit approval. delegate_taskchildren are not a verification lane — they share the parent's blind spots.- Coordinate before editing paths the other agent may be touching, and run the gate on the combined tree after any merge.
History: Hermes sessions live in ~/.hermes/state.db (per-profile under
~/.hermes/profiles/<name>/); Zed conversations in
~/Library/Application Support/Zed/threads/threads.db. Neither agent has a verified
reader for the other's store, so pass context across explicitly.
Coordination notes for this project live in ~/Hermes/Projects/MSMCP/README.md. To let
Hermes call this server's tools, register it under mcp_servers in
~/.hermes/config.yaml (uv run --project <repo> msmcp) and restart it.
Python
- Python 3.12+
- pytest
- ruff
- basedpyright
- uv
Engineering
- Prefer typed interfaces.
- Preserve public APIs unless explicitly changing them.
- Add tests for behavioural changes.
- Do not silently change mzML/MGF semantics.
- Do not invent mzML metadata.
- Validate external data at boundaries.
Workflow
- Inspect existing implementation before editing.
- Run relevant tests after modifications.
- Run ruff and type checking before declaring a task complete.
- Keep changes focused.
Isolated worktrees
Risky or parallel work happens in a linked worktree, never in a checkout that holds someone else's uncommitted changes. Each worktree is an independent checkout with its own environment.
Create one per task, based on the integration branch:
git worktree add .worktrees/<name> -b <branch> origin/mainSync its environment before running any tool. Each worktree gets its own
.venv; without this stepuv run pytest(and ruff/mypy) can fall back to the active environment from another checkout and import the wrongmsmcp:uv sync --extra dev --offlineConfirm the import resolves to this worktree, not another checkout:
uv run python -c "import msmcp; print(msmcp.__file__)"It must print the worktree's own
src/msmcp/__init__.py.This is enforced, not just advised.
tests/conftest.pyfails the whole run at import time ifmsmcp,pytest, or the running interpreter (sys.prefix) resolve outside this checkout's.venv. A test run that exercises one revision while importing another is a reproducibility hazard, so it is a hard error with an actionable message rather than a silent pass. The three must agree:uv run python -c "import msmcp, pytest, sys; print(msmcp.__file__); print(pytest.__file__); print(sys.prefix)"sys.prefix(notsys.executable) is checked: uv symlinks.venv/bin/pythonto its managed interpreter, sosys.executablecan report the base path even when the venv is active.- If the shell exports
VIRTUAL_ENVfrom the primary checkout,uv runreports that it "does not match the project environment path" and ignores it — that is expected.unset VIRTUAL_ENVif a tool still resolves to the wrong checkout. - Remove when done:
git worktree remove .worktrees/<name>, then delete the branch..worktrees/is gitignored.
These two commands are the whole procedure. A make target was considered and
deliberately not added: the real failure mode is environment resolution, not
worktree creation, so the sync step should stay visible rather than be hidden
behind a target.
Gate and pushing
- Gate:
make lint->make test->make eval, mirrored by.github/workflows/ci.yml.make testis the fast unit loop;make evalruns the evaluation notebook end to end and is the slow one.make allchains the whole pipeline, andmake formatis the one that writes. Full detail is inREADME.md. make validate-similarityis the opt-in scientific validation (it needs an external MassBank dataset viaMSMCP_VALIDATION_DATAand suppliesmatchmsfor that one command). It is deliberately not part of the gate, keeps both the runtime and the fast suite free ofmatchms, and skips cleanly when the dataset is absent. SeeSCIENTIFIC_VALIDATION.mdandVALIDATION_SIMILARITY.md; a passing unit suite is not scientific validation.If
git pushfails withcould not read Username, the credential helper is not wired up for a non-interactive shell. Supply it explicitly for that one command:git -c credential.helper= -c credential.helper='!gh auth git-credential' push origin <branch>
Skills
skills/holds agent playbooks for this project, version-controlled with the code.- See
skills/README.mdfor the layout and the conventions.
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
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.

