Address PR comments, checkout branch, resolve feedback, push fixes
/plugin marketplace add open-horizon-labs/miranda/plugin install miranda@mirandaThis skill inherits all available tools. When active, it can use any tool Claude has access to.
Director's notes to ractors. Address feedback on a PR - checkout branch, resolve comments, push fixes.
/notes <pr-number>
<pr-number> - the pull request number to address comments onRead dive context (if available) for project background:
cat .wm/dive_context.md 2>/dev/null || echo "No dive context"
Checkout the PR branch:
gh pr checkout <pr-number>
Fetch PR comments (both top-level and inline review comments):
gh pr view <pr-number> --json comments,reviews
gh api repos/{owner}/{repo}/pulls/<pr-number>/comments
Identify unresolved comments:
For each unresolved comment:
a. Understand the feedback
b. Make the fix
c. Stage changes (git add)
d. Run sg review on staged changes
e. Handle review findings:
ba create as descendant taskComplete ALL descendant tasks before commit.
Any ba create during this session = descendant that blocks push.
Note: If feedback requires significant architectural changes, consider escalating back to the original task author rather than creating many descendant tasks.
While ANY unclosed tasks created in this session:
ba claim <next-task>sg review (each task gets its own review!)ba finish, commit code + .ba/Commit all fixes:
git commit -m "address PR #<pr-number> feedback
- <summary of each addressed comment>"
Push changes:
git push
Reply to addressed comments (optional but helpful):
gh api repos/{owner}/{repo}/pulls/{pr}/comments/{comment_id}/replies \
-f body="Fixed in $(git rev-parse --short HEAD)"
Exit and report:
When in doubt, address it. Better to over-fix than under-fix.
Same as mouse skill:
CRITICAL: You MUST signal completion when done. This is the LAST thing you do.
# On success:
curl -sS -X POST "http://localhost:${MIRANDA_PORT}/complete" \
-H "Content-Type: application/json" \
-d "{\"session\": \"$TMUX_SESSION\", \"status\": \"success\", \"pr\": \"<PR-URL>\"}"
# On blocked (needs human):
curl -sS -X POST "http://localhost:${MIRANDA_PORT}/complete" \
-H "Content-Type: application/json" \
-d "{\"session\": \"$TMUX_SESSION\", \"status\": \"blocked\", \"blocker\": \"<reason>\"}"
# On error:
curl -sS -X POST "http://localhost:${MIRANDA_PORT}/complete" \
-H "Content-Type: application/json" \
-d "{\"session\": \"$TMUX_SESSION\", \"status\": \"error\", \"error\": \"<reason>\"}"
If you don't signal, Miranda won't know you're done and the session becomes orphaned.
$ /notes 42
Checking out PR #42...
Switched to branch 'ba/abc-123'
Fetching comments...
Found 4 comments:
1. "Add null check before accessing user.email" (line 45)
2. "This error message could be clearer" (line 72)
3. [coderabbit] "Consider using optional chaining" (line 45)
4. "Why not use the existing validate() function?" → needs decision
Addressing comment 1: Add null check...
Staging changes...
Running sg review...
No issues found.
Addressing comment 2: Improve error message...
Staging changes...
Running sg review...
No issues found.
Addressing comment 3: Use optional chaining...
Staging changes...
Running sg review...
No issues found.
Skipping comment 4: Requires human decision
(Unsure whether to refactor to use validate() or keep current approach)
Committing fixes...
[ba/abc-123 a1b2c3d] address PR #42 feedback
- Add null check before accessing user.email
- Improve error message clarity
- Use optional chaining per CodeRabbit suggestion
Pushing...
To github.com:org/repo.git
f1e2d3c..a1b2c3d ba/abc-123 -> ba/abc-123
Signaling blocked (comment 4 needs decision)...
Done.
Addressed: 3 comments
Blocked: 1 (comment about validate() function)
PR: https://github.com/org/repo/pull/42
$ /notes 43
Checking out PR #43...
Fetching comments...
Found 2 comments:
1. [human] "Fix typo in variable name" (line 12)
2. [human] "Add logging here" (line 45)
Addressing comment 1: Fix typo...
Addressing comment 2: Add logging...
Committing fixes...
Pushing...
Signaling success...
Done.
Addressed: 2 comments
Blocked: 0
PR: https://github.com/org/repo/pull/43
Use when working with Payload CMS projects (payload.config.ts, collections, fields, hooks, access control, Payload API). Use when debugging validation errors, security issues, relationship queries, transactions, or hook behavior.