agentleFS
afaraha8403afaraha8403/mental/.cursor/rules/release.mdc

mental / rules

Cursor rule5 starsChanged yesterdayMITView on GitHub

Git tag vX.Y.Z, package.json, and the published npm version must be the same string.

We split this release.mdc into the rules it gives an agent

4 rules. About 0 are common, 0 are distinctive, and 4 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 4

    Very specific

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

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

    Commit on main (prod) or staging (beta X.Y.Z-beta.N)

    line 14
  2. Very specific:

    Keep Claude/Copilot copies of this rule in sync: .claude/rules/release.md, .github/copilot-instructions.md.

    line 31
  3. Very specific:

    Put version on .claude-plugin/marketplace.json plugin entries

    line 36
  4. Very specific:

    Use MENTAL_SKIP_HOST_PLUGIN_CHECK outside tests

    line 39

≈ “Common” is an estimate: at least 1 in 5 of the 6,350 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
release.mdc
---
description: Git tag vX.Y.Z, package.json, and the published npm version must be the same string.
alwaysApply: true
---

# Release versions (lockstep)

`package.json` `version` is source of truth. Git tag is `v` plus that string. npm must publish that same string. A GitHub Release is not done until `npm view @balacode/mental version` equals it.

## Before tagging

1. `node scripts/bump-version.mjs X.Y.Z` then `node scripts/bump-version.mjs --check`
2. Cut CHANGELOG `[Unreleased]` into `## [X.Y.Z] - YYYY-MM-DD`
3. Commit on `main` (prod) or `staging` (beta `X.Y.Z-beta.N`)
4. Tag **only** `vX.Y.Z` (or `vX.Y.Z-beta.N`). Never a tag that does not equal `package.json`.

## After GitHub Release

`.github/workflows/release.yml` publishes with `secrets.NPM_TOKEN` as `NODE_AUTH_TOKEN`. Watch the `Release` workflow, then:

```bash
npm view @balacode/mental version
```

That output **must** equal `package.json` (no `v`). If publish skipped or failed, the release is not done. Do not cut a new tag to “fix” npm — fix the workflow and `workflow_dispatch` (tag `v$(package.json version)` must already exist).

## Site deploy (Cloudflare)

https://getmental.dev is the Worker in `website/`. Production deploys go through GitHub, not a laptop. `.github/workflows/deploy-website.yml` runs `wrangler deploy` when `website/` changes on `main`, when a GitHub Release is published, or on `workflow_dispatch`. It uses `secrets.CLOUDFLARE_API_TOKEN` and `secrets.CLOUDFLARE_ACCOUNT_ID`. A release is not a site deploy until that workflow succeeds.

Keep Claude/Copilot copies of this rule in sync: `.claude/rules/release.md`, `.github/copilot-instructions.md`.

## Do not

- Ship a git tag whose npm version differs
- Put `version` on `.claude-plugin/marketplace.json` plugin entries
- Print or commit `NPM_TOKEN`, `CLOUDFLARE_API_TOKEN`, or `CLOUDFLARE_ACCOUNT_ID`
- `npm publish` or `wrangler deploy` the production site from a laptop
- Use `MENTAL_SKIP_HOST_PLUGIN_CHECK` outside tests

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.