Skip to content

chore: rename /pr to /create-pr, improve /postflight for PR feedback#10

Merged
marcusquinn merged 1 commit intomainfrom
chore/rename-pr-postflight-commands
Jan 7, 2026
Merged

chore: rename /pr to /create-pr, improve /postflight for PR feedback#10
marcusquinn merged 1 commit intomainfrom
chore/rename-pr-postflight-commands

Conversation

@marcusquinn
Copy link
Owner

@marcusquinn marcusquinn commented Jan 7, 2026

Summary

  • Rename /pr/create-pr for intuitive "don't make me think" UX
  • Change /postflight to check code audit feedback on latest push (not just release verification)
  • Add scope monitoring guidance so agents detect when work diverges from branch purpose

Command Changes

Before After Purpose
/pr /create-pr Create PR with auto-generated title/description
/pr (alias) Still works, points to /create-pr
/postflight (release only) /postflight (any push) Check CodeRabbit, Codacy, SonarCloud feedback

Agent Improvements

  • Scope monitoring: Agents now detect when work diverges from branch purpose
  • Proactive suggestions: Offer to create new branch when scope creep detected
  • Stash workflow: Guidance for safely switching branches mid-work

Files Changed

  • .agent/scripts/generate-opencode-commands.sh - Command definitions
  • .agent/workflows/git-workflow.md - Scope monitoring guidance
  • .agent/AGENTS.md - Pointer to scope monitoring

Context

This PR was created after recognizing that work on chore/optimize-mcp-token-usage had evolved into command renaming - demonstrating the exact problem this PR solves.

Summary by CodeRabbit

Release Notes

New Features

  • Added /create-pr command for creating pull requests from the current branch with auto-generated descriptions
  • Added scope monitoring step to Git Workflow to detect scope divergence and suggest branch re-evaluation
  • Enhanced workflow guidance with expanded steps for handling scope expansion scenarios

✏️ Tip: You can customize this high-level summary in your review settings.

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
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 7, 2026

Walkthrough

The 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

Cohort / File(s) Summary
Workflow Documentation
.agent/AGENTS.md, .agent/workflows/git-workflow.md
Adds scope-monitoring step to Git Workflow (step 6: detect and suggest branch re-evaluation if work diverges). Introduces comprehensive "Scope Monitoring" section with detection signals, recommended actions, stash workflows, and decision trees for handling scope expansion during development sessions.
Command Generation & Messaging
.agent/scripts/generate-opencode-commands.sh
Rebands PR workflow commands: /pr → /create-pr (primary command) with /pr as alias. Updates help text, workflow descriptions, and onboarding messaging throughout script to reference /create-pr. POSTFLIGHT command description refocused from release-health to code-audit-feedback checks. Expands PR creation workflow examples and step documentation.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

Poem

🌿 PR commands bloom anew with clearer names,
/create-pr takes center stage with DevOps aims,
Scope monitors watch for diverging dreams,
Steering workflows back to purpose's streams,
Zero debt maintained—a+ all the way! ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main changes: renaming /pr to /create-pr and improving /postflight for PR feedback, which are the primary modifications across command definitions and workflow documentation.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@gemini-code-assist
Copy link

Summary of Changes

Hello @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 /pr command to the more descriptive /create-pr and significantly enhancing the /postflight command to provide immediate, comprehensive code audit feedback on any push. Additionally, it introduces proactive scope monitoring within agent workflows, aiming to improve branch management and prevent scope creep by guiding users to create new branches when work diverges from its initial intent.

Highlights

  • Command Renaming: The /pr command has been renamed to /create-pr for improved clarity and intuitive user experience. The original /pr command now serves as an alias to /create-pr for backward compatibility.
  • Enhanced Postflight Command: The /postflight command's functionality has been significantly expanded. It now checks comprehensive code audit feedback (from tools like CodeRabbit, Codacy, and SonarCloud) on the latest push to any branch or pull request, moving beyond its previous role of only verifying release health.
  • Agent Scope Monitoring: New guidance has been added for agents to proactively monitor work scope. This includes detecting when development diverges from the branch's original purpose and suggesting creating new branches or utilizing a git stash workflow to manage changes effectively.
Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@sonarqubecloud
Copy link

sonarqubecloud bot commented Jan 7, 2026

@github-actions
Copy link

github-actions bot commented Jan 7, 2026

🔍 Code Quality Report

�[0;35m[MONITOR]�[0m Code Review Monitoring Report

�[0;34m[INFO]�[0m Latest Quality Status:
SonarCloud: 0 bugs, 0 vulnerabilities, 142 code smells

�[0;34m[INFO]�[0m Recent monitoring activity:
Wed Jan 7 21:12:48 UTC 2026: Code review monitoring started
Wed Jan 7 21:12:49 UTC 2026: SonarCloud - Bugs: 0, Vulnerabilities: 0, Code Smells: 142
Wed Jan 7 21:12:49 UTC 2026: Qlty - 0 issues found, auto-formatting applied
Wed Jan 7 21:12:51 UTC 2026: Codacy analysis completed with auto-fixes

📈 Current Quality Metrics

  • BUGS: 0
  • CODE SMELLS: 142
  • VULNERABILITIES: 0

Generated on: Wed Jan 7 21:13:27 UTC 2026


Generated by AI DevOps Framework Code Review Monitoring

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment on lines +103 to +110
**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
```

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

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.

Suggested change
**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'

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 fixes

This 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

📥 Commits

Reviewing files that changed from the base of the PR and between 54410e4 and a45321e.

📒 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 /pr as an alias to /create-pr ensures 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-pr command, 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.

@augmentcode
Copy link

augmentcode bot commented Jan 7, 2026

🤖 Augment PR Summary

Summary: Improves OpenCode workflow UX by renaming the PR creation command and expanding post-push auditing guidance.

  • Adds a new /create-pr command and keeps /pr as an alias for backward compatibility.
  • Reworks /postflight to focus on CI + code-audit feedback for the latest push (branch/PR/main), including CodeRabbit/Codacy/SonarCloud checks.
  • Adds “scope monitoring” guidance (plus a stash workflow) so agents can detect and respond to scope creep during a session.

🤖 Was this summary useful? React with 👍 or 👎

Copy link

@augmentcode augmentcode bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review completed. 3 suggestions posted.

Fix All in Augment

Comment augment review to trigger a new review at any time.

5. Any blocking issues that need resolution

**Commands used:**
- `gh pr view --json reviews,comments` (if PR exists)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Fix This in Augment

🤖 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
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Fix This in Augment

🤖 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}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎

@marcusquinn marcusquinn merged commit 913b2d1 into main Jan 7, 2026
9 checks passed
@marcusquinn marcusquinn deleted the chore/rename-pr-postflight-commands branch January 7, 2026 21:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant