Ctx measurement example#43
Merged
Merged
Conversation
…late Added new slash command: - /proj:generate-release-notes - Automatically generates release notes from merged PRs - Finds commits between releases - Extracts PR numbers from squash/merge commits - Fetches PR details via gh CLI - Categorizes changes by type (features, bugs, docs, etc.) - Generates formatted release notes from template - Backs up and updates GitHub release Added release notes template: - .github/RELEASE_NOTES_TEMPLATE.md - Comprehensive template structure - Includes sections for all change types - Breaking changes with migration guides - Contributors and statistics - Full changelog links - Installation and feedback sections Features: - Automated PR discovery and categorization - Rich formatting with emojis for visual scanning - Backup/revert capability - Handles edge cases (first release, direct commits, etc.) - Links to PRs, issues, and compare views
… multiple tags Critical clarifications: - Command UPDATES the latest existing release (not creates new) - Handles multiple version tags between releases - Uses gh release list to find actual releases (not git tag) - Example: v0.0.44 release may include changes from v0.0.41-v0.0.44 if v0.0.40 was previous release - Captures all commits between previous RELEASE and latest RELEASE Key changes: - Step 1: Clarified we update existing release, not create new - Step 1: Added logic to find previous actual release (may skip tags) - Step 2: Changed to capture ALL commits, not just merges - Step 6: Emphasized UPDATE vs create - Example Usage: Shows realistic scenario with skipped tags - Handling Edge Cases: Added "Multiple Tags Between Releases" section - Example Commands: Updated to show release list and commit range
- Added Context Measurement section after Personas with screenshot - Explains benefits: optimize context usage, make informed decisions, compare alternatives, budget context - Shows usage via MCP tools (list-available-tools, get-active-toolset) - Added link to awesome-mcp-personas repository - Added two FAQ entries about token estimate accuracy and performance impact - Kept personas section intact as requested - Updated All Features table with context measurement entry
New command: /proj:create-pr - Runs just pr-prep to validate CI checks locally - Pushes branch to remote (with -u flag if needed) - Creates PR on GitHub with gh CLI - Generates comprehensive PR description from commits - Updates PR with formatted description Features: - Complete end-to-end PR creation workflow - Safety checks: verifies branch, checks for uncommitted changes - Error handling for push failures, existing PRs, auth issues - Automatic backup of existing PR descriptions - Smart branch name to PR title conversion - Reuses PR description generation logic from generate-pr-desc Allowed tools: - just pr-prep for local validation - git commands for branch/push operations - gh pr commands for PR creation and updates - File operations for description generation Comparison with generate-pr-desc: - create-pr: Full workflow from local branch to PR with description - generate-pr-desc: Just updates description of existing PR Usage: /proj:create-pr (from feature branch with committed changes)
Changes to create-pr command:
- Added Step 2: Rebase from main (git pull --rebase origin main)
- Ensures branch is up-to-date before creating PR
- Handles rebase conflicts with clear error messages
- Updated step numbers (Push is now Step 4, Create PR is Step 5, etc.)
Security improvements:
- Replaced wildcard 'git remote*' with specific allowed commands
- Now allows only: 'git remote -v' and 'git rev-parse --abbrev-ref @{upstream}'
- Added explicit permission for 'git pull --rebase origin main'
- Added explicit permission for 'git status --porcelain'
Error handling:
- Added rebase conflict handling instructions
- User must resolve conflicts manually and run git rebase --continue
- Updated example output to show rebase step
Safety:
- Never skip rebase - always ensure up-to-date with main
- Prevents PR conflicts and merge issues
🤖 Changeset StatusIs this the right version bump?
How to add a changeset:
Skip release entirely:Add This comment will update automatically when you push changes. |
- Added --reviewer toolprint/admins flag to gh pr create - Automatically assigns toolprint/admins team as reviewers on PR creation - Updated documentation to reflect automatic reviewer assignment
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR adds documentation for the context measurement feature, creates two new slash commands for PR and release management automation, and includes supporting assets. The context measurement feature helps users understand token usage per tool to optimize their toolsets. The new automation commands streamline the PR creation workflow and release notes generation process.
Type of Change
Please check the relevant option(s):
Changes Made
New Features
Added
/proj:create-prslash command for complete PR workflowjust pr-prepto validate all CI checks locally-uflag if needed)gh pr create.claude/commands/proj/create-pr.mdAdded
/proj:generate-release-notesslash commandghCLI and categorizes by typeRELEASE_NOTES_TEMPLATE.md.claude/commands/proj/generate-release-notes.mdAdded Release Notes Template
.github/RELEASE_NOTES_TEMPLATE.mdBug Fixes
Fixed
generate-release-notescommand clarificationsgh release listto find actual releases (not justgit tag)Added assets for context measurement feature
assets/toolset_context.png- Active toolset with context infoassets/all_tools_context.png- All available tools with token estimatesOther Enhancements
Updated README with context measurement documentation
list-available-tools,get-active-toolset)Security improvements in
/proj:create-prcommandgit remote*to specific commandsgit remote -v,git rev-parse --abbrev-ref @{upstream}git pull --rebase origin mainandgit status --porcelainBreaking Changes
None - all changes are additions and documentation improvements.
Testing
Testing performed:
just pr-prepsuccessfully - all checks passed (pre-commit, build, tests, typecheck, lint, format)/proj:create-prcommand itselfChecklist
npm run lintandnpm run formatnpm testScreenshots
Context measurement feature in action:
Active toolset showing token usage per tool
Related Issues
N/A - These are proactive improvements to documentation and developer workflow automation.
Additional Notes
Key workflow improvements:
/proj:create-prprovides end-to-end PR creation: validate → rebase → push → create → generate description/proj:generate-release-notesautomates release notes generation from merged PRs across multiple version tagsghCLI and follow security best practices with specific allowed-tool permissionsDocumentation improvements:
Future enhancements:
--dry-runflag to/proj:create-prto preview changes without pushing/proj:generate-release-notesto support custom release note templatesThis PR was created using
/proj:create-pritself! 🚀