typespec-python-release
Skill27 starsChanged 27 days 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.
- Installs packages
In this repository10 other files it gives its agents.
- .github/copilot-instructions.mdCopilot instructions
- agentic-workflowsSkill
- code-reviewSkill
- create-linter-ruleSkill
- doc-example-generatorSkill
- hotfix-releaseSkill
- tcgc-newsletterSkill
- typespec-go-add-spector-testSkill
- typespec-ts-add-spector-testSkill
- update-resolve-arm-resourcesSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
24 rules. About 0 are common, 13 are distinctive, and 11 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈13
Distinctive · estimate
This author's own choices. Worth a look.
11
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 12
Run every command from the repository root.
- Very specific: line 14
Use a release PR source branch matching publish/python-*, such as publish/python-release-{MM-DD}.
- Distinctive: line 15
Do not delete or overwrite an existing branch.
- Distinctive: line 16
Use any available authenticated integration to publish the branch and create the pull request.
- Very specific: line 22
If the environment has already supplied a task branch (for example, a cloud agent branch), preserve its commits and uncommitted changes.
- Very specific: line 32
If no task branch was supplied, create a new branch from the fetched main using an unused name matching publish/python-*.
- Distinctive: line 41
Read the latest published version from npm:
- Very specific: line 53
Verify the edited lower bound equals $latest_http_client_python.
- Distinctive: line 58
Run Chronus for only the Python emitter:
- Distinctive: line 65
If Chronus did not change it:
- Very specific: line 67
Add this entry immediately below # Release in packages/typespec-python/CHANGELOG.md.
- Very specific: line 75
If the manual fallback was used, confirm the final package version is exactly one patch version above the recorded version.
- Very specific: line 79
Update dependencies and pnpm-lock.yaml:
- Very specific: line 92
After versioning and documentation generation, add an internal change description for only the Python emitter:
- Very specific: line 110
Verify the file has changeKind: internal and lists only @azure-tools/typespec-python.
- Distinctive: line 113
Verify the release includes only expected files:
- Distinctive: line 123
Stop and investigate before committing if other packages were versioned or unrelated files changed.
- Very specific: line 127
Read the final version from packages/typespec-python/package.json and use it as <version> below.
- Very specific: line 137
Verify the created pull request's repository, base branch, head branch matching publish/python-*, exact title, empty body, and inclusion of …
- Distinctive: line 141
After the pull request is created, review the complete release run: commands executed, command output, manual interventions, validation …
- Distinctive: line 142
Update this skill only when the completed run provides a concrete finding and a strong reason for the change, such as:
- Distinctive: line 147
Do not change the skill based on preference, speculation, or an unobserved edge case.
- Distinctive: line 148
Keep any skill update minimal, validate its formatting and frontmatter, and keep it separate from the completed release PR unless the user …
- Distinctive: line 149
If the review finds no evidence-backed improvement, leave the skill unchanged and state that no update was warranted.
≈ “Common” is an estimate: at least 1 in 5 of the 383,637 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.
Files
TypeSpec Python Release
Prepare a release PR for @azure-tools/typespec-python from the repository root.
Requirements
- Run every command from the repository root.
- Release only
@azure-tools/typespec-python. - Use a release PR source branch matching
publish/python-*, such aspublish/python-release-{MM-DD}. Choose an unused name without asking the user. - Do not delete or overwrite an existing branch.
- Use any available authenticated integration to publish the branch and create the pull request; do not assume GitHub CLI is installed or authenticated.
Workflow
1. Prepare the Repository and Task Branch
- If the environment has already supplied a task branch (for example, a cloud agent branch), preserve its commits and uncommitted changes. Reuse it only if its name matches
publish/python-*; otherwise, create a new branch at the current commit with an unused name matching that pattern. Otherwise, verify the worktree is clean and fetch the latest
mainfrom the remote forAzure/typespec-azure:git status --short git fetch origin mainThe example assumes that remote is named
origin; use its actual name. Do not discard existing changes.- If no task branch was supplied, create a new branch from the fetched
mainusing an unused name matchingpublish/python-*. Preferpublish/python-release-{MM-DD}using the current date; append a unique suffix if that name already exists locally or remotely. Do not delete or overwrite existing branches. Record the actual release branch name for publishing and PR verification, and confirm it matches
publish/python-*:release_branch=$(git branch --show-current)
2. Update @typespec/http-client-python
Read the latest published version from npm:
latest_http_client_python=$(pnpm view @typespec/http-client-python version)In the root
pnpm-workspace.yaml, update only the lower bound of the catalog entry for@typespec/http-client-pythonto that exact version. Preserve the existing upper bound. For example:"@typespec/http-client-python": ">=0.37.2 <1.0.0"- 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
- Record the current version from
packages/typespec-python/package.json. Run Chronus for only the Python emitter:
pnpm chronus version --only @azure-tools/typespec-python- Check Chronus's exit status and inspect its changes before reading the package version again. If it fails, report the error and investigate any partial changes; do not treat a partial version bump as a successful release. If it left the package and changelog unchanged, continue with the manual fallback below. If Chronus succeeds and changed the version, use the generated changelog entry and do not add another one.
If Chronus did not change it:
- Increment only the patch component in
packages/typespec-python/package.json, froma.b.ctoa.b.(c+1). - Add this entry immediately below
# Releaseinpackages/typespec-python/CHANGELOG.md. The heading is the new@azure-tools/typespec-pythonpackage 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>- Increment only the patch component in
- 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 Documentation and Validate the Lockfile
Update dependencies and
pnpm-lock.yaml:pnpm installAfter installation, build the Python emitter and its workspace dependencies, then regenerate documentation only for
packages/typespec-python. The dependency build is required in fresh worktrees, where the documentation script's package-only build otherwise fails with missing workspace module declarations. Run these commands from the repository root;--dirruns the documentation script in the Python package:pnpm -r --filter "@azure-tools/typespec-python..." build pnpm --dir packages/typespec-python run regen-docsAfter versioning and documentation generation, add an
internalchange description for only the Python emitter:pnpm change add @azure-tools/typespec-python --kind internal --message "Release @azure-tools/typespec-python <version> with @typespec/http-client-python <latest-http-client-python-version>."Replace the placeholders with the final package version and dependency version. Inspect
.chronus/changes/to verify that the command actually created a valid change file; an exit status of zero is not sufficient. Chronus can printNo package changed. Exiting.and create no file when the release edits are still uncommitted. If the command fails or creates no valid file, report the outcome and manually create a uniquely named.mdfile under.chronus/changes/if needed, using this format:--- changeKind: internal packages: - "@azure-tools/typespec-python" --- Release @azure-tools/typespec-python <version> with @typespec/http-client-python <latest-http-client-python-version>.Verify the file has
changeKind: internaland lists only@azure-tools/typespec-python. Do not rerun Chronus versioning after adding it; the file must remain in the release PR.- Inspect
git diff --check,git diff --stat, andgit status --short. Verify the release includes only expected files:
pnpm-workspace.yaml, when its dependency range changedpnpm-lock.yamlpackages/typespec-python/package.jsonpackages/typespec-python/CHANGELOG.mdpackages/typespec-python/README.mdwebsite/src/content/docs/docs/emitters/clients/typespec-python/reference/emitter.md- TypeSpec Python change files consumed by Chronus, if any
- The new
internalTypeSpec Python change file under.chronus/changes/
Stop and investigate before committing if other packages were versioned or unrelated files changed.
5. Commit and Create the Pull Request
- Read the final version from
packages/typespec-python/package.jsonand use it as<version>below. Stage and commit the validated release changes, including the new
internalchange file:git add -A git commit -m "[python] release <version>"- Publish the actual release branch using an available authenticated mechanism, such as Git, an MCP integration, or the cloud agent's publishing workflow. Use a personal fork when required by repository permissions. Do not assume the remote is named
origin; preserve thepublish/python-*branch name when publishing. - Create a pull request against
Azure/typespec-azure, targetingmainfrom the publishedpublish/python-*branch, with the exact title[python] release <version>and an empty body. Choose an available authenticated tool or integration; GitHub CLI is optional. If publishing or PR creation is unavailable, stop and report the blocker so the user can finish. - Verify the created pull request's repository, base branch, head branch matching
publish/python-*, exact title, empty body, and inclusion of the newinternalchange file using the available integration.
6. Review and Improve the Process
- 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.
- 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.
- 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.
- 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.
- If the review finds no evidence-backed improvement, leave the skill unchanged and state that no update was warranted.
- Return the branch name, released package version,
@typespec/http-client-pythonversion, commit hash, pull request URL, review findings, and any skill update to the user.
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.

