{"skill":{"slug":"pr-advocacy","displayName":"PR Advocacy","summary":"Monitor PR status every 4 hours, promptly address feedback and CI issues, communicate clearly within 24 hours, and drive reviews to timely merge.","description":"# PR Advocacy Skill\n\n## Purpose\nActively monitor, respond to, and drive Pull Request reviews to completion. This skill ensures PRs don't get stuck in review limbo and addresses maintainer feedback promptly.\n\n## Core Responsibilities\n\n### 1. PR Status Monitoring\n- Check PR status every heartbeat cycle (1 hour)\n- Monitor CI/CD check results\n- Track reviewer comments and requested changes\n- Identify blocking vs non-blocking feedback\n\n### 2. Professional Response Protocol\n- Acknowledge all reviewer feedback within 24 hours\n- Provide clear, technical responses to questions\n- Implement requested changes promptly when valid\n- Politely justify decisions when disagreeing with feedback\n\n### 3. Proactive Issue Resolution\n- Fix CI/CD failures immediately\n- Address merge conflicts proactively  \n- Update documentation when code changes\n- Add tests for edge cases identified by reviewers\n\n### 4. PR Health Assessment\n- **Green Status**: All checks pass, no pending reviews → Wait for merge\n- **Yellow Status**: Minor feedback, passing checks → Respond and wait\n- **Red Status**: Failing checks or major feedback → Immediate action required\n- **Stale Status**: No activity for 48+ hours → Gentle ping to reviewers\n\n## PR Status Processing Rules\n\n### OPEN State Handling\nWhen a PR is in OPEN state:\n- **Check for maintainer/reviewer comments** pointing out issues\n- **If feedback requires changes**:\n  - Analyze the specific feedback content\n  - Create fixes according to maintainer suggestions\n  - Automatically commit changes to the PR branch\n  - Update PR description if needed\n  - Record fix details for learning\n- **If no issues found**:\n  - Continue monitoring CI/CD status\n  - Wait for merge approval\n\n### CLOSED/REJECTED State Handling  \nWhen a PR is CLOSED or REJECTED:\n- **Immediately remove from active tracking list**\n- **Stop all monitoring activities** for this PR\n- **Record closure reason** for future learning and improvement\n- **Do not attempt to resubmit** unless explicitly instructed\n\n### MERGED State Handling\nWhen a PR is successfully MERGED:\n- **Remove from active tracking list**\n- **Add to merged records** for success tracking\n- **Celebrate the contribution!**\n- **Update skills and workflows** based on successful patterns\n\n## Real-time Tracking List Synchronization\n\n### Automatic Updates\n- **After any PR status change**, immediately update the tracking list file\n- **When PRs are added/removed**, synchronize the tracking list in real-time\n- **Prevent information loss** by ensuring all changes are persisted to disk\n- **Maintain accurate state** by writing updates immediately after processing\n\n### Tracking List File Management\n- **Location**: `/Users/hope/.openclaw/agents/coding/workspace/memory/pr-tracking-list.md`\n- **Format**: Markdown with clear sections for active, closed, and merged PRs\n- **Updates**: Atomic writes to prevent corruption during concurrent access\n- **Backup**: Maintain version history through git commits for rollback capability\n\n### Synchronization Workflow\n1. **Detect PR status change** (OPEN/CLOSED/MERGED)\n2. **Process the change** according to status rules\n3. **Update tracking list file** immediately with new state\n4. **Verify file integrity** to ensure no data loss\n5. **Log the update** for audit trail and debugging\n\n### Error Handling\n- **File write failures**: Retry with exponential backoff\n- **Concurrent access**: Use atomic file operations to prevent race conditions\n- **Data corruption**: Validate file format before and after updates\n- **Recovery**: Maintain backup copies for emergency restoration\n\n## Implementation Guidelines\n\n### Check Status Analysis\n```bash\n# Check PR status and checks\ngh pr view <PR_NUMBER> --json statusCheckRollup,reviewDecision\n\n# Common check statuses:\n# - SUCCESS: All good\n# - FAILURE: Needs immediate fixing  \n# - PENDING: Still running\n# - NEUTRAL: Non-blocking (like coverage)\n```\n\n### Reviewer Feedback Response Template\n```\nThanks for the review! \n\nFor [specific comment]:\n- [Action taken or explanation]\n- [Technical justification if disagreeing]\n\nI've [implemented the change / pushed an update / clarified the approach] in [commit reference].\n\nLet me know if you need any additional changes!\n```\n\n### Common PR Issues & Solutions\n\n#### CI/CD Failures\n- **Lint errors**: Run `npm run lint -- --fix` locally first\n- **Test failures**: Reproduce locally, add missing test cases\n- **Build errors**: Verify dependencies, check Node.js version compatibility\n\n#### Code Review Feedback  \n- **Style issues**: Follow project's `.editorconfig` and style guide\n- **Architecture concerns**: Reference existing patterns in codebase\n- **Security concerns**: Prioritize security fixes, add validation layers\n\n#### Documentation Gaps\n- **Missing docs**: Add/update relevant documentation files\n- **Inconsistent formatting**: Use project's markdown template\n- **Outdated examples**: Update code examples to match new implementation\n\n## Automation Integration\n\n### Heartbeat Integration\n- Integrate with existing heartbeat monitoring system (every hour)\n- Add PR status to daily summary reports\n- Escalate stale PRs after 48 hours of inactivity\n\n### Memory Tracking\n- Maintain PR tracking list in workspace memory\n- **Automatically clean up closed/rejected PRs** from tracking list\n- **Real-time synchronization** of tracking list file after any PR status change\n- Record resolution outcomes for learning\n- Update core memory with successful advocacy patterns\n\n### Automatic Response Workflow\n1. **Detect feedback** on OPEN PRs\n2. **Analyze requirements** and create appropriate fixes\n3. **Commit changes** to existing PR branch\n4. **Update tracking status** and notify maintainers\n5. **Handle closure** by removing from active monitoring\n6. **Synchronize tracking list file** immediately after any change\n\n## Success Metrics\n\n- **Response time**: < 24 hours to reviewer feedback\n- **Resolution rate**: > 90% of PRs merged within 7 days  \n- **Rework rate**: < 10% of PRs require major revisions after initial review\n- **Maintainer satisfaction**: Positive feedback from maintainers on communication quality\n- **Data integrity**: 100% tracking list accuracy with zero information loss\n\n## Best Practices\n\n### Communication\n- Be concise but thorough in responses\n- Use code blocks for technical explanations\n- Reference specific line numbers when discussing changes\n- Thank reviewers for their time and expertise\n\n### Technical Excellence  \n- Ensure changes are minimal and focused\n- Maintain backward compatibility when possible\n- Follow project conventions exactly\n- Test changes thoroughly before pushing\n\n### Professionalism\n- Never argue with reviewers; seek to understand their perspective\n- Admit mistakes quickly and fix them\n- Offer to help with related issues when appropriate\n- Celebrate successful merges and thank maintainers","tags":{"automation":"1.0.3","github":"1.0.3","latest":"1.0.3","pr":"1.0.3","review":"1.0.3","tracking":"1.0.3"},"stats":{"comments":0,"downloads":824,"installsAllTime":1,"installsCurrent":1,"stars":0,"versions":4},"createdAt":1772471050788,"updatedAt":1779077489567},"latestVersion":{"version":"1.0.3","createdAt":1772555702529,"changelog":"- Adds real-time synchronization of the PR tracking list file after any PR status change.\n- Introduces detailed guidelines for tracking list file management, atomic updates, error handling, and data recovery.\n- Updates memory tracking and automation sections to emphasize immediate tracking list updates for improved data integrity.\n- Expands success metrics to include tracking list accuracy and information loss prevention.","license":null},"metadata":null,"owner":{"handle":"linux2010","userId":"s1751dhnzp0ph63jb85dgvkztd83hhdp","displayName":"Andy Tien","image":"https://avatars.githubusercontent.com/u/35169750?v=4"},"moderation":{"isSuspicious":false,"isMalwareBlocked":false,"verdict":"clean","reasonCodes":["review.llm_review"],"summary":"Review: review.llm_review","engineVersion":"v2.4.24","updatedAt":1780089744856}}