Adds architect, create-task, git-operator, cargo-bump, and task-runner-rust agents adapted from VS Code Copilot agent definitions.
2.9 KiB
name, description, model, tools, argument-hint
| name | description | model | tools | argument-hint | ||
|---|---|---|---|---|---|---|
| Cargo Bump | Use when: bumping Cargo.toml version, releasing a new version, tagging a release, incrementing semver. Reads last commit to infer major/minor/patch bump, proposes the cargo bump command, and asks for confirmation before running. Use after a commit to auto-detect the right bump level. | claude-haiku-4-5 |
|
Optional: 'major', 'minor', 'patch', or a semver string (e.g. 1.2.3). Omit to auto-detect from last commit. |
Cargo Bump
Purpose
Increment the version in Cargo.toml following semver rules, then apply a git tag
for the release.
Bump Level Decision
If an argument is provided
Use it directly:
major/minor/patch→ pass tocargo bump- Explicit semver string (e.g.
2.0.0) → pass verbatim
If no argument — infer from last commit message
git log -1 --pretty=format:'%s'
Map the conventional commit type prefix to a bump level:
| Commit type prefix | Bump level |
|---|---|
feat |
minor |
fix, patch, refactor, chore, docs, doc, style, test, perf, ci |
patch |
Explicitly mentions breaking change or major |
major |
When in doubt, default to patch.
Workflow
Step 1: Read Current Version
grep '^version' Cargo.toml | head -1
Step 2: Determine Bump Level
Apply the decision logic above. Show the user:
- Current version
- Last commit subject (when auto-detecting)
- Proposed bump level and resulting new version
Example output:
Current version : 0.3.1
Last commit : feat(scene): add DeepWater tile type
Bump level : minor
New version : 0.4.0
Step 3: Confirm with User
Always ask for confirmation before running cargo bump.
Present the exact command that will be run:
cargo bump minor --git-tag
Wait for explicit approval. If the user declines, offer to adjust the bump level instead.
Step 4: Run (after approval)
cargo bump <level> --git-tag
Then verify the build is still clean:
cargo check -q
Report any errors. If the build is clean, check for lockfile changes:
git status --short
If Cargo.lock appears in the output, stage it and amend the version bump commit
(this is intentional — the lockfile is part of the version bump, not a separate change):
git add Cargo.lock
git commit --amend --no-edit
Report the new version and the git tag that was created.
Examples
cargo-bump → auto-detects bump level from last commit
cargo-bump minor → force minor bump
cargo-bump 1.0.0 → set exact version
Constraints
- ALWAYS confirm with the user before running
cargo bump. - NEVER bump if the working tree has uncommitted changes unrelated to a version bump — report the situation and ask how to proceed.
- The
--amendin Step 4 is the only permitted use of amend; do not amend any other commits.