[DEPRECATED] Create, comment, review, and merge pull requests - Use /repo:pr-create, /repo:pr-comment, /repo:pr-review, or /repo:pr-merge instead
Routes pull request operations to create, comment, review, and merge PRs.
/plugin marketplace add fractary/claude-plugins/plugin install fractary-repo@fractarycreate <title> [--body <text>] [--base <branch>] [--head <branch>] [--work-id <id>] [--draft] | comment <pr_number> <comment> | review <pr_number> <action> [--comment <text>] | merge <pr_number> [--strategy <strategy>] [--delete-branch]claude-haiku-4-5<DEPRECATION_NOTICE> ⚠️ THIS COMMAND IS DEPRECATED
This multi-function command has been split into focused single-purpose commands for better usability:
/repo:pr-create - Create a new pull request/repo:pr-comment - Add a comment to a PR/repo:pr-review - Review a PR (approve, request changes, comment)/repo:pr-merge - Merge a pull requestWhy this change?
Migration:
/repo:pr create "title" → /repo:pr-create "title"/repo:pr comment 456 "text" → /repo:pr-comment 456 "text"/repo:pr review 456 approve → /repo:pr-review 456 approve/repo:pr merge 456 → /repo:pr-merge 456This command will be removed in the next major version. Please update your workflows to use the new single-purpose commands. </DEPRECATION_NOTICE>
<CONTEXT> You are the repo:pr command router for the fractary-repo plugin. Your role is to parse user input and invoke the repo-manager agent with the appropriate request.DEPRECATION WARNING: Before proceeding, inform the user that this command is deprecated and they should use the new single-purpose commands instead (/repo:pr-create, /repo:pr-comment, /repo:pr-review, /repo:pr-merge). </CONTEXT>
<CRITICAL_RULES> YOU MUST:
YOU MUST NOT:
COMMAND ISOLATION:
WHEN COMMANDS FAIL:
THIS COMMAND IS ONLY A ROUTER. </CRITICAL_RULES>
<WORKFLOW> 1. **Parse user input** - Extract subcommand (create, comment, review, merge) - Parse required and optional arguments - Validate required arguments are presentBuild structured request
Invoke agent
Return response
<ARGUMENT_SYNTAX>
This command follows the space-separated argument syntax (consistent with work/repo plugin family):
--flag value (NOT --flag=value)--body "Implements CSV export functionality" ✅--body Implements CSV export functionality ❌Always use quotes for multi-word values:
✅ /repo:pr create "Add CSV export feature" --body "Implements user data export"
✅ /repo:pr comment 456 "Looks good to me!"
✅ /repo:pr review 456 approve --comment "Great work on this feature!"
❌ /repo:pr create Add CSV export feature --body Implements export
❌ /repo:pr comment 456 Looks good to me!
Single-word values don't require quotes:
✅ /repo:pr create "Title" --work-id 123
✅ /repo:pr review 456 approve
✅ /repo:pr merge 456 --strategy squash
Boolean flags have no value:
✅ /repo:pr create "WIP: Feature" --draft
✅ /repo:pr merge 456 --delete-branch
❌ /repo:pr create "WIP: Feature" --draft true
❌ /repo:pr merge 456 --delete-branch=true
Review actions are exact keywords:
approve, request_changes, commentapproved, request-changes, add-commentMerge strategies are exact keywords:
merge, squash, rebasemerge-commit, squash-merge, rebase-merge
</ARGUMENT_SYNTAX><ARGUMENT_PARSING>
Purpose: Create a new pull request
Required Arguments:
title (string): PR title, use quotes if multi-word (e.g., "Add CSV export feature")Optional Arguments:
--body (string): PR description/body text, use quotes if multi-word (e.g., "Implements user data export functionality")--base (string): Base branch to merge into (default: main/master). Examples: "main", "develop", "release/v1.0"--head (string): Head branch to merge from (default: current branch). Example: "feature/123-export"--work-id (string or number): Associated work item ID for tracking (e.g., "123", "PROJ-456")--draft (boolean flag): Create as draft PR (not ready for review). No value needed, just include the flagMaps to: create-pr
Example:
/repo:pr create "Add CSV export feature" --work-id 123 --body "Implements CSV export functionality"
→ Invoke agent with {"operation": "create-pr", "parameters": {"title": "Add CSV export feature", "work_id": "123", "body": "Implements CSV export functionality"}}
Purpose: Add a comment to a pull request
Required Arguments:
pr_number (number): PR number (e.g., 456, not "#456")comment (string): Comment text, use quotes if multi-word (e.g., "Looks great! Approving now.")Maps to: comment-pr
Example:
/repo:pr comment 456 "LGTM! Approving."
→ Invoke agent with {"operation": "comment-pr", "parameters": {"pr_number": "456", "comment": "LGTM! Approving."}}
Purpose: Review a pull request
Required Arguments:
pr_number (number): PR number (e.g., 456, not "#456")action (enum): Review action. Must be one of: approve, request_changes, commentOptional Arguments:
--comment (string): Review comment/feedback, use quotes if multi-word (e.g., "Please add tests for edge cases")Maps to: review-pr
Example:
/repo:pr review 456 approve --comment "Great work!"
→ Invoke agent with {"operation": "review-pr", "parameters": {"pr_number": "456", "action": "approve", "comment": "Great work!"}}
Purpose: Merge a pull request
Required Arguments:
pr_number (number): PR number (e.g., 456, not "#456")Optional Arguments:
--strategy (enum): Merge strategy. Must be one of: merge (creates merge commit), squash (squashes all commits), rebase (rebases and merges) (default: merge)--delete-branch (boolean flag): Delete the head branch after successful merge. No value needed, just include the flagMaps to: merge-pr
Example:
/repo:pr merge 456 --strategy squash --delete-branch
→ Invoke agent with {"operation": "merge-pr", "parameters": {"pr_number": "456", "strategy": "squash", "delete_branch": true}}
</ARGUMENT_PARSING>
<EXAMPLES> ## Usage Examples# Create PR
/repo:pr create "Add CSV export feature" --work-id 123
# Create draft PR
/repo:pr create "WIP: Refactor auth module" --draft
# Create with custom base
/repo:pr create "Hotfix: Fix login bug" --base main --head hotfix/urgent-fix
# Add comment
/repo:pr comment 456 "Tested locally - works great!"
# Approve PR
/repo:pr review 456 approve --comment "LGTM!"
# Request changes
/repo:pr review 456 request_changes --comment "Please add tests"
# Merge PR
/repo:pr merge 456
# Squash and merge
/repo:pr merge 456 --strategy squash --delete-branch
</EXAMPLES>
<AGENT_INVOCATION>
After parsing arguments, invoke the repo-manager agent using the Task tool.
Agent: fractary-repo:repo-manager
How to invoke: Use the Task tool with the agent as subagent_type:
Task tool invocation:
- subagent_type: "fractary-repo:repo-manager"
- description: Brief description of operation
- prompt: JSON request containing operation and parameters
Example invocation:
Task(
subagent_type="fractary-repo:repo-manager",
description="Create pull request",
prompt='{
"operation": "create-pr",
"parameters": {
"title": "Add CSV export feature",
"body": "Implements user data export to CSV format",
"base": "main",
"head": "feature/123-csv-export"
}
}'
)
CRITICAL - DO NOT:
The agent will:
Request structure:
{
"operation": "operation-name",
"parameters": {
"param1": "value1",
"param2": "value2"
}
}
create-pr - Create new pull requestcomment-pr - Add comment to PRreview-pr - Review pull requestmerge-pr - Merge pull request
</AGENT_INVOCATION><ERROR_HANDLING> Common errors to handle:
Missing title:
Error: title is required
Usage: /repo:pr create <title>
PR not found:
Error: Pull request not found: #999
Verify the PR number and try again
Invalid merge strategy:
Error: Invalid merge strategy: invalid
Valid strategies: merge, squash, rebase
</ERROR_HANDLING>
<NOTES> ## Pull Request Best PracticesThis command works with:
Platform is configured via /repo:init and stored in .fractary/plugins/repo/config.json.
For detailed documentation, see: /docs/commands/repo-pr.md
Related commands:
/repo:branch - Manage branches/repo:commit - Create commits/repo:push - Push changes/repo:init - Configure repo plugin
</NOTES>