agentleFS
gianlucamazzagianlucamazza/emotional-memory/.claude/skills/release-gate/SKILL.md

release-gate

Skill9 starsChanged 6 months agoMITView on GitHub

Run the pre-publish validation gate for a new release. Use before `make publish` or Zenodo deposit. Takes a version argument, runs make release-check, validates CHANGELOG [Unreleased] is non-empty, verifies version strings align, and previews the Zenodo metadata sync.

  • Commits and pushes

10 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

3 rules. 0 are common, 2 are distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 7 edited versions we read keep these.

  • 2

    Distinctive

    This author's own choices. Worth a look.

  • 1

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Do not proceed until all gates pass.

    line 28
  2. Distinctive:

    Run the canonical version scripts:

    line 36
  3. Very specific:

    Read CHANGELOG.md. The ## [Unreleased] section must contain at least one bullet under ### Added, ### Changed, or ### Fixed.

    line 53

“Common” is measured: kept by at least 6 in 10 of the 7 edited versions of this file we could read. “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
SKILL.md

Release Gate

Argument: $version (e.g. 0.7.0).

Never run make publish or make zenodo-draft before this skill exits PASS.

Validates the full pre-publish state before touching PyPI or Zenodo.

Steps

1. Full make release-check

make release-check VERSION=$version

This runs: lint + typecheck + test + test-llm + bench-appraisal + preflight.

On failure: stop. Report which gate failed and what the error message was. Do not proceed until all gates pass.

2. Version string consistency

The canonical version source is pyproject.toml ([project] version). src/emotional_memory/__init__.py resolves __version__ dynamically via importlib.metadata — do not grep it for the literal version string.

Run the canonical version scripts:

uv run python scripts/resolve_version.py
uv run python scripts/check_release_metadata.py
uv run python scripts/check_metadata_ssot.py

resolve_version.py must print exactly $version. check_release_metadata.py validates pyproject.toml + CHANGELOG heading. check_metadata_ssot.py validates CITATION.cff, codemeta.json, and .zenodo.json against pyproject.toml as SSOT.

Any mismatch = FAIL. Fix with make bump VERSION=$version then re-run.

3. CHANGELOG [Unreleased] non-empty

Read CHANGELOG.md. The ## [Unreleased] section must contain at least one bullet under ### Added, ### Changed, or ### Fixed.

Empty [Unreleased] = FAIL. The changelog entry must be written before release.

4. Release metadata consistency

make meta-check-local

Validates DOI, authors, and citation metadata are internally consistent.

5. Zenodo metadata preview (dry run)

make sync-release-metadata

Show what metadata would be deposited. Does not create or update any Zenodo deposition — review the output before proceeding.

Next steps (printed on PASS)

All gates passed. Ready to publish v$version.

  1. Build and publish to PyPI:
       make dist
       make publish              # or: make publish-pypi-manual

  2. Verify PyPI release (poll until visible):
       make verify-pypi-release VERSION=$version

  3. Create Zenodo draft and review:
       make zenodo-draft         # review in Zenodo UI before publishing

  4. Publish Zenodo deposition:
       make zenodo-publish DEPOSIT_ID=<id from zenodo-draft output>

  5. Push HF Space:
       make release-space

  6. Tag and push:
       git tag v$version
       git push origin v$version

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.