[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6C1SZZ9A1PHS57CQZKRVJM7":3,"skill-same:01M6C1SZZ9A1PHS57CQZKRVJM7":69},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":26,"publishedAt":44,"linkOnly":45,"markdownContent":46,"markdownBody":47,"frontMatter":48,"refName":49,"commitSha":50,"skillDirectory":51,"forksCount":14,"repositoryHtmlUrl":52,"repositoryHomepageUrl":6,"ownerHtmlUrl":53,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":54,"install":55,"resources":68},"01M6C1SZZ9A1PHS57CQZKRVJM7","dev-workflow",null,"Automate the full development cycle from issue to pull request using GitHub Issues. Use when the user wants to work on a feature, fix a bug, start a dev task, or says things like \"let's work on\", \"implement\", or \"fix\".","cartaorobbin\u002Fpyramid-temporal","cartaorobbin","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F133803757?v=4","01M6C1SVA1FFVXFG0QTK8ZRNDV","robbin Pagamentos","01M6C1SVEDYW8ZDTP82V7DF2BQ",0,"MIT","https:\u002F\u002Fgithub.com\u002Fcartaorobbin\u002Fpyramid-temporal\u002Fblob\u002Fmain\u002F.cursor\u002Fskills\u002Fdev-workflow\u002FSKILL.md",[18,23],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000007","代码审查","SCENARIO","使用场景",{"categoryNo":24,"categoryName":25,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000023","Skill与智能体开发",[27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43],"workflow","dev","dev workflow","pull","use","fix","user","work","automate","work on","start","github","issues","github issues","development","pull request","implement","2026-11-10 10:12:30",false,"---\nname: dev-workflow\ndescription: Automate the full development cycle from issue to pull request using GitHub Issues. Use when the user wants to work on a feature, fix a bug, start a dev task, or says things like \"let's work on\", \"implement\", or \"fix\".\n---\n\n# Dev Workflow (GitHub Issues)\n\nGuide the developer through the full cycle: issue -> branch -> plan -> implement -> PR -> release.\n\n## GitHub API Access\n\nBefore performing any GitHub operations, determine which access method is available:\n\n1. **GitHub MCP** (preferred): Check if a GitHub MCP server is configured by scanning the mcps folder for a server matching `github` or containing `github` in its name. If found, verify with a `get_me` call. Note the server name for all subsequent MCP calls.\n2. **gh CLI** (fallback): Run `gh auth status` to verify authentication.\n\nIf neither is available, use `AskQuestion` to block the workflow:\n\n```\nprompt: \"GitHub authentication is required but not configured. Please set up a GitHub MCP server or run `gh auth login`, then continue.\"\noptions:\n  - id: retry\n    label: \"I've authenticated — retry\"\n```\n\nAfter the user selects retry, re-run the authentication checks above. If still failing, present the same `AskQuestion` again.\n\nAlso resolve `owner` and `repo` from the git remote:\n\n```bash\ngit remote get-url origin\n```\n\nParse `owner\u002Frepo` from the URL. Store these values — GitHub MCP tools require them as explicit parameters.\n\nUse the detected method consistently for all GitHub operations below. Each operation shows both methods: **MCP** first, then **CLI**.\n\n## Resume (Continuing from a Previous Chat)\n\nIf resuming an in-progress workflow (the user selected \"Continue current work\" from the chat triage), follow these steps instead of starting from Step 1:\n\n1. Get the current branch name:\n\n```bash\ngit branch --show-current\n```\n\n2. Determine if this is a sub-branch or a regular branch:\n   - **Sub-branch**: the branch name contains more than one `\u002F` after the type prefix (e.g., `feat\u002F42-new-feature\u002Frefactor-parser`). Extract the parent branch (everything before the last `\u002Fsegment`) and the issue number from the parent branch name.\n   - **Regular branch**: follows `\u003Ctype>\u002F\u003Cissue-number>-\u003Cslug>` (e.g., `fix\u002F42-login-timeout` → issue `42`).\n\n3. Fetch the issue details and comments:\n\n**Via MCP:**\n\n```\nCallMcpTool: server=github, toolName=issue_read\narguments: { \"owner\": \"\u003Cowner>\", \"repo\": \"\u003Crepo>\", \"issue_number\": \u003Cnumber>, \"method\": \"get\" }\n```\n\nThen fetch comments:\n\n```\nCallMcpTool: server=github, toolName=issue_read\narguments: { \"owner\": \"\u003Cowner>\", \"repo\": \"\u003Crepo>\", \"issue_number\": \u003Cnumber>, \"method\": \"get_comments\" }\n```\n\n**Via CLI:**\n\n```bash\ngh issue view \u003Cnumber> --json title,body,labels,number,comments\n```\n\n4. Search the issue comments for an **Implementation Plan** matching the current branch. Plan comments include the branch name in the heading (e.g., `## Implementation Plan (feat\u002F42-slug)`). If multiple plans exist, use the one matching the current branch. If found:\n   - Parse the plan tasks\n   - Cross-reference with the git log to determine which tasks are likely completed. Use `git log \u003Cbase>..HEAD --oneline` where `\u003Cbase>` is the parent branch for sub-branches, or `main` for regular branches.\n   - Create TodoWrite entries: mark completed tasks as `completed`, set the next unfinished task to `in_progress`, rest as `pending`\n   - Tell the user what was found and which task you'll resume from\n   - If this is a sub-branch, note the parent branch — PRs target the parent branch, and merge returns to it\n   - Continue from **Step 5: Execute**\n\n5. If no plan is found in the comments:\n   - Tell the user the issue context and that no plan was stored yet\n   - Continue from **Step 3: Plan**\n\n---\n\n## Sub-Branch Workflow\n\nA sub-branch is a child branch created from a feature branch for focused sub-tasks. It reuses the parent branch's issue and targets the parent branch for PRs.\n\n### Entering the sub-branch workflow\n\nWhen the user selects **subbranch** from the Resume-Aware Triage:\n\n1. Record the current branch as the **parent branch**.\n2. Extract the issue number from the parent branch name (same logic as Resume).\n3. Fetch the issue details to get context.\n4. Ask the user to describe the sub-task.\n5. Create the sub-branch:\n\n```bash\ngit checkout -b \u003Cparent-branch>\u002F\u003Csub-task-slug>\ngit push -u origin HEAD\n```\n\nExample: parent `fix\u002F42-login-timeout` + sub-task \"refactor parser\" → `fix\u002F42-login-timeout\u002Frefactor-parser`\n\n6. Continue from **Step 3: Plan** — skip Step 1 (Issue) and Step 2 (Branch) since the issue is reused and the branch is already created.\n\n### Sub-branch PR creation (Step 9 override)\n\nWhen creating a PR for a sub-branch, target the parent branch instead of main:\n\n**Via MCP:**\n\n```\nCallMcpTool: server=github, toolName=create_pull_request\narguments: { \"owner\": \"\u003Cowner>\", \"repo\": \"\u003Crepo>\", \"title\": \"\u003Ctitle>\", \"body\": \"\u003Cbody>\", \"head\": \"\u003Csub-branch-name>\", \"base\": \"\u003Cparent-branch>\" }\n```\n\n**Via CLI:**\n\n```bash\ngh pr create --base \u003Cparent-branch> --title \"\u003Ctitle>\" --body \"\u003Cbody>\"\n```\n\nIf using the `make-a-pull-request` skill, pass `--base \u003Cparent-branch>` to ensure the PR targets the parent.\n\n### Sub-branch merge (Step 12 override)\n\nAfter the sub-branch PR is merged:\n\n1. Check out the parent branch and pull to get the merged changes:\n\n```bash\ngit checkout \u003Cparent-branch> && git pull\n```\n\nIf the parent branch no longer exists (it was already merged and deleted), check out `main` and pull instead. Inform the user that the parent branch was already merged.\n\n2. Resume the parent branch's workflow — extract the issue number from the parent branch name, fetch the implementation plan, and pick up where the parent left off. Follow the same logic as the **Resume** section.\n\n### Sub-branch nesting\n\nSub-branches are intended to be **one level deep** (e.g., `feat\u002F42-slug\u002Fsub-task`). Deeper nesting is not supported.\n\n---\n\n## Step 1: Issue\n\nUse AskQuestion:\n\n```\nprompt: \"Do you already have a GitHub issue for this work?\"\noptions:\n  - Yes, I have an issue URL\n  - No, let's create one\n```\n\n### If the user has an issue\n\nAsk for the issue URL or number. Fetch the issue details:\n\n**Via MCP:**\n\n```\nCallMcpTool: server=github, toolName=issue_read\narguments: { \"owner\": \"\u003Cowner>\", \"repo\": \"\u003Crepo>\", \"issue_number\": \u003Cnumber>, \"method\": \"get\" }\n```\n\n**Via CLI:**\n\n```bash\ngh issue view \u003Cnumber> --json title,body,labels,number\n```\n\nParse the title, description, and labels for context.\n\n### If the user does not have an issue\n\nDiscuss the work with the user to define:\n- **Title**: concise summary\n- **Description**: what needs to happen and why\n- **Labels**: bug, feature, enhancement, etc.\n\nWhen the issue is well-defined, create it:\n\n**Via MCP:**\n\n```\nCallMcpTool: server=github, toolName=issue_write\narguments: { \"owner\": \"\u003Cowner>\", \"repo\": \"\u003Crepo>\", \"method\": \"create\", \"title\": \"\u003Ctitle>\", \"body\": \"\u003Cdescription>\", \"labels\": [\"\u003Clabel1>\", \"\u003Clabel2>\"] }\n```\n\n**Via CLI:**\n\n```bash\ngh issue create --title \"\u003Ctitle>\" --body \"\u003Cdescription>\" --label \"\u003Clabels>\"\n```\n\nCapture the issue number from the output.\n\n## Step 2: Branch\n\nDetermine the branch type from labels or context:\n- `bug` label -> `bug\u002F`\n- `feature` or `enhancement` label -> `feat\u002F`\n- otherwise -> `task\u002F`\n\nCreate a slug from the issue title (lowercase, hyphens, max 40 chars).\n\n```bash\ngit checkout -b \u003Ctype>\u002F\u003Cissue-number>-\u003Cslug>\ngit push -u origin HEAD\n```\n\nExample: `bug\u002F42-login-timeout`\n\n## Step 3: Plan\n\nTell the user: \"Switching to plan mode to design the implementation.\"\n\nUse the SwitchMode tool to enter plan mode. Then create an implementation plan by:\n1. Reading the issue description\n2. Exploring the relevant parts of the codebase\n3. Drafting a step-by-step plan with specific files and changes\n\nThe plan should include:\n- A summary of the approach\n- Ordered list of tasks (each should be a concrete, testable unit of work)\n- Files to create or modify per task\n- Test strategy\n\nWait for the user to review and approve the plan.\n\n## Step 4: Store Plan\n\nOnce the plan is approved:\n\n1. Post the plan as a comment on the issue. Include the branch name in the heading so that multiple plans on the same issue (e.g., parent + sub-branch) can be distinguished:\n\n**Via MCP:**\n\n```\nCallMcpTool: server=github, toolName=add_issue_comment\narguments: { \"owner\": \"\u003Cowner>\", \"repo\": \"\u003Crepo>\", \"issue_number\": \u003Cnumber>, \"body\": \"## Implementation Plan (`\u003Cbranch-name>`)\\n\\n\u003Cthe approved plan>\" }\n```\n\n**Via CLI:**\n\n```bash\ngh issue comment \u003Cnumber> --body \"$(cat \u003C\u003C'EOF'\n## Implementation Plan (`\u003Cbranch-name>`)\n\n\u003Cpaste the approved plan here>\n\nEOF\n)\"\n```\n\n2. Create TodoWrite entries for each task in the plan. Set the first task to `in_progress`, the rest to `pending`.\n\n## Step 5: Execute\n\nSwitch back to agent mode using the SwitchMode tool.\n\n### Bug fix: delegate to the fix-bug skill (TDD)\n\nIf the issue has a `bug` label (or was created via the \"Fix a bug\" triage), do **not** implement ad hoc. Read `.cursor\u002Fskills\u002Ffix-bug\u002FSKILL.md` and follow it starting from **Phase 1** — **skip its Phase 0** (Track the Work), because the issue and branch were already created in Steps 1-2. The skill enforces the TDD discipline: understand the bug, write a failing test, make the minimal fix, and verify no regressions.\n\nReturn here for Step 6 (Sync) once the fix is verified.\n\n### Standard execution\n\nWork through the tasks sequentially:\n1. Pick the current `in_progress` task\n2. Implement the changes (if this is a bug fix, follow the fix-bug skill per the delegation above)\n3. Run tests if applicable\n4. Mark the task as `completed` in TodoWrite\n5. Move the next task to `in_progress`\n\nAfter completing each task, post a progress comment on the issue:\n\n**Via MCP:**\n\n```\nCallMcpTool: server=github, toolName=add_issue_comment\narguments: { \"owner\": \"\u003Cowner>\", \"repo\": \"\u003Crepo>\", \"issue_number\": \u003Cnumber>, \"body\": \"Completed: \u003Ctask description>\" }\n```\n\n**Via CLI:**\n\n```bash\ngh issue comment \u003Cnumber> --body \"Completed: \u003Ctask description>\"\n```\n\n## Step 6: Sync\n\nThroughout execution, keep the issue and TodoWrite aligned:\n- When a task is completed locally, comment on the issue\n- If the plan needs adjustment mid-execution, update both the TodoWrite list and post an updated plan comment on the issue\n- If new tasks emerge, add them to both TodoWrite and the issue\n\nAfter all implementation tasks are complete, post a completion summary on the issue before proceeding.\n\n## Step 7: Update Knowledge\n\nBefore creating the PR, update the project's knowledge files:\n\n1. Check if the changes affect a feature area that has an existing `knowledge\u002F*.md` file — if so, read the file and update any sections that are now stale. Rewrite sections to reflect the current state rather than appending notes.\n2. If a new feature area was introduced and no knowledge file exists, create one following the structure in `.cursor\u002Frules\u002Fknowledge.mdc` (Overview, Design Decisions, API Surface, Key Learnings \u002F Gotchas).\n3. If the changes affect the overall architecture, update `knowledge\u002Farchitecture.md`.\n4. Commit knowledge updates separately:\n\n```bash\ngit add knowledge\u002F\ngit commit -m \"docs: update knowledge for \u003Cfeature>\"\n```\n\n## Step 8: Verify\n\nBefore creating the PR, run quality checks to confirm nothing is broken:\n\n1. **Discover quality commands** — if this is the first verify run in the session, follow the Quality Command Discovery protocol in the quality-assurance skill (Section B) to find the project's actual quality commands (Makefile targets, CI config, or per-language defaults).\n2. **Run the discovered commands.** All checks must pass.\n3. If any check fails, fix the issues and re-run until green.\n4. Do **not** proceed to the PR step with failing checks.\n\n## Step 9: Pull Request\n\nWhen all tasks are complete and tests pass:\n\nCheck if a `make-a-pull-request` skill is available at `.cursor\u002Fskills\u002Fmake-a-pull-request\u002FSKILL.md`.\n\n**If the skill exists:**\n\n1. Read the skill file.\n2. Follow its instructions, passing the issue number and title already known from the workflow.\n3. Store the returned PR number and URL for subsequent steps.\n\n**If the skill does not exist**, create the PR inline:\n\n1. Ensure all changes are committed\n2. Push the branch: `git push`\n3. Create the PR:\n\n**Via MCP:**\n\n```\nCallMcpTool: server=github, toolName=create_pull_request\narguments: { \"owner\": \"\u003Cowner>\", \"repo\": \"\u003Crepo>\", \"title\": \"\u003Cissue-title>\", \"body\": \"## Summary\\n\u003C1-3 bullet points>\\n\\nCloses #\u003Cissue-number>\\n\\n## Test plan\\n\u003Cchecklist>\", \"head\": \"\u003Cbranch-name>\", \"base\": \"main\" }\n```\n\n**Via CLI:**\n\n```bash\ngh pr create --title \"\u003Cissue-title>\" --body \"$(cat \u003C\u003C'EOF'\n## Summary\n\u003C1-3 bullet points describing what was done>\n\nCloses #\u003Cissue-number>\n\n## Test plan\n\u003Cchecklist of how to verify the changes>\n\nEOF\n)\"\n```\n\n4. Tell the user the PR is ready for review and provide the PR URL.\n\n## Step 10: Code Review\n\nAfter the PR is created, check if a code-review skill is available at `.cursor\u002Fskills\u002Fcode-review\u002FSKILL.md`.\n\nIf the skill exists:\n\n1. Read the skill file.\n2. Launch a `Task` subagent (`subagent_type=\"generalPurpose\"`) with:\n   - The full contents of the code-review skill as the prompt instructions\n   - The PR number, owner, and repo already known from the workflow\n   - A directive to skip Phase 1 (PR selection) — the PR number is already known, start from Phase 1.2\n3. Wait for the subagent to complete.\n4. Display the subagent's summary to the user (link to PR, number of inline comments posted by severity).\n\nIf the subagent fails or times out, inform the user that the automated review could not be completed and suggest running it manually later (e.g., \"review this PR\").\n\nIf the skill does not exist, skip this step.\n\n## Step 11: Address Review Comments\n\nAfter the code review is posted (or when resuming after a human review), resolve review comments in a loop. This step handles comments from any source — the automated review agent, human reviewers, or other bots.\n\nIf no code-review skill is installed and no review has been posted yet, skip to Step 12.\n\n### 11.1 Fetch unresolved review threads\n\nQuery all review threads and filter to unresolved ones:\n\n**Via MCP (if a GraphQL tool is available):**\n\nUse the repository's pull request review threads query.\n\n**Via CLI:**\n\n```bash\ngh api graphql -f query='\n  query {\n    repository(owner: \"\u003Cowner>\", name: \"\u003Crepo>\") {\n      pullRequest(number: \u003Cnumber>) {\n        reviewThreads(first: 100) {\n          nodes {\n            id\n            isResolved\n            comments(first: 10) {\n              nodes {\n                body\n                path\n                line\n                databaseId\n                author { login }\n              }\n            }\n          }\n        }\n      }\n    }\n  }'\n```\n\nFilter to threads where `isResolved` is `false`. If no unresolved threads remain, skip to Step 12.\n\n### 11.2 Triage each comment\n\nFor each unresolved thread, read the first comment (the review comment) and:\n\n1. Read the comment body, file path, and line number.\n2. Read the surrounding code to understand the context.\n3. Classify the comment:\n   - **Agree** — the feedback is correct and actionable. The agent is confident it can fix it.\n   - **Questionable** — the comment might be wrong, is subjective, conflicts with project conventions, or the agent is unsure. This includes comments from unknown authors or comments that suggest architectural changes.\n   - **Nit** — minor stylistic preference that does not affect correctness.\n\n### 11.3 Handle agreed comments\n\nFor comments classified as **agree**:\n\n1. Make the code change.\n2. Reply to the comment explaining what was done:\n\n**Via CLI:**\n\n```bash\ngh api repos\u002F\u003Cowner>\u002F\u003Crepo>\u002Fpulls\u002F\u003Cnumber>\u002Fcomments \\\n  -X POST \\\n  -f body=\"Fixed — \u003Cbrief explanation of the change>.\" \\\n  -F in_reply_to=\u003Ccomment_database_id>\n```\n\n3. Resolve the thread:\n\n```bash\ngh api graphql -f query='\n  mutation {\n    resolveReviewThread(input: {threadId: \"\u003Cthread_id>\"}) {\n      thread { isResolved }\n    }\n  }'\n```\n\n### 11.4 Handle questionable comments\n\nFor comments classified as **questionable**, present them to the user:\n\n```\nprompt: \"Review comment on `\u003Cfile>:\u003Cline>` by @\u003Cauthor>:\\n\\n> \u003Ccomment body>\\n\\nWhat should we do?\"\noptions:\n  - Fix it as suggested\n  - Skip — reply explaining why\n  - Let me write a custom response\n```\n\n- **Fix it as suggested**: treat as an agreed comment (11.3).\n- **Skip**: reply with a brief rationale and resolve the thread. Ask the user for the rationale if not obvious.\n- **Custom response**: ask the user for the response text, post it as a reply, and leave the thread **unresolved** for the reviewer to follow up.\n\n### 11.5 Handle nits\n\nFor comments classified as **nit**, use `AskQuestion`:\n\n```\nprompt: \"Nit on `\u003Cfile>:\u003Cline>` by @\u003Cauthor>:\\n\\n> \u003Ccomment body>\\n\\nAddress it?\"\noptions:\n  - Yes, fix it\n  - No, skip it\n```\n\nIf yes, treat as agreed (11.3). If no, reply acknowledging the nit and resolve the thread.\n\n### 11.6 Commit, push, and re-review\n\nAfter all unresolved threads have been processed:\n\n1. If any code changes were made, commit and push:\n\n```bash\ngit add -A\ngit commit -m \"fix: address review comments\"\ngit push\n```\n\n2. If a code-review skill is available, re-run the code review agent (same as Step 10) to check if the fixes introduced new issues.\n\n3. Return to 11.1 to check for new unresolved threads.\n\n### 11.7 Loop termination\n\nThe loop exits when:\n- No unresolved threads with severity `critical` or `suggestion` remain.\n- Maximum **3 iterations** have been reached. If the max is reached, warn the user and proceed to Step 12.\n\n## Step 12: Review & Merge\n\nBefore presenting the options, check if a code-review skill is available at `.cursor\u002Fskills\u002Fcode-review\u002FSKILL.md`.\n\nUse the **`AskQuestion`** tool. If the code-review skill exists, include the \"Run code review\" option; otherwise omit it:\n\n```\nprompt: \"What would you like to do next?\"\noptions:\n  - Run code review  # only include if code-review skill exists\n  - Check review status now\n  - PR is approved, please merge\n  - Come back later — I'll request a review myself\n```\n\n### If \"Run code review\"\n\n1. Read the code-review skill from `.cursor\u002Fskills\u002Fcode-review\u002FSKILL.md`.\n2. Launch a `Task` subagent (`subagent_type=\"generalPurpose\"`) with:\n   - The full contents of the code-review skill as the prompt instructions\n   - The PR number, owner, and repo already known from the workflow\n   - A directive to skip Phase 1 (PR selection) — the PR number is already known, start from Phase 1.2\n3. Wait for the subagent to complete.\n4. Display the subagent's summary to the user (link to PR, number of inline comments posted by severity).\n\nIf the subagent fails or times out, inform the user that the review could not be completed and suggest running it manually later (e.g., \"review this PR\").\n\nAfter the review completes (or fails), return to Step 11 (Address Review Comments) to process any new comments, then present the Step 12 AskQuestion again.\n\n### If \"Check review status now\"\n\n1. Check CI status and review state:\n\n**Via MCP:**\n\n```\nCallMcpTool: server=github, toolName=pull_request_read\narguments: { \"owner\": \"\u003Cowner>\", \"repo\": \"\u003Crepo>\", \"pullNumber\": \u003Cnumber>, \"method\": \"get_check_runs\" }\n```\n\n```\nCallMcpTool: server=github, toolName=pull_request_read\narguments: { \"owner\": \"\u003Cowner>\", \"repo\": \"\u003Crepo>\", \"pullNumber\": \u003Cnumber>, \"method\": \"get_reviews\" }\n```\n\n**Via CLI:**\n\n```bash\ngh pr checks\ngh pr view --json reviewDecision,reviews,statusCheckRollup\n```\n\n2. Summarize the current state:\n   - CI checks: passing \u002F failing \u002F pending\n   - Review status: approved \u002F changes requested \u002F pending \u002F no reviewers\n\n3. **If checks pass and reviews are approved**, use **AskQuestion**:\n\n```\nprompt: \"PR is approved and checks pass. Merge it?\"\noptions:\n  - Yes, squash and merge\n  - Yes, merge commit\n  - Yes, rebase and merge\n  - No, not yet\n```\n\n4. If the user selects a merge strategy:\n\n**Via MCP:**\n\n```\nCallMcpTool: server=github, toolName=merge_pull_request\narguments: { \"owner\": \"\u003Cowner>\", \"repo\": \"\u003Crepo>\", \"pullNumber\": \u003Cnumber>, \"merge_method\": \"\u003Csquash|merge|rebase>\" }\n```\n\nThen switch to main locally:\n\n```bash\ngit checkout main && git pull\n```\n\n**Via CLI:**\n\n```bash\ngh pr merge --\u003Cstrategy> --delete-branch\ngit checkout main && git pull\n```\n\n5. If checks are failing or reviews are not yet approved, tell the user what is pending and suggest coming back later.\n\n### If \"PR is approved, please merge\"\n\nUse **AskQuestion**:\n\n```\nprompt: \"Which merge strategy?\"\noptions:\n  - Squash and merge\n  - Merge commit\n  - Rebase and merge\n```\n\nThen merge:\n\n**Via MCP:**\n\n```\nCallMcpTool: server=github, toolName=merge_pull_request\narguments: { \"owner\": \"\u003Cowner>\", \"repo\": \"\u003Crepo>\", \"pullNumber\": \u003Cnumber>, \"merge_method\": \"\u003Csquash|merge|rebase>\" }\n```\n\nThen switch to main locally:\n\n```bash\ngit checkout main && git pull\n```\n\n**Via CLI:**\n\n```bash\ngh pr merge --\u003Cstrategy> --delete-branch\ngit checkout main && git pull\n```\n\n### If \"Come back later\"\n\nTell the user they can resume this step by asking to check the PR status or merge. End the current session here — the Release step runs after the PR is merged.\n\n## Step 13: Release\n\n> This step only applies to projects with a release flow.\n\nAfter the PR is merged:\n\n### 13.1 Determine the next version\n\n1. Detect the latest release tag:\n\n**Via MCP:**\n\n```\nCallMcpTool: server=github, toolName=list_releases\narguments: { \"owner\": \"\u003Cowner>\", \"repo\": \"\u003Crepo>\", \"perPage\": 1 }\n```\n\n**Via CLI:**\n\n```bash\ngh release list --limit 1\n```\n\n2. Determine the next version using semantic versioning:\n   - Bug fix -> patch bump (1.0.0 -> 1.0.1)\n   - Feature -> minor bump (1.0.0 -> 1.1.0)\n   - Breaking change -> major bump (1.0.0 -> 2.0.0)\n\n   Use the issue labels and nature of changes to decide.\n\n### 13.2 Bump the version in source files\n\nThe version in source files **must** match the release tag. Skipping this step causes CI publish failures (e.g., PyPI rejects duplicate versions).\n\n1. Detect where the version is defined. Check in order:\n   - `pyproject.toml` — look for a static `version = \"x.y.z\"` under `[project]` or `[tool.poetry]`\n   - `version.py` or `src\u002F\u003Cpackage>\u002F__version__.py` — a standalone version file\n   - `src\u002F\u003Cpackage>\u002F__init__.py` — a `__version__` variable\n\n2. Update **all** version sources found to the new version number.\n\n3. Confirm with the user before committing:\n\nUse **AskQuestion**:\n\n```\nprompt: \"Release v\u003Cnew-version> (current: v\u003Ccurrent-version>). Bump version and create release?\"\noptions:\n  - Yes, bump and release\n  - Change the version number\n  - Skip release for now\n```\n\nIf \"Change the version number\", ask for the desired version. If \"Skip release for now\", stop here.\n\n4. Commit and push the version bump:\n\n```bash\ngit add -A\ngit commit -m \"bump: v\u003Cversion>\"\ngit push\n```\n\n### 13.3 Create the release\n\n> No GitHub MCP equivalent exists for release creation — use `gh` CLI regardless of the detected method.\n\n```bash\ngh release create v\u003Cversion> --generate-notes --title \"v\u003Cversion>\"\n```\n\n### 13.4 Verify the release pipeline\n\nAfter creating the release, check that the triggered CI workflow succeeds:\n\n**Via MCP:**\n\n```\nCallMcpTool: server=github, toolName=actions_list\narguments: { \"owner\": \"\u003Cowner>\", \"repo\": \"\u003Crepo>\", \"method\": \"list_workflow_runs\", \"per_page\": 1 }\n```\n\n**Via CLI:**\n\n```bash\ngh run list --limit 1 --json name,status,conclusion,url\n```\n\nIf the workflow is still running, wait and re-check. If it fails, tell the user immediately with the run URL — do not wait for them to discover it.\n\nTell the user the release has been created and whether the publish pipeline succeeded.\n\n## Step 14: End\n\nSummarize what was accomplished:\n- Issue number and title\n- Branch name\n- Number of commits\n- PR URL\n- Release version (if applicable)\n","# Dev Workflow (GitHub Issues)\n\nGuide the developer through the full cycle: issue -> branch -> plan -> implement -> PR -> release.\n\n## GitHub API Access\n\nBefore performing any GitHub operations, determine which access method is available:\n\n1. **GitHub MCP** (preferred): Check if a GitHub MCP server is configured by scanning the mcps folder for a server matching `github` or containing `github` in its name. If found, verify with a `get_me` call. Note the server name for all subsequent MCP calls.\n2. **gh CLI** (fallback): Run `gh auth status` to verify authentication.\n\nIf neither is available, use `AskQuestion` to block the workflow:\n\n```\nprompt: \"GitHub authentication is required but not configured. Please set up a GitHub MCP server or run `gh auth login`, then continue.\"\noptions:\n  - id: retry\n    label: \"I've authenticated — retry\"\n```\n\nAfter the user selects retry, re-run the authentication checks above. If still failing, present the same `AskQuestion` again.\n\nAlso resolve `owner` and `repo` from the git remote:\n\n```bash\ngit remote get-url origin\n```\n\nParse `owner\u002Frepo` from the URL. Store these values — GitHub MCP tools require them as explicit parameters.\n\nUse the detected method consistently for all GitHub operations below. Each operation shows both methods: **MCP** first, then **CLI**.\n\n## Resume (Continuing from a Previous Chat)\n\nIf resuming an in-progress workflow (the user selected \"Continue current work\" from the chat triage), follow these steps instead of starting from Step 1:\n\n1. Get the current branch name:\n\n```bash\ngit branch --show-current\n```\n\n2. Determine if this is a sub-branch or a regular branch:\n   - **Sub-branch**: the branch name contains more than one `\u002F` after the type prefix (e.g., `feat\u002F42-new-feature\u002Frefactor-parser`). Extract the parent branch (everything before the last `\u002Fsegment`) and the issue number from the parent branch name.\n   - **Regular branch**: follows `\u003Ctype>\u002F\u003Cissue-number>-\u003Cslug>` (e.g., `fix\u002F42-login-timeout` → issue `42`).\n\n3. Fetch the issue details and comments:\n\n**Via MCP:**\n\n```\nCallMcpTool: server=github, toolName=issue_read\narguments: { \"owner\": \"\u003Cowner>\", \"repo\": \"\u003Crepo>\", \"issue_number\": \u003Cnumber>, \"method\": \"get\" }\n```\n\nThen fetch comments:\n\n```\nCallMcpTool: server=github, toolName=issue_read\narguments: { \"owner\": \"\u003Cowner>\", \"repo\": \"\u003Crepo>\", \"issue_number\": \u003Cnumber>, \"method\": \"get_comments\" }\n```\n\n**Via CLI:**\n\n```bash\ngh issue view \u003Cnumber> --json title,body,labels,number,comments\n```\n\n4. Search the issue comments for an **Implementation Plan** matching the current branch. Plan comments include the branch name in the heading (e.g., `## Implementation Plan (feat\u002F42-slug)`). If multiple plans exist, use the one matching the current branch. If found:\n   - Parse the plan tasks\n   - Cross-reference with the git log to determine which tasks are likely completed. Use `git log \u003Cbase>..HEAD --oneline` where `\u003Cbase>` is the parent branch for sub-branches, or `main` for regular branches.\n   - Create TodoWrite entries: mark completed tasks as `completed`, set the next unfinished task to `in_progress`, rest as `pending`\n   - Tell the user what was found and which task you'll resume from\n   - If this is a sub-branch, note the parent branch — PRs target the parent branch, and merge returns to it\n   - Continue from **Step 5: Execute**\n\n5. If no plan is found in the comments:\n   - Tell the user the issue context and that no plan was stored yet\n   - Continue from **Step 3: Plan**\n\n---\n\n## Sub-Branch Workflow\n\nA sub-branch is a child branch created from a feature branch for focused sub-tasks. It reuses the parent branch's issue and targets the parent branch for PRs.\n\n### Entering the sub-branch workflow\n\nWhen the user selects **subbranch** from the Resume-Aware Triage:\n\n1. Record the current branch as the **parent branch**.\n2. Extract the issue number from the parent branch name (same logic as Resume).\n3. Fetch the issue details to get context.\n4. Ask the user to describe the sub-task.\n5. Create the sub-branch:\n\n```bash\ngit checkout -b \u003Cparent-branch>\u002F\u003Csub-task-slug>\ngit push -u origin HEAD\n```\n\nExample: parent `fix\u002F42-login-timeout` + sub-task \"refactor parser\" → `fix\u002F42-login-timeout\u002Frefactor-parser`\n\n6. Continue from **Step 3: Plan** — skip Step 1 (Issue) and Step 2 (Branch) since the issue is reused and the branch is already created.\n\n### Sub-branch PR creation (Step 9 override)\n\nWhen creating a PR for a sub-branch, target the parent branch instead of main:\n\n**Via MCP:**\n\n```\nCallMcpTool: server=github, toolName=create_pull_request\narguments: { \"owner\": \"\u003Cowner>\", \"repo\": \"\u003Crepo>\", \"title\": \"\u003Ctitle>\", \"body\": \"\u003Cbody>\", \"head\": \"\u003Csub-branch-name>\", \"base\": \"\u003Cparent-branch>\" }\n```\n\n**Via CLI:**\n\n```bash\ngh pr create --base \u003Cparent-branch> --title \"\u003Ctitle>\" --body \"\u003Cbody>\"\n```\n\nIf using the `make-a-pull-request` skill, pass `--base \u003Cparent-branch>` to ensure the PR targets the parent.\n\n### Sub-branch merge (Step 12 override)\n\nAfter the sub-branch PR is merged:\n\n1. Check out the parent branch and pull to get the merged changes:\n\n```bash\ngit checkout \u003Cparent-branch> && git pull\n```\n\nIf the parent branch no longer exists (it was already merged and deleted), check out `main` and pull instead. Inform the user that the parent branch was already merged.\n\n2. Resume the parent branch's workflow — extract the issue number from the parent branch name, fetch the implementation plan, and pick up where the parent left off. Follow the same logic as the **Resume** section.\n\n### Sub-branch nesting\n\nSub-branches are intended to be **one level deep** (e.g., `feat\u002F42-slug\u002Fsub-task`). Deeper nesting is not supported.\n\n---\n\n## Step 1: Issue\n\nUse AskQuestion:\n\n```\nprompt: \"Do you already have a GitHub issue for this work?\"\noptions:\n  - Yes, I have an issue URL\n  - No, let's create one\n```\n\n### If the user has an issue\n\nAsk for the issue URL or number. Fetch the issue details:\n\n**Via MCP:**\n\n```\nCallMcpTool: server=github, toolName=issue_read\narguments: { \"owner\": \"\u003Cowner>\", \"repo\": \"\u003Crepo>\", \"issue_number\": \u003Cnumber>, \"method\": \"get\" }\n```\n\n**Via CLI:**\n\n```bash\ngh issue view \u003Cnumber> --json title,body,labels,number\n```\n\nParse the title, description, and labels for context.\n\n### If the user does not have an issue\n\nDiscuss the work with the user to define:\n- **Title**: concise summary\n- **Description**: what needs to happen and why\n- **Labels**: bug, feature, enhancement, etc.\n\nWhen the issue is well-defined, create it:\n\n**Via MCP:**\n\n```\nCallMcpTool: server=github, toolName=issue_write\narguments: { \"owner\": \"\u003Cowner>\", \"repo\": \"\u003Crepo>\", \"method\": \"create\", \"title\": \"\u003Ctitle>\", \"body\": \"\u003Cdescription>\", \"labels\": [\"\u003Clabel1>\", \"\u003Clabel2>\"] }\n```\n\n**Via CLI:**\n\n```bash\ngh issue create --title \"\u003Ctitle>\" --body \"\u003Cdescription>\" --label \"\u003Clabels>\"\n```\n\nCapture the issue number from the output.\n\n## Step 2: Branch\n\nDetermine the branch type from labels or context:\n- `bug` label -> `bug\u002F`\n- `feature` or `enhancement` label -> `feat\u002F`\n- otherwise -> `task\u002F`\n\nCreate a slug from the issue title (lowercase, hyphens, max 40 chars).\n\n```bash\ngit checkout -b \u003Ctype>\u002F\u003Cissue-number>-\u003Cslug>\ngit push -u origin HEAD\n```\n\nExample: `bug\u002F42-login-timeout`\n\n## Step 3: Plan\n\nTell the user: \"Switching to plan mode to design the implementation.\"\n\nUse the SwitchMode tool to enter plan mode. Then create an implementation plan by:\n1. Reading the issue description\n2. Exploring the relevant parts of the codebase\n3. Drafting a step-by-step plan with specific files and changes\n\nThe plan should include:\n- A summary of the approach\n- Ordered list of tasks (each should be a concrete, testable unit of work)\n- Files to create or modify per task\n- Test strategy\n\nWait for the user to review and approve the plan.\n\n## Step 4: Store Plan\n\nOnce the plan is approved:\n\n1. Post the plan as a comment on the issue. Include the branch name in the heading so that multiple plans on the same issue (e.g., parent + sub-branch) can be distinguished:\n\n**Via MCP:**\n\n```\nCallMcpTool: server=github, toolName=add_issue_comment\narguments: { \"owner\": \"\u003Cowner>\", \"repo\": \"\u003Crepo>\", \"issue_number\": \u003Cnumber>, \"body\": \"## Implementation Plan (`\u003Cbranch-name>`)\\n\\n\u003Cthe approved plan>\" }\n```\n\n**Via CLI:**\n\n```bash\ngh issue comment \u003Cnumber> --body \"$(cat \u003C\u003C'EOF'\n## Implementation Plan (`\u003Cbranch-name>`)\n\n\u003Cpaste the approved plan here>\n\nEOF\n)\"\n```\n\n2. Create TodoWrite entries for each task in the plan. Set the first task to `in_progress`, the rest to `pending`.\n\n## Step 5: Execute\n\nSwitch back to agent mode using the SwitchMode tool.\n\n### Bug fix: delegate to the fix-bug skill (TDD)\n\nIf the issue has a `bug` label (or was created via the \"Fix a bug\" triage), do **not** implement ad hoc. Read `.cursor\u002Fskills\u002Ffix-bug\u002FSKILL.md` and follow it starting from **Phase 1** — **skip its Phase 0** (Track the Work), because the issue and branch were already created in Steps 1-2. The skill enforces the TDD discipline: understand the bug, write a failing test, make the minimal fix, and verify no regressions.\n\nReturn here for Step 6 (Sync) once the fix is verified.\n\n### Standard execution\n\nWork through the tasks sequentially:\n1. Pick the current `in_progress` task\n2. Implement the changes (if this is a bug fix, follow the fix-bug skill per the delegation above)\n3. Run tests if applicable\n4. Mark the task as `completed` in TodoWrite\n5. Move the next task to `in_progress`\n\nAfter completing each task, post a progress comment on the issue:\n\n**Via MCP:**\n\n```\nCallMcpTool: server=github, toolName=add_issue_comment\narguments: { \"owner\": \"\u003Cowner>\", \"repo\": \"\u003Crepo>\", \"issue_number\": \u003Cnumber>, \"body\": \"Completed: \u003Ctask description>\" }\n```\n\n**Via CLI:**\n\n```bash\ngh issue comment \u003Cnumber> --body \"Completed: \u003Ctask description>\"\n```\n\n## Step 6: Sync\n\nThroughout execution, keep the issue and TodoWrite aligned:\n- When a task is completed locally, comment on the issue\n- If the plan needs adjustment mid-execution, update both the TodoWrite list and post an updated plan comment on the issue\n- If new tasks emerge, add them to both TodoWrite and the issue\n\nAfter all implementation tasks are complete, post a completion summary on the issue before proceeding.\n\n## Step 7: Update Knowledge\n\nBefore creating the PR, update the project's knowledge files:\n\n1. Check if the changes affect a feature area that has an existing `knowledge\u002F*.md` file — if so, read the file and update any sections that are now stale. Rewrite sections to reflect the current state rather than appending notes.\n2. If a new feature area was introduced and no knowledge file exists, create one following the structure in `.cursor\u002Frules\u002Fknowledge.mdc` (Overview, Design Decisions, API Surface, Key Learnings \u002F Gotchas).\n3. If the changes affect the overall architecture, update `knowledge\u002Farchitecture.md`.\n4. Commit knowledge updates separately:\n\n```bash\ngit add knowledge\u002F\ngit commit -m \"docs: update knowledge for \u003Cfeature>\"\n```\n\n## Step 8: Verify\n\nBefore creating the PR, run quality checks to confirm nothing is broken:\n\n1. **Discover quality commands** — if this is the first verify run in the session, follow the Quality Command Discovery protocol in the quality-assurance skill (Section B) to find the project's actual quality commands (Makefile targets, CI config, or per-language defaults).\n2. **Run the discovered commands.** All checks must pass.\n3. If any check fails, fix the issues and re-run until green.\n4. Do **not** proceed to the PR step with failing checks.\n\n## Step 9: Pull Request\n\nWhen all tasks are complete and tests pass:\n\nCheck if a `make-a-pull-request` skill is available at `.cursor\u002Fskills\u002Fmake-a-pull-request\u002FSKILL.md`.\n\n**If the skill exists:**\n\n1. Read the skill file.\n2. Follow its instructions, passing the issue number and title already known from the workflow.\n3. Store the returned PR number and URL for subsequent steps.\n\n**If the skill does not exist**, create the PR inline:\n\n1. Ensure all changes are committed\n2. Push the branch: `git push`\n3. Create the PR:\n\n**Via MCP:**\n\n```\nCallMcpTool: server=github, toolName=create_pull_request\narguments: { \"owner\": \"\u003Cowner>\", \"repo\": \"\u003Crepo>\", \"title\": \"\u003Cissue-title>\", \"body\": \"## Summary\\n\u003C1-3 bullet points>\\n\\nCloses #\u003Cissue-number>\\n\\n## Test plan\\n\u003Cchecklist>\", \"head\": \"\u003Cbranch-name>\", \"base\": \"main\" }\n```\n\n**Via CLI:**\n\n```bash\ngh pr create --title \"\u003Cissue-title>\" --body \"$(cat \u003C\u003C'EOF'\n## Summary\n\u003C1-3 bullet points describing what was done>\n\nCloses #\u003Cissue-number>\n\n## Test plan\n\u003Cchecklist of how to verify the changes>\n\nEOF\n)\"\n```\n\n4. Tell the user the PR is ready for review and provide the PR URL.\n\n## Step 10: Code Review\n\nAfter the PR is created, check if a code-review skill is available at `.cursor\u002Fskills\u002Fcode-review\u002FSKILL.md`.\n\nIf the skill exists:\n\n1. Read the skill file.\n2. Launch a `Task` subagent (`subagent_type=\"generalPurpose\"`) with:\n   - The full contents of the code-review skill as the prompt instructions\n   - The PR number, owner, and repo already known from the workflow\n   - A directive to skip Phase 1 (PR selection) — the PR number is already known, start from Phase 1.2\n3. Wait for the subagent to complete.\n4. Display the subagent's summary to the user (link to PR, number of inline comments posted by severity).\n\nIf the subagent fails or times out, inform the user that the automated review could not be completed and suggest running it manually later (e.g., \"review this PR\").\n\nIf the skill does not exist, skip this step.\n\n## Step 11: Address Review Comments\n\nAfter the code review is posted (or when resuming after a human review), resolve review comments in a loop. This step handles comments from any source — the automated review agent, human reviewers, or other bots.\n\nIf no code-review skill is installed and no review has been posted yet, skip to Step 12.\n\n### 11.1 Fetch unresolved review threads\n\nQuery all review threads and filter to unresolved ones:\n\n**Via MCP (if a GraphQL tool is available):**\n\nUse the repository's pull request review threads query.\n\n**Via CLI:**\n\n```bash\ngh api graphql -f query='\n  query {\n    repository(owner: \"\u003Cowner>\", name: \"\u003Crepo>\") {\n      pullRequest(number: \u003Cnumber>) {\n        reviewThreads(first: 100) {\n          nodes {\n            id\n            isResolved\n            comments(first: 10) {\n              nodes {\n                body\n                path\n                line\n                databaseId\n                author { login }\n              }\n            }\n          }\n        }\n      }\n    }\n  }'\n```\n\nFilter to threads where `isResolved` is `false`. If no unresolved threads remain, skip to Step 12.\n\n### 11.2 Triage each comment\n\nFor each unresolved thread, read the first comment (the review comment) and:\n\n1. Read the comment body, file path, and line number.\n2. Read the surrounding code to understand the context.\n3. Classify the comment:\n   - **Agree** — the feedback is correct and actionable. The agent is confident it can fix it.\n   - **Questionable** — the comment might be wrong, is subjective, conflicts with project conventions, or the agent is unsure. This includes comments from unknown authors or comments that suggest architectural changes.\n   - **Nit** — minor stylistic preference that does not affect correctness.\n\n### 11.3 Handle agreed comments\n\nFor comments classified as **agree**:\n\n1. Make the code change.\n2. Reply to the comment explaining what was done:\n\n**Via CLI:**\n\n```bash\ngh api repos\u002F\u003Cowner>\u002F\u003Crepo>\u002Fpulls\u002F\u003Cnumber>\u002Fcomments \\\n  -X POST \\\n  -f body=\"Fixed — \u003Cbrief explanation of the change>.\" \\\n  -F in_reply_to=\u003Ccomment_database_id>\n```\n\n3. Resolve the thread:\n\n```bash\ngh api graphql -f query='\n  mutation {\n    resolveReviewThread(input: {threadId: \"\u003Cthread_id>\"}) {\n      thread { isResolved }\n    }\n  }'\n```\n\n### 11.4 Handle questionable comments\n\nFor comments classified as **questionable**, present them to the user:\n\n```\nprompt: \"Review comment on `\u003Cfile>:\u003Cline>` by @\u003Cauthor>:\\n\\n> \u003Ccomment body>\\n\\nWhat should we do?\"\noptions:\n  - Fix it as suggested\n  - Skip — reply explaining why\n  - Let me write a custom response\n```\n\n- **Fix it as suggested**: treat as an agreed comment (11.3).\n- **Skip**: reply with a brief rationale and resolve the thread. Ask the user for the rationale if not obvious.\n- **Custom response**: ask the user for the response text, post it as a reply, and leave the thread **unresolved** for the reviewer to follow up.\n\n### 11.5 Handle nits\n\nFor comments classified as **nit**, use `AskQuestion`:\n\n```\nprompt: \"Nit on `\u003Cfile>:\u003Cline>` by @\u003Cauthor>:\\n\\n> \u003Ccomment body>\\n\\nAddress it?\"\noptions:\n  - Yes, fix it\n  - No, skip it\n```\n\nIf yes, treat as agreed (11.3). If no, reply acknowledging the nit and resolve the thread.\n\n### 11.6 Commit, push, and re-review\n\nAfter all unresolved threads have been processed:\n\n1. If any code changes were made, commit and push:\n\n```bash\ngit add -A\ngit commit -m \"fix: address review comments\"\ngit push\n```\n\n2. If a code-review skill is available, re-run the code review agent (same as Step 10) to check if the fixes introduced new issues.\n\n3. Return to 11.1 to check for new unresolved threads.\n\n### 11.7 Loop termination\n\nThe loop exits when:\n- No unresolved threads with severity `critical` or `suggestion` remain.\n- Maximum **3 iterations** have been reached. If the max is reached, warn the user and proceed to Step 12.\n\n## Step 12: Review & Merge\n\nBefore presenting the options, check if a code-review skill is available at `.cursor\u002Fskills\u002Fcode-review\u002FSKILL.md`.\n\nUse the **`AskQuestion`** tool. If the code-review skill exists, include the \"Run code review\" option; otherwise omit it:\n\n```\nprompt: \"What would you like to do next?\"\noptions:\n  - Run code review  # only include if code-review skill exists\n  - Check review status now\n  - PR is approved, please merge\n  - Come back later — I'll request a review myself\n```\n\n### If \"Run code review\"\n\n1. Read the code-review skill from `.cursor\u002Fskills\u002Fcode-review\u002FSKILL.md`.\n2. Launch a `Task` subagent (`subagent_type=\"generalPurpose\"`) with:\n   - The full contents of the code-review skill as the prompt instructions\n   - The PR number, owner, and repo already known from the workflow\n   - A directive to skip Phase 1 (PR selection) — the PR number is already known, start from Phase 1.2\n3. Wait for the subagent to complete.\n4. Display the subagent's summary to the user (link to PR, number of inline comments posted by severity).\n\nIf the subagent fails or times out, inform the user that the review could not be completed and suggest running it manually later (e.g., \"review this PR\").\n\nAfter the review completes (or fails), return to Step 11 (Address Review Comments) to process any new comments, then present the Step 12 AskQuestion again.\n\n### If \"Check review status now\"\n\n1. Check CI status and review state:\n\n**Via MCP:**\n\n```\nCallMcpTool: server=github, toolName=pull_request_read\narguments: { \"owner\": \"\u003Cowner>\", \"repo\": \"\u003Crepo>\", \"pullNumber\": \u003Cnumber>, \"method\": \"get_check_runs\" }\n```\n\n```\nCallMcpTool: server=github, toolName=pull_request_read\narguments: { \"owner\": \"\u003Cowner>\", \"repo\": \"\u003Crepo>\", \"pullNumber\": \u003Cnumber>, \"method\": \"get_reviews\" }\n```\n\n**Via CLI:**\n\n```bash\ngh pr checks\ngh pr view --json reviewDecision,reviews,statusCheckRollup\n```\n\n2. Summarize the current state:\n   - CI checks: passing \u002F failing \u002F pending\n   - Review status: approved \u002F changes requested \u002F pending \u002F no reviewers\n\n3. **If checks pass and reviews are approved**, use **AskQuestion**:\n\n```\nprompt: \"PR is approved and checks pass. Merge it?\"\noptions:\n  - Yes, squash and merge\n  - Yes, merge commit\n  - Yes, rebase and merge\n  - No, not yet\n```\n\n4. If the user selects a merge strategy:\n\n**Via MCP:**\n\n```\nCallMcpTool: server=github, toolName=merge_pull_request\narguments: { \"owner\": \"\u003Cowner>\", \"repo\": \"\u003Crepo>\", \"pullNumber\": \u003Cnumber>, \"merge_method\": \"\u003Csquash|merge|rebase>\" }\n```\n\nThen switch to main locally:\n\n```bash\ngit checkout main && git pull\n```\n\n**Via CLI:**\n\n```bash\ngh pr merge --\u003Cstrategy> --delete-branch\ngit checkout main && git pull\n```\n\n5. If checks are failing or reviews are not yet approved, tell the user what is pending and suggest coming back later.\n\n### If \"PR is approved, please merge\"\n\nUse **AskQuestion**:\n\n```\nprompt: \"Which merge strategy?\"\noptions:\n  - Squash and merge\n  - Merge commit\n  - Rebase and merge\n```\n\nThen merge:\n\n**Via MCP:**\n\n```\nCallMcpTool: server=github, toolName=merge_pull_request\narguments: { \"owner\": \"\u003Cowner>\", \"repo\": \"\u003Crepo>\", \"pullNumber\": \u003Cnumber>, \"merge_method\": \"\u003Csquash|merge|rebase>\" }\n```\n\nThen switch to main locally:\n\n```bash\ngit checkout main && git pull\n```\n\n**Via CLI:**\n\n```bash\ngh pr merge --\u003Cstrategy> --delete-branch\ngit checkout main && git pull\n```\n\n### If \"Come back later\"\n\nTell the user they can resume this step by asking to check the PR status or merge. End the current session here — the Release step runs after the PR is merged.\n\n## Step 13: Release\n\n> This step only applies to projects with a release flow.\n\nAfter the PR is merged:\n\n### 13.1 Determine the next version\n\n1. Detect the latest release tag:\n\n**Via MCP:**\n\n```\nCallMcpTool: server=github, toolName=list_releases\narguments: { \"owner\": \"\u003Cowner>\", \"repo\": \"\u003Crepo>\", \"perPage\": 1 }\n```\n\n**Via CLI:**\n\n```bash\ngh release list --limit 1\n```\n\n2. Determine the next version using semantic versioning:\n   - Bug fix -> patch bump (1.0.0 -> 1.0.1)\n   - Feature -> minor bump (1.0.0 -> 1.1.0)\n   - Breaking change -> major bump (1.0.0 -> 2.0.0)\n\n   Use the issue labels and nature of changes to decide.\n\n### 13.2 Bump the version in source files\n\nThe version in source files **must** match the release tag. Skipping this step causes CI publish failures (e.g., PyPI rejects duplicate versions).\n\n1. Detect where the version is defined. Check in order:\n   - `pyproject.toml` — look for a static `version = \"x.y.z\"` under `[project]` or `[tool.poetry]`\n   - `version.py` or `src\u002F\u003Cpackage>\u002F__version__.py` — a standalone version file\n   - `src\u002F\u003Cpackage>\u002F__init__.py` — a `__version__` variable\n\n2. Update **all** version sources found to the new version number.\n\n3. Confirm with the user before committing:\n\nUse **AskQuestion**:\n\n```\nprompt: \"Release v\u003Cnew-version> (current: v\u003Ccurrent-version>). Bump version and create release?\"\noptions:\n  - Yes, bump and release\n  - Change the version number\n  - Skip release for now\n```\n\nIf \"Change the version number\", ask for the desired version. If \"Skip release for now\", stop here.\n\n4. Commit and push the version bump:\n\n```bash\ngit add -A\ngit commit -m \"bump: v\u003Cversion>\"\ngit push\n```\n\n### 13.3 Create the release\n\n> No GitHub MCP equivalent exists for release creation — use `gh` CLI regardless of the detected method.\n\n```bash\ngh release create v\u003Cversion> --generate-notes --title \"v\u003Cversion>\"\n```\n\n### 13.4 Verify the release pipeline\n\nAfter creating the release, check that the triggered CI workflow succeeds:\n\n**Via MCP:**\n\n```\nCallMcpTool: server=github, toolName=actions_list\narguments: { \"owner\": \"\u003Cowner>\", \"repo\": \"\u003Crepo>\", \"method\": \"list_workflow_runs\", \"per_page\": 1 }\n```\n\n**Via CLI:**\n\n```bash\ngh run list --limit 1 --json name,status,conclusion,url\n```\n\nIf the workflow is still running, wait and re-check. If it fails, tell the user immediately with the run URL — do not wait for them to discover it.\n\nTell the user the release has been created and whether the publish pipeline succeeded.\n\n## Step 14: End\n\nSummarize what was accomplished:\n- Issue number and title\n- Branch name\n- Number of commits\n- PR URL\n- Release version (if applicable)\n",{"name":5,"description":7},"main","ea5172c58cf8fe53f20b59482e62cc45741da12d",".cursor\u002Fskills\u002Fdev-workflow","https:\u002F\u002Fgithub.com\u002Fcartaorobbin\u002Fpyramid-temporal","https:\u002F\u002Fgithub.com\u002Fcartaorobbin","2026-10-24 04:09:32",{"source":8,"skillName":5,"commands":56,"prompt":66,"zipAvailable":67},[57,60,63],{"tool":58,"command":59},"npx","npx skills add cartaorobbin\u002Fpyramid-temporal --skill dev-workflow",{"tool":61,"command":62},"bunx","bunx skills add cartaorobbin\u002Fpyramid-temporal --skill dev-workflow",{"tool":64,"command":65},"pnpm","pnpm dlx skills add cartaorobbin\u002Fpyramid-temporal --skill dev-workflow","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fcartaorobbin\u002Fpyramid-temporal\u002Fblob\u002Fmain\u002F.cursor\u002Fskills\u002Fdev-workflow\u002FSKILL.md",true,[],[70,93,110,133,144,158],{"skillNo":71,"name":72,"nameZh":6,"description":73,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":74,"categories":75,"keywords":82,"publishedAt":44},"01M6C1TXVJXMQ0VWWGMHD7PKG9","write-pytest","Write pytest tests for any Python codebase. Use when the user asks to write tests, create tests, add tests, or test a module\u002Fservice\u002Fendpoint\u002Ffunction. Framework-agnostic; routes to framework-specific helpers when signals are detected. Follows a research-then-discuss-then-write flow.","https:\u002F\u002Fgithub.com\u002Fcartaorobbin\u002Fpyramid-temporal\u002Fblob\u002Fmain\u002F.cursor\u002Fskills\u002Fwrite-pytest\u002FSKILL.md",[76,79],{"categoryNo":77,"categoryName":78,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000008","测试与质量",{"categoryNo":80,"categoryName":81,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000021","资料检索与研究",[83,84,85,31,33,86,87,88,89,90,91,92],"write","write pytest","research","write tests","python","test","endpoint","flow","framework","create",{"skillNo":94,"name":95,"nameZh":6,"description":96,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":97,"categories":98,"keywords":100,"publishedAt":44},"01M6C1TTVR96XWX68FQY37S2QZ","quality-assurance","Run quality assurance checks on the current chat session — pre-task validation, post-task checklist, and code review. Use when finishing a task, before committing, or when the user asks for a QA review.","https:\u002F\u002Fgithub.com\u002Fcartaorobbin\u002Fpyramid-temporal\u002Fblob\u002Fmain\u002F.cursor\u002Fskills\u002Fquality-assurance\u002FSKILL.md",[99],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},[101,102,103,104,105,106,107,108,33,109,31],"quality","quality assurance","run","code review","review","code","validation","qa","session",{"skillNo":111,"name":112,"nameZh":6,"description":113,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":114,"categories":115,"keywords":121,"publishedAt":44},"01M6C1TR2SWA481C00S2VQ12DW","python-developer","Python developer umbrella — installs Python coding conventions and bundles companion skills (best practices, testing, dependency management) in a single setup. Use when the user asks to set up Python development conventions, install Python skills, or says \"set up Python development\".","https:\u002F\u002Fgithub.com\u002Fcartaorobbin\u002Fpyramid-temporal\u002Fblob\u002Fmain\u002F.cursor\u002Fskills\u002Fpython-developer\u002FSKILL.md",[116],{"categoryNo":117,"categoryName":118,"taxonomyType":119,"taxonomyTypeDesc":120},"01JBSEEDCAT000000000000030","开发工程师","PROFESSION","适用职业",[122,87,123,124,125,126,33,127,128,31,129,130,131,132,41],"developer","python developer","SET","coding","management","dependency management","install","python development","best practices","testing","setup",{"skillNo":134,"name":135,"nameZh":6,"description":136,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":137,"categories":138,"keywords":139,"publishedAt":44},"01M6C1TNAANT8RS9XKB2F3JF3E","python-best-practices","Comprehensive Python coding conventions and best practices. Use when the user asks about Python conventions, coding patterns, best practices, code style, anti-patterns, or \"how should I write this\" in Python.","https:\u002F\u002Fgithub.com\u002Fcartaorobbin\u002Fpyramid-temporal\u002Fblob\u002Fmain\u002F.cursor\u002Fskills\u002Fpython-best-practices\u002FSKILL.md",[],[140,130,87,141,106,142,125,83,33,31,143],"python best practices","code style","how","anti-patterns",{"skillNo":145,"name":146,"nameZh":6,"description":147,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":148,"categories":149,"keywords":151,"publishedAt":44},"01M6C1TJEMGMNGNVE4DKWF4TNA","pyramid-library","Library Developer persona: developing standalone Pyramid extensions (own repo, own package) that expose includeme for external consumers. Use when the user builds a reusable Pyramid library, designs includeme for consumers, registers custom directives\u002Ftweens\u002Frequest methods, or tests a library with a proper app.","https:\u002F\u002Fgithub.com\u002Fcartaorobbin\u002Fpyramid-temporal\u002Fblob\u002Fmain\u002F.cursor\u002Fskills\u002Fpyramid-library\u002FSKILL.md",[150],{"categoryNo":117,"categoryName":118,"taxonomyType":119,"taxonomyTypeDesc":120},[152,153,154,155,156,122,157,33,31],"pyramid library","library","repo","core","package","persona",{"skillNo":159,"name":160,"nameZh":6,"description":161,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":162,"categories":163,"keywords":165,"publishedAt":44},"01M6C1TFT8Z6MCBEAQ7S24XQ77","pyramid-developer","Pyramid framework conventions — configuration\u002Fregistry, module system with includeme, pyramid_services, models, Cornice REST, ACL authorization, and transactions. Use when setting up Pyramid development conventions for a project.","https:\u002F\u002Fgithub.com\u002Fcartaorobbin\u002Fpyramid-temporal\u002Fblob\u002Fmain\u002F.cursor\u002Fskills\u002Fpyramid-developer\u002FSKILL.md",[164],{"categoryNo":117,"categoryName":118,"taxonomyType":119,"taxonomyTypeDesc":120},[166,122,41,167,91,168,169,170,171,172,173,31,174,87],"pyramid developer","registry","services","ACL","REST","authorization","transactions","system","micromonolith"]