|
| 1 | +# tb-iterate-review-tickets |
| 2 | + |
| 3 | +Find one ticket in review that matches this worker's shard, then actively work on its PR. |
| 4 | + |
| 5 | +**IMPORTANT**: Do not just list PRs or tickets. Pick ONE and actively work on it. |
| 6 | + |
| 7 | +## Parse Shard Info |
| 8 | + |
| 9 | +This command is invoked with shard information in the prompt: |
| 10 | +- Worker shard index (e.g., 0, 1, 2) |
| 11 | +- Total workers (e.g., 3) |
| 12 | + |
| 13 | +## Find a Ticket |
| 14 | + |
| 15 | +Use Linear MCP to query for tickets in project "Notebook Examples" with label "docs:examples" |
| 16 | +that have status "In Review". |
| 17 | + |
| 18 | +Filter the results to only tickets where: |
| 19 | +`(numeric_portion_of_ticket_id % total_workers) == worker_index` |
| 20 | + |
| 21 | +For example, if the ticket ID is "EXA-123" and this is worker 1 of 3: |
| 22 | +- Extract 123 from the ID |
| 23 | +- Check: 123 % 3 = 0, which does not equal 1 |
| 24 | +- Skip this ticket |
| 25 | + |
| 26 | +**Pick the first matching ticket.** If no matching tickets are found, say "No tickets for this shard" and exit. |
| 27 | + |
| 28 | +## Find the Associated PR |
| 29 | + |
| 30 | +From the selected ticket, find the associated GitHub PR. Check: |
| 31 | +- The ticket description for a PR link |
| 32 | +- Comments on the ticket |
| 33 | +- Or use `gh pr list` to find PRs mentioning the ticket ID |
| 34 | + |
| 35 | +**If no PR is found, say "No PR found for ticket [ID]" and exit.** |
| 36 | + |
| 37 | +## Checkout the PR Branch |
| 38 | + |
| 39 | +Run these commands to checkout the PR branch: |
| 40 | +```bash |
| 41 | +git fetch origin |
| 42 | +gh pr checkout <PR_NUMBER> |
| 43 | +``` |
| 44 | + |
| 45 | +## Run PR Iteration |
| 46 | + |
| 47 | +**Now actively work on this PR.** Check for CI failures, review comments, or inline comments using: |
| 48 | +```bash |
| 49 | +gh pr checks <PR_NUMBER> |
| 50 | +gh pr view <PR_NUMBER> --comments |
| 51 | +``` |
| 52 | + |
| 53 | +For each error or piece of feedback, first assess the scope: |
| 54 | + |
| 55 | +**Small/easy fixes (address now):** |
| 56 | +- Typos, formatting issues, minor code improvements |
| 57 | +- Bug fixes directly related to the PR's purpose |
| 58 | +- Clarifications or documentation improvements within scope |
| 59 | + |
| 60 | +For these: |
| 61 | +- Plan and implement a fix for the problem |
| 62 | +- Make a commit that describes the change |
| 63 | +- Push the commit |
| 64 | +- Reply saying the feedback was addressed and mark the conversation as resolved |
| 65 | + |
| 66 | +**Large or out-of-scope changes (defer to follow-up):** |
| 67 | +- Significant refactoring beyond the PR's original purpose |
| 68 | +- New features or enhancements not in the original ticket |
| 69 | +- Changes that would require substantial additional testing or refactoring |
| 70 | +- Suggestions that are good ideas but not blocking for this PR |
| 71 | + |
| 72 | +For these, create a follow-up ticket: |
| 73 | + |
| 74 | +1. **Create a Linear issue** in the "Notebook Examples" project with: |
| 75 | + - **Title**: A clear, actionable summary of the feedback |
| 76 | + - **Labels**: `docs:examples` and `Improvement` |
| 77 | + - **Description** that includes: |
| 78 | + - The original feedback/suggestion |
| 79 | + - Link to the PR where this was raised |
| 80 | + - Link to the original ticket this is a follow-up to |
| 81 | + - Any relevant context about why this was deferred |
| 82 | + - The standard implementation instructions: |
| 83 | + |
| 84 | +``` |
| 85 | +This ticket needs to be implemented in the https://github.com/pinecone-io/examples repository. |
| 86 | +
|
| 87 | +Pull master to ensure you have the latest changes before beginning any implementation work. |
| 88 | +
|
| 89 | +When the fix is complete, the agent should: |
| 90 | +
|
| 91 | +1. **Quality Review** |
| 92 | + - Verify the notebook executes successfully from top to bottom |
| 93 | + - Ensure code follows Python best practices and is well-commented |
| 94 | + - Check that all markdown cells render correctly |
| 95 | + - Score this notebook according to the criteria in .github/NOTEBOOK_REVIEW_TEMPLATE.md and implement fixes for any issues uncovered. |
| 96 | +
|
| 97 | +2. **Create Pull Request** |
| 98 | + - Create a PR with a title that follows Conventional Commits format |
| 99 | + - Include a clear description of what was improved and why |
| 100 | + - Reference the related GitHub issue and Linear issue number |
| 101 | + - Summarize the value of the improvement |
| 102 | +``` |
| 103 | + |
| 104 | +2. **Reply on GitHub** with: "This is a good suggestion but outside the scope of this PR. Created follow-up ticket [TICKET-ID] to address this separately." |
| 105 | + |
| 106 | +3. **Mark the conversation as resolved** |
| 107 | + |
| 108 | +**Invalid feedback:** |
| 109 | +- If the problem does not exist, reply on GitHub with relevant context explaining why. Then resolve the conversation. |
| 110 | + |
| 111 | +Next, check the PR to see if there are any inline comments that are not part of a formal review. Follow the same procedure for confirming, fixing, and pushing changes. Mark the conversation as resolved when the fix has been pushed. |
| 112 | + |
| 113 | +## Done |
| 114 | + |
| 115 | +After completing work on this PR: |
| 116 | +- All addressable feedback should be fixed and pushed |
| 117 | +- All conversations should be resolved (either fixed or deferred with follow-up ticket) |
| 118 | +- Any follow-up tickets should be created in Linear |
| 119 | + |
| 120 | +Exit after processing this one PR. The next iteration will pick up the next ticket. |
| 121 | + |
| 122 | +**Remember**: The goal is to make progress on the PR, not just report its status. |
0 commit comments