chore: rename /pr to /create-pr, improve /postflight for PR feedback#10
Conversation
Command changes: - /pr → /create-pr: Creates PR with auto-generated title/description - /pr: Now alias for /create-pr - /postflight: Now checks code audit feedback on latest push (branch/PR) - Auto-detects context (feature branch, PR, or main) - Checks GitHub Actions, CodeRabbit, Codacy, SonarCloud Agent improvements: - Add scope monitoring guidance to git-workflow.md - Agents now detect when work diverges from branch purpose - Proactively suggest new branch when scope creep detected - Add pointer in AGENTS.md Git Workflow section
WalkthroughThe PR enhances agent documentation and command generation by introducing scope-monitoring guidance to the Git Workflow, rebranding PR-related commands (/pr → /create-pr) in command generation scripts, and updating workflow messaging to reflect the new command structure while expanding PR creation workflow steps. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary of ChangesHello @marcusquinn, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request streamlines developer workflows by renaming the Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
|
🔍 Code Quality Report�[0;35m[MONITOR]�[0m Code Review Monitoring Report �[0;34m[INFO]�[0m Latest Quality Status: �[0;34m[INFO]�[0m Recent monitoring activity: 📈 Current Quality Metrics
Generated on: Wed Jan 7 21:13:27 UTC 2026 Generated by AI DevOps Framework Code Review Monitoring |
There was a problem hiding this comment.
Code Review
This pull request refactors the command structure by renaming /pr to /create-pr and making the former an alias. It also significantly enhances the /postflight command to provide code audit feedback on any push, not just releases. Additionally, it introduces agent guidance for scope monitoring to detect when work diverges from the branch's purpose. The changes are well-structured and improve the developer experience. I've found one minor issue in the new git workflow documentation where the stash workflow for switching to an existing branch was incorrect, and I've provided a suggestion to fix it.
| **Stash workflow** (if user chooses option 1 or 3): | ||
|
|
||
| ```bash | ||
| git stash --include-untracked -m "WIP: {description}" | ||
| git checkout main && git pull origin main | ||
| git checkout -b {type}/{description} | ||
| git stash pop | ||
| ``` |
There was a problem hiding this comment.
The provided stash workflow is only correct for option 1 (creating a new branch), but the description says it applies to option 3 (switching to an existing branch) as well. This is misleading because for option 3, the agent should check out an existing branch, not create a new one.
I suggest separating the workflows for clarity and correctness.
| **Stash workflow** (if user chooses option 1 or 3): | |
| ```bash | |
| git stash --include-untracked -m "WIP: {description}" | |
| git checkout main && git pull origin main | |
| git checkout -b {type}/{description} | |
| git stash pop | |
| ``` | |
| **Stash workflow for new branch** (if user chooses option 1): | |
| ```bash | |
| git stash --include-untracked -m "WIP: {description}" | |
| git checkout main && git pull origin main | |
| git checkout -b {type}/{description} | |
| git stash pop |
Stash workflow for existing branch (if user chooses option 3):
git stash --include-untracked -m "WIP: {description}"
git checkout {existing_branch_name}
# Agent should confirm with user before running 'git stash pop'There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (2)
.agent/workflows/git-workflow.md (1)
84-113: Excellent scope monitoring guidance with clear signals and workflows.The new scope monitoring section effectively addresses the scope creep issue mentioned in the PR objectives. The signal table provides concrete examples, the stash workflow is technically sound, and the proactive detection prompt is a good practice.
Minor suggestion: Enhance the stash workflow command
The stash workflow on lines 105-110 is correct, but consider adding a verification step to ensure the stash pop succeeds without conflicts:
**Stash workflow** (if user chooses option 1 or 3): ```bash git stash --include-untracked -m "WIP: {description}" git checkout main && git pull origin main git checkout -b {type}/{description} -git stash pop +git stash pop || echo "⚠️ Stash conflicts detected - resolve before continuing"This helps catch stash conflicts early in the workflow. </details> </blockquote></details> <details> <summary>.agent/scripts/generate-opencode-commands.sh (1)</summary><blockquote> `456-489`: **Clear command rename with improved documentation.** The `/create-pr` command name is more self-descriptive than `/pr`, and the documentation clearly outlines the PR creation workflow. The steps are logical and comprehensive. Consider mentioning what happens if step 6 (`gh pr create`) fails (e.g., no GitHub CLI, authentication issues), to help users troubleshoot common scenarios: ```diff 6. Create PR using `gh pr create` -7. Return PR URL +7. If creation succeeds, return PR URL; otherwise show error and suggest fixesThis is optional since the actual command execution will naturally surface errors, but explicit documentation helps set expectations.
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
.agent/AGENTS.md.agent/scripts/generate-opencode-commands.sh.agent/workflows/git-workflow.md
🧰 Additional context used
📓 Path-based instructions (1)
.agent/scripts/*.sh
⚙️ CodeRabbit configuration file
.agent/scripts/*.sh: Automation scripts - focus on:
- Reliability and robustness
- Clear logging and feedback
- Proper exit codes
- Error recovery mechanisms
Files:
.agent/scripts/generate-opencode-commands.sh
🧠 Learnings (1)
📚 Learning: 2025-12-22T01:24:53.937Z
Learnt from: CR
Repo: marcusquinn/aidevops PR: 0
File: templates/home/AGENTS.md:0-0
Timestamp: 2025-12-22T01:24:53.937Z
Learning: Follow all security protocols and working directory specifications defined in ~/Git/aidevops/AGENTS.md
Applied to files:
.agent/scripts/generate-opencode-commands.sh
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: Codacy Static Code Analysis
🔇 Additional comments (5)
.agent/scripts/generate-opencode-commands.sh (4)
86-122: LGTM! Postflight refocus on code audit feedback is clear and actionable.The shift from release health verification to code audit feedback aligns perfectly with the PR objectives. The auto-detection logic intelligently handles different git contexts (feature branch with/without PR, main branch), and the list of checks covers all relevant code quality tools.
491-505: Good backward compatibility strategy.Keeping
/pras an alias to/create-prensures existing user workflows continue working while making the primary command more discoverable and self-explanatory.
1055-1070: Help text updates are consistent with command changes.The summary section correctly reflects the renamed command and updated postflight behavior, maintaining consistency across the generated documentation.
1086-1089: Workflow examples updated consistently.The planning and quality workflow examples correctly reference the new
/create-prcommand, ensuring users see the right command names in generated help output..agent/AGENTS.md (1)
131-131: Clear integration of scope monitoring into the workflow.The new step 6 succinctly captures the scope monitoring behavior and aligns perfectly with the detailed guidance in
git-workflow.md. This creates a cohesive cross-file experience where the high-level workflow references the detailed implementation guidance.
🤖 Augment PR SummarySummary: Improves OpenCode workflow UX by renaming the PR creation command and expanding post-push auditing guidance.
🤖 Was this summary useful? React with 👍 or 👎 |
| 5. Any blocking issues that need resolution | ||
|
|
||
| **Commands used:** | ||
| - `gh pr view --json reviews,comments` (if PR exists) |
There was a problem hiding this comment.
gh pr view --json reviews,comments won’t include inline review comments/threads, which is where tools like CodeRabbit often post suggestions; this may cause /postflight to miss the primary feedback you’re trying to surface. Consider including PR review threads/comments in the queried fields (or using the PR review comments API) so the guidance matches the stated checks.
🤖 Was this useful? React with 👍 or 👎
| # Keep /pr as alias pointing to /create-pr for discoverability | ||
| cat > "$OPENCODE_COMMAND_DIR/pr.md" << 'EOF' | ||
| --- | ||
| description: Alias for /create-pr - Create PR from current branch |
There was a problem hiding this comment.
Now that /pr is an alias for /create-pr, there are still repo docs describing /pr as the unified PR orchestrator (e.g., .agent/workflows/pr.md, README.md, CHANGELOG.md, and parts of .agent/AGENTS.md), which could mislead users. It may be worth updating those references to align with the new behavior.
🤖 Was this useful? React with 👍 or 👎
| ```bash | ||
| git stash --include-untracked -m "WIP: {description}" | ||
| git checkout main && git pull origin main | ||
| git checkout -b {type}/{description} |
There was a problem hiding this comment.
The stash workflow uses git checkout -b {type}/{description}; if {description} contains spaces or punctuation (as suggested by the surrounding prose), the command will fail due to an invalid branch name. Consider using the {suggested-type}/{suggested-name} placeholder (or otherwise indicating a slug) to keep the example runnable.
🤖 Was this useful? React with 👍 or 👎



Summary
/pr→/create-prfor intuitive "don't make me think" UX/postflightto check code audit feedback on latest push (not just release verification)Command Changes
/pr/create-pr/pr/create-pr/postflight(release only)/postflight(any push)Agent Improvements
Files Changed
.agent/scripts/generate-opencode-commands.sh- Command definitions.agent/workflows/git-workflow.md- Scope monitoring guidance.agent/AGENTS.md- Pointer to scope monitoringContext
This PR was created after recognizing that work on
chore/optimize-mcp-token-usagehad evolved into command renaming - demonstrating the exact problem this PR solves.Summary by CodeRabbit
Release Notes
New Features
/create-prcommand for creating pull requests from the current branch with auto-generated descriptions✏️ Tip: You can customize this high-level summary in your review settings.