hevy-mcp
AGENTS.md498 starsChanged 5 months agoMITView on GitHub
Use this file for agent decisions and project invariants. Read the relevant source below for implementation details; do not copy changing tool versions, command inventories, or release cascades into this file. 1. Inspect git status --short --branch and git worktree list. Preserve unrelated changes and other checkouts. 2. For an existing branch or PR, continue there. For new implementation work, fetch the intended base (normally origin/main) and create a feature branch in an isolated worktree. Read-only work needs no branch…
- Reads credentials
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.
Of the AGENTS.md files we read, the 11,773 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 repository12 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- build-mcpbSkill
- build-mcp-serverSkill
- code-reviewSkill
- diagnosing-bugsSkill
- improve-codebase-architectureSkill
- sentrySkill
- thermo-nuclear-code-quality-reviewSkill
- using-entireSkill
- wayfinderSkill
- hevy-cliSkill
- hevy-workoutsSkill
The file
Show its rules and text
We split this AGENTS.md into the rules it gives an agent
24 rules. About 3 are common, 11 are distinctive, and 10 are very specific to this project.
≈3
Common · estimate
Many files like this have a rule of this kind.
≈11
Distinctive · estimate
This author's own choices. Worth a look.
10
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
- Distinctive: line 3
Use this file for agent decisions and project invariants.
- Distinctive: line 14
Read the applicable sources, then inspect the exact code involved.
- Distinctive: line 20
Never reset, discard, or overwrite user changes.
- Very specific: line 38
Use mise's pinned Node, pnpm, and other tools for development commands: mise exec -- pnpm ..., mise exec -- node ..., or mise exec -- npx …
- Distinctive: line 40
Follow contributor setup and enable Lefthook in the working clone.
- Very specific: line 43
Prefer GitHub MCP for GitHub operations.
- Very specific: line 51
Read exact named files directly.
- Distinctive: line 57
Read .entire/graph-agent.md for graph-first discovery when the graph is available and useful.
- Distinctive: line 89
Before writing Effect code, read the installed Effect package's AGENTS.md completely and follow relevant links.
- Distinctive: line 91
If absent, use installed source and version-matched official documentation.
- Distinctive: line 92
Follow CONTRIBUTING's Effect control structure and existing Promise facades.
- Distinctive: line 108
Read tools require output schemas.
- Very specific: line 109
Use tools/register.ts, tools/define-tool.ts, ToolRuntime, the existing error policy, withErrorHandling, and safe diagnostics.
- Very specific: line 111
Add a co-located test. Input/output, registration, or compatibility changes also require a protocol regression through tools/list and …
- Very specific: line 113
Verify advertised canonical inputs, supported legacy inputs, and returned structuredContent against the declared schemas.
- Very specific: line 124
Never hand-edit packages/hevy-client/src/generated/.
- Very specific: line 135
Use .env or process environment for HEVY_API_KEY in local/live lanes.
- Common: line 136
Never commit real keys or expose them through arguments, URLs, logs, fixtures, screenshots, or errors.
- Distinctive: line 142
Do not deploy, publish releases, merge release PRs, or change repository settings unless the task or an authorized workflow permits it.
- Common: line 148
Keep stdio stdout reserved for MCP JSON-RPC and use the safe diagnostic path.
- Distinctive: line 160
Use named lanes instead of broad discovery or a parallel test harness.
- Very specific: line 161
Before opening a PR: run CONTRIBUTING's full required baseline, including boundary checks, and the checks specific to changed paths.
- Common: line 168
Never focus/disable tests, weaken assertions, or change checks to hide a failure.
- Very specific: line 174
Before every commit, classify the diff using CONTRIBUTING's release policy and topology propagation.
≈ “Common” is an estimate: at least 1 in 5 of the 16,595 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
Working in hevy-mcp
Use this file for agent decisions and project invariants. Read the relevant source below for implementation details; do not copy changing tool versions, command inventories, or release cascades into this file.
Start with the task
- Inspect
git status --short --branchandgit worktree list. Preserve unrelated changes and other checkouts. - For an existing branch or PR, continue there. For new implementation work,
fetch the intended base (normally
origin/main) and create a feature branch in an isolated worktree. Read-only work needs no branch or dependency install. - Read the applicable sources, then inspect the exact code involved. Install tools/dependencies only when execution requires them.
- Complete authorized work through validation and a reviewable result. Carry forward the user's corrections and existing authorization. Ask only for missing information that blocks progress or an action outside that scope.
Never reset, discard, or overwrite user changes. If a conflict risks those
changes, stop and explain it. Never commit/push to main or force-push without
explicit authorization. Use Conventional Commits and keep Git hooks enabled;
investigate hook failures rather than bypassing them.
Sources to consult
| Task | Source of truth |
| Setup, Node policy, required checks, release policy | CONTRIBUTING.md |
| Commands and pinned development tools | package.json, mise.toml |
| Workspace ownership, allowed imports, release propagation | repository/topology.json |
| Test selection | docs/test-lanes.md, repository/validation-lanes.json |
| Node transports and lifecycle | packages/node/README.md |
| Worker deployment, origins, authentication, OAuth | Cloudflare Worker section of CONTRIBUTING.md |
| Telemetry and collector integration | docs/observability.md, Worker version attribution |
| Generated API client | Generated API client section of CONTRIBUTING.md |
Use mise's pinned Node, pnpm, and other tools for development commands:
mise exec -- pnpm ..., mise exec -- node ..., or mise exec -- npx ....
Follow contributor setup and enable Lefthook in the working clone. Report
unavailable tooling; do not silently substitute system versions.
Prefer GitHub MCP for GitHub operations. Use an authenticated alternative such
as gh when the connector cannot perform the operation. If Git transport fails,
API publication may publish the validated commit without bypassing hooks or
required pre-push checks. Preserve the verified tree and commit where possible,
and update only the intended feature branch without forcing its ref.
Discover code efficiently
Read exact named files directly. Use focused rg searches and batch independent
reads; expand the search when imports, generated code, or sibling adapters make
the initial result incomplete. Verify findings against source.
<!-- entire-graph:begin -->Read .entire/graph-agent.md for graph-first discovery when the graph is available and useful. Read exact named files directly; fall back to targeted text search and focused source reads when graph retrieval is unavailable or inconclusive. Verify graph findings against source. @.entire/graph-agent.md
<!-- entire-graph:end -->Optional graph tooling must not block useful work. Treat missing graph results as inconclusive, not proof that code is absent.
Respect workspace boundaries
The root is a private orchestrator; runtime code belongs under packages/*.
| Workspace | Owns |
hevy-client | Runtime-neutral native-fetch client and generated API types/schemas |
operations | Runtime-neutral reusable Hevy domain operations |
core | Runtime-neutral MCP tools, prompts, resources, execution, and safe diagnostics |
node | Node server, lifecycle, transports, and telemetry |
worker | Cloudflare bindings, request handling, OAuth, and Worker configuration |
cli | Standalone Node command-line client |
operations depends on hevy-client; core depends on both. Adapters consume
these shared packages and do not import one another. Keep Node built-ins and
Cloudflare bindings out of shared runtime-neutral packages. Use topology-approved
exports; do not evade boundaries with private paths or duplicate implementations.
Apply the existing implementation contracts
Effect and boundary types
Before writing Effect code, read the installed Effect package's AGENTS.md
completely and follow relevant links. Resolve it from the affected workspace.
If absent, use installed source and version-matched official documentation.
Follow CONTRIBUTING's Effect control structure and existing Promise facades.
ToolDefinition.execute returns an Effect. Preserve typed errors, cancellation,
deadlines, and the existing execution boundary; do not add separate runners
inside tool implementations or convert unrelated Promise-based adapter code.
Infer handler arguments from schemas. Keep untrusted data unknown until
validated; do not bypass schemas with manual casts or any.
MCP changes
Tools live in packages/core/src/tools/. Follow ToolDefinition, including
kind, annotations, responseContract, and Effect-returning execute.
- Define Zod input shapes in the tool or
tools/input-schemas.ts; derive arguments usingInferToolParams<typeof schema>. - Reuse
protocol/response-contracts.tsandprotocol/output-schemas.ts. Read tools require output schemas; preserve declared write-tool schemas. - Use
tools/register.ts,tools/define-tool.ts,ToolRuntime, the existing error policy,withErrorHandling, and safe diagnostics. - Add a co-located test. Input/output, registration, or compatibility changes
also require a protocol regression through
tools/listandtools/call. - Verify advertised canonical inputs, supported legacy inputs, and returned
structuredContentagainst the declared schemas. Keep compatibility parsing separate from the advertised schema.
Preserve names, annotations, response contracts, and error behavior unless the
task changes them. Reuse the runtime contract matrix and adapter test lanes.
Measure token cost when descriptions/schemas materially change using
mise exec -- pnpm run measure:tokens.
Generated client
Never hand-edit packages/hevy-client/src/generated/. Change the OpenAPI source
or Kubb configuration and run mise exec -- pnpm run build:client against the
checked-in specification. Review the complete diff and run the contributor
checks, including check:openapi and check:generated.
Refresh upstream with openapi only for intentional API-contract updates.
Reproducible upstream corrections belong in scripts/codegen/openapi-spec.js.
Generated API functions and .kubb internals remain private.
Protect credentials and runtime behavior
Use .env or process environment for HEVY_API_KEY in local/live lanes.
Never commit real keys or expose them through arguments, URLs, logs, fixtures,
screenshots, or errors. Keep personal workout data and sensitive API responses
out of diagnostics and fixtures. Deterministic tests use fake credentials.
Credentials alone do not authorize live mutations. Use mocks for mutation tests; create/update/delete live Hevy records only when explicitly authorized. Do not deploy, publish releases, merge release PRs, or change repository settings unless the task or an authorized workflow permits it. Prepare and validate the concrete change before requesting any required final approval.
Ambiguous create outcomes must not trigger blind retries. Routine updates replace content: omitted exercises are not an unchanged partial update. Keep stdio stdout reserved for MCP JSON-RPC and use the safe diagnostic path. Preserve per-request Worker credential isolation.
Worker telemetry exports over OTLP to the project's own OpenTelemetry Collector. Downstream routing is infrastructure-owned; do not infer a deployed storage backend from example documentation. Domain-level Cloudflare tracing and Worker tracing have separate configuration. Distinguish available APIs from announced features before implementing telemetry changes.
Validate and finish
- Source changes: run the narrow relevant deterministic lane and the unit suite. Use named lanes instead of broad discovery or a parallel test harness.
- Before opening a PR: run CONTRIBUTING's full required baseline, including
boundary checks, and the checks specific to changed paths. After MCP SDK
upgrades, inspect
packages/node/src/utils/stdio-observability.tsand run the stdio lane. - Documentation-only changes: check formatting, relative links, and consistency with source. Do not invent runtime tests for prose; required hooks and PR checks still apply.
- Never focus/disable tests, weaken assertions, or change checks to hide a failure. Keep credential-gated lanes explicit. Distinguish failures, blocked checks, and unrun checks from successful validation.
- Tests must not invoke Git or mutate repositories, Git configuration, or Git identities. Use pure logic and ordinary filesystem fixtures.
Before every commit, classify the diff using CONTRIBUTING's release policy and
topology propagation. Stage the required Changeset and run
mise exec -- pnpm run check:changeset. Empty Changesets are allowed only when
the entire PR is no-release; do not pair one with a release trigger. Worker
configuration changes require Worker release coverage. Do not merge the
automated version PR just because implementation is complete.
Inspect hook formatting changes and exclude unrelated churn. Finish with the
intended diff, synchronized generated output where applicable, and
git status --short --branch. Report what changed, validation, remaining limits,
and the review link or local result. Never claim an unrun check or unverified
live deployment succeeded.
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.

