agentleFS
Microsoft AzureKnown publisherAzure/typespec-azure/.github/skills/typespec-python-release/SKILL.md

typespec-python-release

Skill27 starsChanged 2 years agoMITView on GitHub

Release @azure-tools/typespec-python after updating @typespec/http-client-python. Use when: preparing, publishing, or creating a PR for a TypeSpec Python emitter release.

  • Deletes or force-pushes
  • Installs packages
  • Commits and pushes

The file

Show its rules and text

We split this skill into the rules it gives an agent

23 rules. About 0 are common, 15 are distinctive, and 8 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈15

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 8

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Run every command from the repository root.

    line 12
  2. Very specific:

    Use the current date in YYYY-MM-DD format for the branch name.

    line 13
  3. Distinctive:

    Do not overwrite an existing branch.

    line 15
  4. Very specific:

    Create the publish branch from the clean, updated origin/main checkout using the current date:

    line 29
  5. Distinctive:

    If the branch already exists locally or remotely, stop and ask the user whether to reuse it or choose another date.

    line 36
  6. Distinctive:

    Read the latest published version from npm:

    line 40
  7. Very specific:

    Verify the edited lower bound equals $latest_http_client_python.

    line 52
  8. Distinctive:

    Run Chronus for only the Python emitter:

    line 57
  9. Distinctive:

    Read the package version again.

    line 63
  10. Distinctive:

    If Chronus did not change it:

    line 64
  11. Very specific:

    Add this entry immediately below # Release in packages/typespec-python/CHANGELOG.md.

    line 66
  12. Very specific:

    If the manual fallback was used, confirm the final package version is exactly one patch version above the recorded version.

    line 74
  13. Very specific:

    Update dependencies and pnpm-lock.yaml:

    line 78
  14. Distinctive:

    Verify the release includes only expected files:

    line 85
  15. Distinctive:

    Stop and investigate before committing if other packages were versioned or unrelated files changed.

    line 92
  16. Very specific:

    Read the final version from packages/typespec-python/package.json and use it as <version> below.

    line 96
  17. Very specific:

    Create a pull request targeting main from publish/python-${release_date} with this exact title and an empty body:

    line 110
  18. Distinctive:

    Verify the created pull request has the expected title and an empty body:

    line 116
  19. Distinctive:

    After the pull request is created, review the complete release run: commands executed, command output, manual interventions, validation …

    line 124
  20. Distinctive:

    Update this skill only when the completed run provides a concrete finding and a strong reason for the change, such as:

    line 125
  21. Distinctive:

    Do not change the skill based on preference, speculation, or an unobserved edge case.

    line 130
  22. Distinctive:

    Keep any skill update minimal, validate its formatting and frontmatter, and keep it separate from the completed release PR unless the user …

    line 131
  23. Distinctive:

    If the review finds no evidence-backed improvement, leave the skill unchanged and state that no update was warranted.

    line 132

≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill 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
SKILL.md

TypeSpec Python Release

Prepare a release PR for @azure-tools/typespec-python from the repository root.

Requirements

  • Run every command from the repository root.
  • Use the current date in YYYY-MM-DD format for the branch name.
  • Release only @azure-tools/typespec-python.
  • Do not overwrite an existing branch.

Workflow

1. Clean the Repository and Create the Branch

  1. Clean the repository and update main with this exact sequence:

    git reset HEAD && git checkout . && git clean -fd && git checkout origin/main && git pull origin main

    This intentionally discards all uncommitted tracked and untracked files. Run it only when the user has asked to start the release workflow.

  2. Create the publish branch from the clean, updated origin/main checkout using the current date:

    release_date=$(date +%F)
    git switch -c "publish/python-${release_date}"

    If the branch already exists locally or remotely, stop and ask the user whether to reuse it or choose another date. Do not delete or overwrite it.

2. Update @typespec/http-client-python

  1. Read the latest published version from npm:

    latest_http_client_python=$(pnpm view @typespec/http-client-python version)
  2. In the root pnpm-workspace.yaml, update only the lower bound of the catalog entry for @typespec/http-client-python to that exact version. Preserve the existing upper bound. For example:

    "@typespec/http-client-python": ">=0.37.2 <1.0.0"
  3. Verify the edited lower bound equals $latest_http_client_python. If it was already current, continue with the release and report that no dependency edit was needed.

3. Version TypeSpec Python

  1. Record the current version from packages/typespec-python/package.json.
  2. Run Chronus for only the Python emitter:

    pnpm chronus version --only @azure-tools/typespec-python
  3. Read the package version again. If Chronus changed it, use the generated changelog entry and do not add another one.
  4. If Chronus did not change it:

    • Increment only the patch component in packages/typespec-python/package.json, from a.b.c to a.b.(c+1).
    • Add this entry immediately below # Release in packages/typespec-python/CHANGELOG.md. The heading is the new @azure-tools/typespec-python package version; the bullet uses $latest_http_client_python. These versions are independent and are usually different:
    ## <new-typespec-python-version>
    
    - Bump @typespec/http-client-python to <latest-http-client-python-version>
  5. If the manual fallback was used, confirm the final package version is exactly one patch version above the recorded version. Otherwise, confirm Chronus versioned only @azure-tools/typespec-python.

4. Update and Validate the Lockfile

  1. Update dependencies and pnpm-lock.yaml:

    pnpm install
  2. Inspect git diff --check, git diff --stat, and git status --short.
  3. Verify the release includes only expected files:

    • pnpm-workspace.yaml, when its dependency range changed
    • pnpm-lock.yaml
    • packages/typespec-python/package.json
    • packages/typespec-python/CHANGELOG.md
    • TypeSpec Python change files consumed by Chronus, if any

    Stop and investigate before committing if other packages were versioned or unrelated files changed.

5. Commit and Create the Pull Request

  1. Read the final version from packages/typespec-python/package.json and use it as <version> below.
  2. Stage and commit all changes:

    git add -A
    git commit -m "[python] release <version>"
  3. Push the new branch:

    git push --set-upstream origin "publish/python-${release_date}"
  4. Create a pull request targeting main from publish/python-${release_date} with this exact title and an empty body:

    gh pr create --repo Azure/typespec-azure --base main --head "publish/python-${release_date}" --title "[python] release <version>" --body ""
  5. Verify the created pull request has the expected title and an empty body:

    gh pr view "publish/python-${release_date}" --repo Azure/typespec-azure --json title,body,url

6. Review and Improve the Process

  1. After the pull request is created, review the complete release run: commands executed, command output, manual interventions, validation results, changed files, commit, push, cleanup, and PR creation.
  2. Update this skill only when the completed run provides a concrete finding and a strong reason for the change, such as:
    • A documented step failed or produced an incorrect result.
    • The agent needed an undocumented manual correction to complete the release.
    • A step was ambiguous enough to create a real risk or delay.
    • A command was unnecessary or could be replaced by a demonstrably safer or more reliable command.
  3. Do not change the skill based on preference, speculation, or an unobserved edge case. For every update, record the observed evidence and explain why the edit improves future releases.
  4. Keep any skill update minimal, validate its formatting and frontmatter, and keep it separate from the completed release PR unless the user explicitly asks to include it there.
  5. If the review finds no evidence-backed improvement, leave the skill unchanged and state that no update was warranted.
  6. Return the branch name, released package version, @typespec/http-client-python version, commit hash, pull request URL, review findings, and any skill update to the user.

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.