[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7353SDWFXAR4XSD9DY52TJ0":3,"skill-same:01M7353SDWFXAR4XSD9DY52TJ0":52},{"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":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":31,"commitSha":32,"skillDirectory":33,"forksCount":34,"repositoryHtmlUrl":35,"repositoryHomepageUrl":36,"ownerHtmlUrl":37,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":38,"install":39,"resources":51},"01M7353SDWFXAR4XSD9DY52TJ0","gi",null,"Grab an issue, implement, and ARDI.","Morrison-Lab\u002Fai-config","Morrison-Lab","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F104235520?v=4","01M734G0451S2G35MN4HFQK7XP","Morrison Lab","01M734G059BYFDFQA8YTPDGPMH",4,"MIT","https:\u002F\u002Fgithub.com\u002FMorrison-Lab\u002Fai-config\u002Fblob\u002Fmain\u002Fskills\u002Fgi\u002FSKILL.md",[],[],"2026-11-11 15:11:14",false,"---\nname: gi\ndescription: \"Grab an issue, implement, and ARDI.\"\nuser-invocable: true\nallowed-tools:\n  - Bash\n  - Agent\n  - Read\n  - Edit\n  - Write\n---\n\n# GI — Grab Issue\n\nPick the highest-priority open issue, implement it, open an MR\u002FPR, and drive\nit to a clean review verdict via ARDI.\n\nCommands below are annotated with their abstract operation token (e.g.\n`LIST_ISSUES`, `CREATE_PR`) — resolve to your model's tool via\n[`tool-mappings.md`](..\u002F..\u002Ftool-mappings.md) instead of the `gh` command shown\nif this session doesn't have `gh`.\n\n## When this fires\n\n- User says \"gi\", \"grab an issue\", \"pick up the next issue\"\n- User says \"what should I work on next?\"\n- User says \"work on the top issue\", \"grab the highest-priority one\"\n\n## Procedure\n\n### 1. List open issues\n\n```bash\n# GitHub\ngh issue list --state open --limit 20 --json number,title,labels,assignees,createdAt | cat   # LIST_ISSUES\n\n# GitLab\nglab issue list --per-page=20 2>&1 | cat\n```\n\n### 2. Triage, label, and prioritize\n\nWhile surveying open issues to select the top candidate, inspect candidate\nissues and apply triage labels to any that are unlabeled or undertriaged.\n\n**Apply triage labels:**\n\n1. **Check repo taxonomy:** Use existing labels on the repository (check\n   `gh label list` \u002F `glab label list` if unsure) rather than inventing new\n   ones.\n2. **Classify each candidate:**\n   - **Type:** `bug`, `enhancement`, `documentation`, `maintenance` \u002F `refactor` \u002F\n     `chore` (match repo conventions).\n   - **Priority:** `high-priority`, `low-priority`, `P0` \u002F `P1` \u002F `P2` if the repo\n     uses explicit priority labels.\n   - **Status:** `blocked`, `duplicate`, `invalid`, `wontfix` if applicable.\n3. **Add labels to inspected issues:**\n\n```bash\n# GitHub\ngh issue edit \u003CN> --add-label \"\u003Clabel1>,\u003Clabel2>\"   # LABEL_ISSUE\n\n# GitLab\nglab issue update \u003CN> --label \"\u003Clabel1>,\u003Clabel2>\"\n```\n\n`gh issue edit --add-label` is additive and preserves existing labels.\n\n**Rank by priority:**\n\nScan the triaged issues and rank by priority.\nUse these signals (in order):\n\n| Signal | Weight |\n|--------|--------|\n| Explicit priority label (`P0`, `critical`, `high-priority`, `urgent`) | Highest |\n| Blocking other work (mentioned in other issues\u002FMRs) | High |\n| Bug vs feature (bugs first, generally) | Medium |\n| Age (older unresolved issues accumulate cost) | Medium |\n| Size\u002Fcomplexity (prefer issues you can complete in one session) | Tie-breaker |\n| Internal infrastructure vs feature (infra slightly preferred — see [`pr-prioritization`](..\u002F..\u002Fshared\u002Fworkflow\u002Fpr-prioritization.md)) | Tie-breaker |\n| Already assigned to someone else | **Skip** |\n| Issue comment says \"Working on this\" (and the claim is live --- under 2 h old) | **Skip** |\n| Open PR already exists for the issue | **Skip** |\n\n### 3. Select top issue automatically\n\nPick the highest-priority issue automatically based on the triage signals in\nstep 2 (unless the user explicitly specified an issue or candidate preference).\nState which issue was selected and why, then proceed directly to check\nin-flight status and implementation without pausing for user confirmation.\n\nDo not describe the issue as \"in progress\" or say that implementation has\nstarted until steps 4, 6, 6b\u002F7, and 8 have completed: the live claim, isolated\nworktree and branch, and draft PR are the observable start of work.\nInvestigation or triage alone is preparatory work, not an active implementation.\n\n### 4. Check the issue isn't already in-flight\n\nBefore claiming or branching, confirm no other session is already on this\nissue. Two signals must **both** be clear (`gh issue list` in step 1 returns\ntitles, labels, and assignees but neither comment text nor linked PRs, so\ncheck both explicitly here).\n\n**(1) No live \"Working on this\" claim on the issue:**\n\n```bash\n# GitHub -- read the claim\u002Frelease exchange, not just the newest comment:\ngh issue view \u003CN> --json comments \\\n  --jq '[.comments[] | select(.body | test(\"hold off|paws off|back off|unclaim|released|PR is free|now mergeable\"; \"i\"))] | last | \"\\(.createdAt) \\(.author.login): \\(.body)\"'   # READ_ISSUE_COMMENTS\ngh issue view \u003CN> --json updatedAt --jq .updatedAt   # VIEW_ISSUE -- latest activity\n```\n\n**Reading only `.comments | last` is the bug this replaces.**\nA claim is live for two hours from the most recent *activity*, so any unrelated comment posted after it --- a status note, a bot's build result, a question --- becomes the last comment while the claim is still binding.\nThe claim then goes invisible and this check reports the issue free, which is the parallel-session collision the whole convention exists to prevent.\nFilter to the exchange and take the last member of *that*.\n\n**Both timestamps are needed, which is why the second command is there.**\nThe claim's own `createdAt` says when it was made; the issue's `updatedAt` says\nwhen the thread last saw activity, and the 2-hour rule expires on *activity*,\nnot on the claim's age.\nA day-old claim followed by a comment thirty minutes ago is **live**; the same\nclaim with nothing after it is **expired**.\nReading only the claim's body cannot tell those apart, so it cannot decide the\nquestion the step is asking.\n\nMatch the two-word invariant `hold off`, or either retired wording `paws off` \u002F `back off`, case-insensitively --- then **exclude the comment if it also carries a release term** (`unclaim|released|PR is free|now mergeable`), because the retired release wording `... done --- paws off released.` contains `paws off` and would otherwise read as a live claim.\nSee [`claim-pr`](..\u002F..\u002Fshared\u002Fworkflow\u002Fclaim-pr.md)'s \"Match the two-word invariant\".\nIf a live claim stands, skip the issue --- unless the claim has expired: no push or comment on the issue in over 2 hours, per [`claim-pr`](..\u002F..\u002Fshared\u002Fworkflow\u002Fclaim-pr.md)'s expiration rule.\nAn expired claim is taken over by posting your own claim comment, never silently.\n\n**(2) No open PR already references the issue:**\n\n```bash\n# GitHub — list open PRs and scan for any whose title or branch references this issue:\ngh pr list --state open --json number,title,headRefName,author,assignees \\\n  --jq '.[] | \"#\\(.number) \\(.title) [\\(.headRefName); \\(.author.login); assignees: \\([.assignees[].login] | join(\",\"))]\"'   # LIST_PRS\n# Authoritative — the issue's cross-referenced open PRs via the REST timeline API.\n# (gh issue view --json has no timelineItems field; in the timeline, source.type is\n#  always \"issue\", so a PR is one whose source.issue.pull_request is non-null. The\n#  state filter keeps only open PRs — merged\u002Fclosed siblings aren't active competitors.\n#  --paginate walks every page so a cross-reference past the first 30 events isn't missed.)\ngh api --paginate repos\u002F\u003Cowner>\u002F\u003Crepo>\u002Fissues\u002F\u003CN>\u002Ftimeline \\\n  --jq '.[] | select(.event == \"cross-referenced\") | .source.issue | select(.pull_request != null) | select(.state == \"open\") | \"#\\(.number) \\(.title) [\\(.user.login); assignees: \\([.assignees[].login] | join(\",\"))]\"' | cat   # ISSUE_LINKED_PRS\n```\n\nIf an open PR already exists for the issue:\n- **Don't open a competing PR.** The issue is already being worked.\n- Skip it and grab the next unblocked issue instead.\n- Or, if the existing PR is stalled\u002Fabandoned and it passes\n  `memories\u002Freviewing-prs.md`'s scope test (opened by or assigned to the\n  invoking user, explicitly requested, or authored by the GitHub Actions app;\n  the listing above prints the author and assignee logins), take it over:\n  check it out (use the existing PR branch), claim the PR, and ARDI it\n  rather than starting fresh.\n- A stalled PR that fails that test is not yours to take over: skip the\n  issue, leave the PR untouched, and report it so the user can assign or\n  name it.\n\n### 5. Check history, peers, and research DRW\n\nBefore implementing, invoke the `check-history` skill to review merged MRs\u002FPRs that touched the same area so you don't undo past progress.\nPerform a research step to check whether the functionality or helper already exists (DRW) in our own repos or upstream ecosystems before writing custom code, following [`prefer-upstream`](..\u002Fprefer-upstream\u002FSKILL.md) and [`dont-reinvent-wheel`](..\u002F..\u002Fshared\u002Fprinciples\u002Fdont-reinvent-wheel.md).\nAlso choose explicitly whether to centralize or distribute the work,\nper [`centralize-or-distribute`](..\u002F..\u002Fshared\u002Fworkflow\u002Fcentralize-or-distribute.md),\nand state the choice in the PR.\nIf the issue is a new feature or architectural change, also consider running `scout-peers` to see how other comparable projects solved it, ensuring we don't reinvent the wheel. (Do NOT run `opposition-research` \u002F `oppo` here;\n`oppo` mines community demand to decide *what* to build and feeds the issue tracker, while `scout-peers` checks *how* others built it once you've already grabbed an issue).\n\n### 6. Claim the issue\n\n```bash\n# GitHub\ngh issue comment \u003CN> --body \"Claude Code CLI (local session) is working on this — please hold off until I'm done.\n\n_Posted by Claude Code (AI agent) --- not written by a human._\"   # COMMENT_ISSUE\n\n# GitLab\nglab issue note \u003CN> --message \"Claude Code CLI (local session) is working on this — please hold off until I'm done.\n\n_Posted by Claude Code (AI agent) --- not written by a human._\"\n```\n\n### 6b. Cut a dedicated worktree\n\n`AGENTS.md`'s \"Worktree isolation\" rule applies here and this skill did not\nsay so, so a session following it verbatim ran its triage and its edits in\nthe shared checkout, which was sitting on another work-stream's branch\n([#2061](https:\u002F\u002Fgithub.com\u002FMorrison-Lab\u002Fai-config\u002Fissues\u002F2061)).\nEvery step from here on runs inside a worktree of its own:\n\n```bash\ngit fetch origin main                                              # FETCH\ngit worktree add ..\u002F\u003Crepo>-\u003Cslug> -b fix\u002F\u003Cslug> origin\u002Fmain         # CREATE_WORKTREE -- or feat\u002F\u003Cslug>, docs\u002F\u003Cslug>\ncd ..\u002F\u003Crepo>-\u003Cslug>\n```\n\n`git worktree add` does not change directory, two worktrees on one branch\nname can silently move the shared ref instead of erroring, and a repo script\nrun from a worktree can still measure the main checkout ---\n[`memories\u002Fgit-worktrees.md`](..\u002F..\u002Fmemories\u002Fgit-worktrees.md) carries these\nand the other measured gotchas; the [`session-lock`](..\u002Fsession-lock\u002FSKILL.md)\nskill wraps the same step with a collision check.\nRemove the worktree when the PR merges, per\n[`post-merge`](..\u002Fpost-merge\u002FSKILL.md).\n\n### 7. Create a branch\n\nStep 6b's `worktree add -b` already created the branch; this step is the\nfallback for a session that cannot create a worktree, such as a container with\nno writable directory beside the checkout:\n\n```bash\ngit fetch origin main                    # FETCH\ngit checkout -b fix\u002F\u003Cslug> origin\u002Fmain   # CREATE_BRANCH — or feat\u002F\u003Cslug>, docs\u002F\u003Cslug>\n```\n\nBranch naming:\n- Bug fix → `fix\u002F\u003Cissue-slug>`\n- Feature → `feat\u002F\u003Cissue-slug>`\n- Docs → `docs\u002F\u003Cissue-slug>`\n- Refactor → `refactor\u002F\u003Cissue-slug>`\n\n### 8. Open the PR now — draft, from an empty commit\n\nOpen the PR **immediately, before implementing**, so the open-PR signal that\nstep 4 relies on fires right away and other sessions can see the issue is being\nworked (see [`pr-on-claim`](..\u002F..\u002Fshared\u002Fworkflow\u002Fpr-on-claim.md)). Give the\nbranch a diff with an empty commit, push, and open a **draft** PR:\n\n```bash\ngit commit --allow-empty -m \"start: \u003Cissue title> (closes #\u003CN>)\"   # COMMIT\n```\n\nPush as a separate Bash call, per [`check-before-pushing`](..\u002F..\u002Fshared\u002Fworkflow\u002Fcheck-before-pushing.md)'s \"Keep the commit in its own Bash call\":\n\n```bash\n# An ABSOLUTE `cd` (or `git -C`), because whether a separate Bash call keeps\n# the previous one's directory is unsettled between sessions. Substitute the\n# absolute path step 6b created the worktree at, or this checkout's own path\n# when step 7's fallback was taken.\ncd \u002Fabs\u002Fpath\u002Fto\u002F\u003Crepo>-\u003Cslug>\ngit push -u origin fix\u002F\u003Cslug>   # PUSH\n```\n\nOpen the draft PR\u002FMR in its own Bash call:\n\n```bash\ncd \u002Fabs\u002Fpath\u002Fto\u002F\u003Crepo>-\u003Cslug>\n# GitHub — draft PR\ngh pr create --draft --title \"\u003Ctitle>\" --body \"Closes #\u003CN>\n\nWIP — opened up front to claim the issue; implementing now.\"   # CREATE_PR\n\n# GitLab — draft MR\nglab mr create --draft --title \"\u003Ctitle>\" --description \"Closes #\u003CN>\n\nWIP — opened up front to claim the issue; implementing now.\" --assignee \u003Cyour-gitlab-username>  # default: \u003Cuser>\n```\n\nKeep it a draft: a draft doesn't trigger the `@claude` review bot, so no review\nround is wasted on an empty diff. Include `Closes #N` to auto-close the issue on\nmerge **only when this PR will finish the issue**. If a later comment splits the\nissue into independent cases and this PR ships only one, file the leftover as\nits own issue **before merge** and rewrite the PR body so it does not `Closes`\nthe parent (link both: this PR for the shipped slice, the new issue for the\nrest). Closing the parent on a partial ship drops the deferred half from the\ntracker\n([gha#373](https:\u002F\u002Fgithub.com\u002FMorrison-Lab\u002Fgha\u002Fissues\u002F373) \u002F\n[#516](https:\u002F\u002Fgithub.com\u002FMorrison-Lab\u002Fgha\u002Fpull\u002F516) \u002F\n[#517](https:\u002F\u002Fgithub.com\u002FMorrison-Lab\u002Fgha\u002Fissues\u002F517)).\n\n### 9. Implement\n\n- Read the issue description carefully — understand \"done\" criteria\n- Research before writing code: verify that no standard library, upstream package,\n  or lab repo helper already provides what you are about to write (DRW).\n  If custom implementation is needed, record the search and why existing options were unfit\n- Make the changes (code, tests, docs as needed)\n- Run the repo's standard checks (lint, test, build) before committing\n  Prefer the same commands CI runs.\n  If the repo has both subpackage tests and a root-level lint step,\n  run both\n- Commit with a message referencing the issue:\n  `fix: handle auth timeout on slow networks (closes #12)`\n\n### 10. Push and mark the PR ready for review\n\n```bash\ngit push origin fix\u002F\u003Cslug>   # PUSH — push the implementation onto the draft PR from step 8\ngh pr ready \u003CN>              # MARK_PR_READY — GitHub, flip draft → ready, which kicks off review\n# GitLab: glab mr update \u003CN> --ready\n```\n\nThe PR already exists (step 8), so there's nothing new to create — pushing the\nimplementation and marking it ready for review is what starts ARDI.\n\n### 11. ARDI to clean\n\nInvoke the `ardi` skill on the MR\u002FPR. Drive it through review rounds until the\nverdict is clean (zero findings).\n\n### 12. Report\n\nWhen ARDI completes clean, report:\n- Issue number + link\n- MR\u002FPR number + link\n- Round count\n- Any deferred items (with follow-up issue links)\n\nDon't merge unless asked. When you do merge, see\n[§Concurrent-session collisions](#concurrent-session-collisions) first.\n\n## Concurrent-session collisions\n\nThis repo often has many sessions running at once, so another session can open\na PR that closes \"your\" issue *after* you started — the claim comment and the\nopening PR-list scan won't catch a PR that didn't exist yet. Re-check right\nbefore merging (and treat an unexpected merge conflict as a signal):\n\n- Search open *and merged* PRs for one that already references `Closes #\u003CN>`\n  for your issue (`SEARCH_PRS` — `gh pr list --state all --search \"closes #\u003CN>\"`\n  \u002F the GitHub `mcp__github__search_pull_requests` tool) — the default `gh pr list` lists only open PRs\n  and would miss a sibling that already merged and closed the issue, the case\n  that matters most. If the issue is already closed, don't merge a now-redundant\n  PR blindly.\n- If a sibling PR landed first, sync `main` into your branch and **read the\n  resulting diff** — keep only the parts the sibling missed, drop the\n  duplicates, and reframe the PR (it no longer `Closes #\u003CN>`; it's a follow-up).\n\n## Delegating sidecar work\n\nWhile implementing (step 9), delegate independent sidecar work to a subagent\nvia the `Agent` tool when it won't block the critical path --- e.g. verifying\na claim from the issue description, drafting a test fixture, or investigating\na tangential failure surfaced along the way. Keep claiming, branching, opening\nthe draft PR, and the ARDI loop itself on the main thread.\n\nFor a judgment-heavy sidecar task (a subtle bug hunt, an architecturally significant design call), override the subagent's model to a stronger tier via the `Agent` tool's `model` parameter (e.g. `model: 'opus'`) rather than the session default.\nSymmetrically, drop to a cheaper\u002Ffaster tier (`model: 'fable'` or `'haiku'`) for a mechanical, bounded sidecar task instead of leaving it at the session default --- see [`select-model`](..\u002F..\u002Fskills\u002Fselect-model\u002FSKILL.md)'s decision tree for both directions.\nFor a heavy fan-out read\u002Fdraft\u002Fverify pass, prefer a separately-billed provider (e.g. the `codex` CLI, in UCDH projects only) first when available, to conserve Claude\u002FAgent-tool budget --- see [`delegate-to-codex`](..\u002Fdelegate-to-codex\u002FSKILL.md).\n\n## Handling blocked issues\n\nIf during implementation you discover the issue is blocked (missing\ndependency, needs design decision, upstream bug):\n\n1. Post a comment on the issue explaining the blocker\n2. Label it `blocked` if the repo uses that label\n3. Report to the user and offer to pick the next issue instead\n\n## Relationship to other skills\n\n- **`check-history`** — invoked in step 5 to avoid undoing past work\n- **`prefer-upstream`** --- search existing packages, standard libraries, and lab\n  repos before writing custom code to avoid reinventing the wheel\n- **`scout-peers`** --- suggested in step 5 to check how peers solved a problem so you don't reinvent the wheel (distinct from `oppo`, which finds *what* to build)\n- **`ardi`** — invoked in step 11 to drive the MR\u002FPR to clean\n- **`claim-pr`** — the issue claim in step 6 follows the same pattern\n- **`pr-on-claim`** — the rule behind step 8: open the draft PR up front so the\n  work is visible to other sessions before you implement\n- **`split-concerns`** — if the implementation grows too large, offer to split\n- **`defer-issue`** — if sub-tasks emerge during implementation, defer them\n- **`select-model`** — decision tree for picking a subagent's model tier when\n  delegating sidecar work (see Delegating sidecar work)\n- **`delegate-to-codex`** — when a sidecar task is a heavy fan-out read\u002Fdraft\u002Fverify pass and codex is available (UCDH projects only), prefer it first\n\n## Anti-patterns\n\n- ❌ Grabbing an issue already assigned to someone else\n- ❌ Starting implementation without checking history\n- ❌ Hand-rolling custom code without researching existing packaged or shared solutions first (violating DRW)\n- ❌ Opening an MR without running the repo's standard checks first\n- ❌ Picking a huge issue that can't be completed in one session without\n  discussing scope with the user first\n- ❌ Implementing without understanding \"done\" criteria from the issue\n- ❌ Skipping triage labeling on candidate issues — apply classification labels\n  to candidate issues inspected during triage so the backlog stays organized\n- ❌ Opening the PR only after implementing — open a draft PR up front (step 8)\n  so the work is visible and a parallel session doesn't grab the same issue\n- ❌ Forgetting `Closes #N` in the MR\u002FPR description\n- ❌ Merging without re-checking that a concurrent session's PR hasn't already\n  closed the issue (resolve a surprise merge conflict by reading the diff, not\n  blindly)\n","# GI — Grab Issue\n\nPick the highest-priority open issue, implement it, open an MR\u002FPR, and drive\nit to a clean review verdict via ARDI.\n\nCommands below are annotated with their abstract operation token (e.g.\n`LIST_ISSUES`, `CREATE_PR`) — resolve to your model's tool via\n[`tool-mappings.md`](..\u002F..\u002Ftool-mappings.md) instead of the `gh` command shown\nif this session doesn't have `gh`.\n\n## When this fires\n\n- User says \"gi\", \"grab an issue\", \"pick up the next issue\"\n- User says \"what should I work on next?\"\n- User says \"work on the top issue\", \"grab the highest-priority one\"\n\n## Procedure\n\n### 1. List open issues\n\n```bash\n# GitHub\ngh issue list --state open --limit 20 --json number,title,labels,assignees,createdAt | cat   # LIST_ISSUES\n\n# GitLab\nglab issue list --per-page=20 2>&1 | cat\n```\n\n### 2. Triage, label, and prioritize\n\nWhile surveying open issues to select the top candidate, inspect candidate\nissues and apply triage labels to any that are unlabeled or undertriaged.\n\n**Apply triage labels:**\n\n1. **Check repo taxonomy:** Use existing labels on the repository (check\n   `gh label list` \u002F `glab label list` if unsure) rather than inventing new\n   ones.\n2. **Classify each candidate:**\n   - **Type:** `bug`, `enhancement`, `documentation`, `maintenance` \u002F `refactor` \u002F\n     `chore` (match repo conventions).\n   - **Priority:** `high-priority`, `low-priority`, `P0` \u002F `P1` \u002F `P2` if the repo\n     uses explicit priority labels.\n   - **Status:** `blocked`, `duplicate`, `invalid`, `wontfix` if applicable.\n3. **Add labels to inspected issues:**\n\n```bash\n# GitHub\ngh issue edit \u003CN> --add-label \"\u003Clabel1>,\u003Clabel2>\"   # LABEL_ISSUE\n\n# GitLab\nglab issue update \u003CN> --label \"\u003Clabel1>,\u003Clabel2>\"\n```\n\n`gh issue edit --add-label` is additive and preserves existing labels.\n\n**Rank by priority:**\n\nScan the triaged issues and rank by priority.\nUse these signals (in order):\n\n| Signal | Weight |\n|--------|--------|\n| Explicit priority label (`P0`, `critical`, `high-priority`, `urgent`) | Highest |\n| Blocking other work (mentioned in other issues\u002FMRs) | High |\n| Bug vs feature (bugs first, generally) | Medium |\n| Age (older unresolved issues accumulate cost) | Medium |\n| Size\u002Fcomplexity (prefer issues you can complete in one session) | Tie-breaker |\n| Internal infrastructure vs feature (infra slightly preferred — see [`pr-prioritization`](..\u002F..\u002Fshared\u002Fworkflow\u002Fpr-prioritization.md)) | Tie-breaker |\n| Already assigned to someone else | **Skip** |\n| Issue comment says \"Working on this\" (and the claim is live --- under 2 h old) | **Skip** |\n| Open PR already exists for the issue | **Skip** |\n\n### 3. Select top issue automatically\n\nPick the highest-priority issue automatically based on the triage signals in\nstep 2 (unless the user explicitly specified an issue or candidate preference).\nState which issue was selected and why, then proceed directly to check\nin-flight status and implementation without pausing for user confirmation.\n\nDo not describe the issue as \"in progress\" or say that implementation has\nstarted until steps 4, 6, 6b\u002F7, and 8 have completed: the live claim, isolated\nworktree and branch, and draft PR are the observable start of work.\nInvestigation or triage alone is preparatory work, not an active implementation.\n\n### 4. Check the issue isn't already in-flight\n\nBefore claiming or branching, confirm no other session is already on this\nissue. Two signals must **both** be clear (`gh issue list` in step 1 returns\ntitles, labels, and assignees but neither comment text nor linked PRs, so\ncheck both explicitly here).\n\n**(1) No live \"Working on this\" claim on the issue:**\n\n```bash\n# GitHub -- read the claim\u002Frelease exchange, not just the newest comment:\ngh issue view \u003CN> --json comments \\\n  --jq '[.comments[] | select(.body | test(\"hold off|paws off|back off|unclaim|released|PR is free|now mergeable\"; \"i\"))] | last | \"\\(.createdAt) \\(.author.login): \\(.body)\"'   # READ_ISSUE_COMMENTS\ngh issue view \u003CN> --json updatedAt --jq .updatedAt   # VIEW_ISSUE -- latest activity\n```\n\n**Reading only `.comments | last` is the bug this replaces.**\nA claim is live for two hours from the most recent *activity*, so any unrelated comment posted after it --- a status note, a bot's build result, a question --- becomes the last comment while the claim is still binding.\nThe claim then goes invisible and this check reports the issue free, which is the parallel-session collision the whole convention exists to prevent.\nFilter to the exchange and take the last member of *that*.\n\n**Both timestamps are needed, which is why the second command is there.**\nThe claim's own `createdAt` says when it was made; the issue's `updatedAt` says\nwhen the thread last saw activity, and the 2-hour rule expires on *activity*,\nnot on the claim's age.\nA day-old claim followed by a comment thirty minutes ago is **live**; the same\nclaim with nothing after it is **expired**.\nReading only the claim's body cannot tell those apart, so it cannot decide the\nquestion the step is asking.\n\nMatch the two-word invariant `hold off`, or either retired wording `paws off` \u002F `back off`, case-insensitively --- then **exclude the comment if it also carries a release term** (`unclaim|released|PR is free|now mergeable`), because the retired release wording `... done --- paws off released.` contains `paws off` and would otherwise read as a live claim.\nSee [`claim-pr`](..\u002F..\u002Fshared\u002Fworkflow\u002Fclaim-pr.md)'s \"Match the two-word invariant\".\nIf a live claim stands, skip the issue --- unless the claim has expired: no push or comment on the issue in over 2 hours, per [`claim-pr`](..\u002F..\u002Fshared\u002Fworkflow\u002Fclaim-pr.md)'s expiration rule.\nAn expired claim is taken over by posting your own claim comment, never silently.\n\n**(2) No open PR already references the issue:**\n\n```bash\n# GitHub — list open PRs and scan for any whose title or branch references this issue:\ngh pr list --state open --json number,title,headRefName,author,assignees \\\n  --jq '.[] | \"#\\(.number) \\(.title) [\\(.headRefName); \\(.author.login); assignees: \\([.assignees[].login] | join(\",\"))]\"'   # LIST_PRS\n# Authoritative — the issue's cross-referenced open PRs via the REST timeline API.\n# (gh issue view --json has no timelineItems field; in the timeline, source.type is\n#  always \"issue\", so a PR is one whose source.issue.pull_request is non-null. The\n#  state filter keeps only open PRs — merged\u002Fclosed siblings aren't active competitors.\n#  --paginate walks every page so a cross-reference past the first 30 events isn't missed.)\ngh api --paginate repos\u002F\u003Cowner>\u002F\u003Crepo>\u002Fissues\u002F\u003CN>\u002Ftimeline \\\n  --jq '.[] | select(.event == \"cross-referenced\") | .source.issue | select(.pull_request != null) | select(.state == \"open\") | \"#\\(.number) \\(.title) [\\(.user.login); assignees: \\([.assignees[].login] | join(\",\"))]\"' | cat   # ISSUE_LINKED_PRS\n```\n\nIf an open PR already exists for the issue:\n- **Don't open a competing PR.** The issue is already being worked.\n- Skip it and grab the next unblocked issue instead.\n- Or, if the existing PR is stalled\u002Fabandoned and it passes\n  `memories\u002Freviewing-prs.md`'s scope test (opened by or assigned to the\n  invoking user, explicitly requested, or authored by the GitHub Actions app;\n  the listing above prints the author and assignee logins), take it over:\n  check it out (use the existing PR branch), claim the PR, and ARDI it\n  rather than starting fresh.\n- A stalled PR that fails that test is not yours to take over: skip the\n  issue, leave the PR untouched, and report it so the user can assign or\n  name it.\n\n### 5. Check history, peers, and research DRW\n\nBefore implementing, invoke the `check-history` skill to review merged MRs\u002FPRs that touched the same area so you don't undo past progress.\nPerform a research step to check whether the functionality or helper already exists (DRW) in our own repos or upstream ecosystems before writing custom code, following [`prefer-upstream`](..\u002Fprefer-upstream\u002FSKILL.md) and [`dont-reinvent-wheel`](..\u002F..\u002Fshared\u002Fprinciples\u002Fdont-reinvent-wheel.md).\nAlso choose explicitly whether to centralize or distribute the work,\nper [`centralize-or-distribute`](..\u002F..\u002Fshared\u002Fworkflow\u002Fcentralize-or-distribute.md),\nand state the choice in the PR.\nIf the issue is a new feature or architectural change, also consider running `scout-peers` to see how other comparable projects solved it, ensuring we don't reinvent the wheel. (Do NOT run `opposition-research` \u002F `oppo` here;\n`oppo` mines community demand to decide *what* to build and feeds the issue tracker, while `scout-peers` checks *how* others built it once you've already grabbed an issue).\n\n### 6. Claim the issue\n\n```bash\n# GitHub\ngh issue comment \u003CN> --body \"Claude Code CLI (local session) is working on this — please hold off until I'm done.\n\n_Posted by Claude Code (AI agent) --- not written by a human._\"   # COMMENT_ISSUE\n\n# GitLab\nglab issue note \u003CN> --message \"Claude Code CLI (local session) is working on this — please hold off until I'm done.\n\n_Posted by Claude Code (AI agent) --- not written by a human._\"\n```\n\n### 6b. Cut a dedicated worktree\n\n`AGENTS.md`'s \"Worktree isolation\" rule applies here and this skill did not\nsay so, so a session following it verbatim ran its triage and its edits in\nthe shared checkout, which was sitting on another work-stream's branch\n([#2061](https:\u002F\u002Fgithub.com\u002FMorrison-Lab\u002Fai-config\u002Fissues\u002F2061)).\nEvery step from here on runs inside a worktree of its own:\n\n```bash\ngit fetch origin main                                              # FETCH\ngit worktree add ..\u002F\u003Crepo>-\u003Cslug> -b fix\u002F\u003Cslug> origin\u002Fmain         # CREATE_WORKTREE -- or feat\u002F\u003Cslug>, docs\u002F\u003Cslug>\ncd ..\u002F\u003Crepo>-\u003Cslug>\n```\n\n`git worktree add` does not change directory, two worktrees on one branch\nname can silently move the shared ref instead of erroring, and a repo script\nrun from a worktree can still measure the main checkout ---\n[`memories\u002Fgit-worktrees.md`](..\u002F..\u002Fmemories\u002Fgit-worktrees.md) carries these\nand the other measured gotchas; the [`session-lock`](..\u002Fsession-lock\u002FSKILL.md)\nskill wraps the same step with a collision check.\nRemove the worktree when the PR merges, per\n[`post-merge`](..\u002Fpost-merge\u002FSKILL.md).\n\n### 7. Create a branch\n\nStep 6b's `worktree add -b` already created the branch; this step is the\nfallback for a session that cannot create a worktree, such as a container with\nno writable directory beside the checkout:\n\n```bash\ngit fetch origin main                    # FETCH\ngit checkout -b fix\u002F\u003Cslug> origin\u002Fmain   # CREATE_BRANCH — or feat\u002F\u003Cslug>, docs\u002F\u003Cslug>\n```\n\nBranch naming:\n- Bug fix → `fix\u002F\u003Cissue-slug>`\n- Feature → `feat\u002F\u003Cissue-slug>`\n- Docs → `docs\u002F\u003Cissue-slug>`\n- Refactor → `refactor\u002F\u003Cissue-slug>`\n\n### 8. Open the PR now — draft, from an empty commit\n\nOpen the PR **immediately, before implementing**, so the open-PR signal that\nstep 4 relies on fires right away and other sessions can see the issue is being\nworked (see [`pr-on-claim`](..\u002F..\u002Fshared\u002Fworkflow\u002Fpr-on-claim.md)). Give the\nbranch a diff with an empty commit, push, and open a **draft** PR:\n\n```bash\ngit commit --allow-empty -m \"start: \u003Cissue title> (closes #\u003CN>)\"   # COMMIT\n```\n\nPush as a separate Bash call, per [`check-before-pushing`](..\u002F..\u002Fshared\u002Fworkflow\u002Fcheck-before-pushing.md)'s \"Keep the commit in its own Bash call\":\n\n```bash\n# An ABSOLUTE `cd` (or `git -C`), because whether a separate Bash call keeps\n# the previous one's directory is unsettled between sessions. Substitute the\n# absolute path step 6b created the worktree at, or this checkout's own path\n# when step 7's fallback was taken.\ncd \u002Fabs\u002Fpath\u002Fto\u002F\u003Crepo>-\u003Cslug>\ngit push -u origin fix\u002F\u003Cslug>   # PUSH\n```\n\nOpen the draft PR\u002FMR in its own Bash call:\n\n```bash\ncd \u002Fabs\u002Fpath\u002Fto\u002F\u003Crepo>-\u003Cslug>\n# GitHub — draft PR\ngh pr create --draft --title \"\u003Ctitle>\" --body \"Closes #\u003CN>\n\nWIP — opened up front to claim the issue; implementing now.\"   # CREATE_PR\n\n# GitLab — draft MR\nglab mr create --draft --title \"\u003Ctitle>\" --description \"Closes #\u003CN>\n\nWIP — opened up front to claim the issue; implementing now.\" --assignee \u003Cyour-gitlab-username>  # default: \u003Cuser>\n```\n\nKeep it a draft: a draft doesn't trigger the `@claude` review bot, so no review\nround is wasted on an empty diff. Include `Closes #N` to auto-close the issue on\nmerge **only when this PR will finish the issue**. If a later comment splits the\nissue into independent cases and this PR ships only one, file the leftover as\nits own issue **before merge** and rewrite the PR body so it does not `Closes`\nthe parent (link both: this PR for the shipped slice, the new issue for the\nrest). Closing the parent on a partial ship drops the deferred half from the\ntracker\n([gha#373](https:\u002F\u002Fgithub.com\u002FMorrison-Lab\u002Fgha\u002Fissues\u002F373) \u002F\n[#516](https:\u002F\u002Fgithub.com\u002FMorrison-Lab\u002Fgha\u002Fpull\u002F516) \u002F\n[#517](https:\u002F\u002Fgithub.com\u002FMorrison-Lab\u002Fgha\u002Fissues\u002F517)).\n\n### 9. Implement\n\n- Read the issue description carefully — understand \"done\" criteria\n- Research before writing code: verify that no standard library, upstream package,\n  or lab repo helper already provides what you are about to write (DRW).\n  If custom implementation is needed, record the search and why existing options were unfit\n- Make the changes (code, tests, docs as needed)\n- Run the repo's standard checks (lint, test, build) before committing\n  Prefer the same commands CI runs.\n  If the repo has both subpackage tests and a root-level lint step,\n  run both\n- Commit with a message referencing the issue:\n  `fix: handle auth timeout on slow networks (closes #12)`\n\n### 10. Push and mark the PR ready for review\n\n```bash\ngit push origin fix\u002F\u003Cslug>   # PUSH — push the implementation onto the draft PR from step 8\ngh pr ready \u003CN>              # MARK_PR_READY — GitHub, flip draft → ready, which kicks off review\n# GitLab: glab mr update \u003CN> --ready\n```\n\nThe PR already exists (step 8), so there's nothing new to create — pushing the\nimplementation and marking it ready for review is what starts ARDI.\n\n### 11. ARDI to clean\n\nInvoke the `ardi` skill on the MR\u002FPR. Drive it through review rounds until the\nverdict is clean (zero findings).\n\n### 12. Report\n\nWhen ARDI completes clean, report:\n- Issue number + link\n- MR\u002FPR number + link\n- Round count\n- Any deferred items (with follow-up issue links)\n\nDon't merge unless asked. When you do merge, see\n[§Concurrent-session collisions](#concurrent-session-collisions) first.\n\n## Concurrent-session collisions\n\nThis repo often has many sessions running at once, so another session can open\na PR that closes \"your\" issue *after* you started — the claim comment and the\nopening PR-list scan won't catch a PR that didn't exist yet. Re-check right\nbefore merging (and treat an unexpected merge conflict as a signal):\n\n- Search open *and merged* PRs for one that already references `Closes #\u003CN>`\n  for your issue (`SEARCH_PRS` — `gh pr list --state all --search \"closes #\u003CN>\"`\n  \u002F the GitHub `mcp__github__search_pull_requests` tool) — the default `gh pr list` lists only open PRs\n  and would miss a sibling that already merged and closed the issue, the case\n  that matters most. If the issue is already closed, don't merge a now-redundant\n  PR blindly.\n- If a sibling PR landed first, sync `main` into your branch and **read the\n  resulting diff** — keep only the parts the sibling missed, drop the\n  duplicates, and reframe the PR (it no longer `Closes #\u003CN>`; it's a follow-up).\n\n## Delegating sidecar work\n\nWhile implementing (step 9), delegate independent sidecar work to a subagent\nvia the `Agent` tool when it won't block the critical path --- e.g. verifying\na claim from the issue description, drafting a test fixture, or investigating\na tangential failure surfaced along the way. Keep claiming, branching, opening\nthe draft PR, and the ARDI loop itself on the main thread.\n\nFor a judgment-heavy sidecar task (a subtle bug hunt, an architecturally significant design call), override the subagent's model to a stronger tier via the `Agent` tool's `model` parameter (e.g. `model: 'opus'`) rather than the session default.\nSymmetrically, drop to a cheaper\u002Ffaster tier (`model: 'fable'` or `'haiku'`) for a mechanical, bounded sidecar task instead of leaving it at the session default --- see [`select-model`](..\u002F..\u002Fskills\u002Fselect-model\u002FSKILL.md)'s decision tree for both directions.\nFor a heavy fan-out read\u002Fdraft\u002Fverify pass, prefer a separately-billed provider (e.g. the `codex` CLI, in UCDH projects only) first when available, to conserve Claude\u002FAgent-tool budget --- see [`delegate-to-codex`](..\u002Fdelegate-to-codex\u002FSKILL.md).\n\n## Handling blocked issues\n\nIf during implementation you discover the issue is blocked (missing\ndependency, needs design decision, upstream bug):\n\n1. Post a comment on the issue explaining the blocker\n2. Label it `blocked` if the repo uses that label\n3. Report to the user and offer to pick the next issue instead\n\n## Relationship to other skills\n\n- **`check-history`** — invoked in step 5 to avoid undoing past work\n- **`prefer-upstream`** --- search existing packages, standard libraries, and lab\n  repos before writing custom code to avoid reinventing the wheel\n- **`scout-peers`** --- suggested in step 5 to check how peers solved a problem so you don't reinvent the wheel (distinct from `oppo`, which finds *what* to build)\n- **`ardi`** — invoked in step 11 to drive the MR\u002FPR to clean\n- **`claim-pr`** — the issue claim in step 6 follows the same pattern\n- **`pr-on-claim`** — the rule behind step 8: open the draft PR up front so the\n  work is visible to other sessions before you implement\n- **`split-concerns`** — if the implementation grows too large, offer to split\n- **`defer-issue`** — if sub-tasks emerge during implementation, defer them\n- **`select-model`** — decision tree for picking a subagent's model tier when\n  delegating sidecar work (see Delegating sidecar work)\n- **`delegate-to-codex`** — when a sidecar task is a heavy fan-out read\u002Fdraft\u002Fverify pass and codex is available (UCDH projects only), prefer it first\n\n## Anti-patterns\n\n- ❌ Grabbing an issue already assigned to someone else\n- ❌ Starting implementation without checking history\n- ❌ Hand-rolling custom code without researching existing packaged or shared solutions first (violating DRW)\n- ❌ Opening an MR without running the repo's standard checks first\n- ❌ Picking a huge issue that can't be completed in one session without\n  discussing scope with the user first\n- ❌ Implementing without understanding \"done\" criteria from the issue\n- ❌ Skipping triage labeling on candidate issues — apply classification labels\n  to candidate issues inspected during triage so the backlog stays organized\n- ❌ Opening the PR only after implementing — open a draft PR up front (step 8)\n  so the work is visible and a parallel session doesn't grab the same issue\n- ❌ Forgetting `Closes #N` in the MR\u002FPR description\n- ❌ Merging without re-checking that a concurrent session's PR hasn't already\n  closed the issue (resolve a surprise merge conflict by reading the diff, not\n  blindly)\n",{"name":5,"description":7,"allowed-tools":24,"user-invocable":30},[25,26,27,28,29],"Bash","Agent","Read","Edit","Write",true,"main","0f720481f8ce3b3d9fef485f6e230d8b3035748e","skills\u002Fgi",1,"https:\u002F\u002Fgithub.com\u002FMorrison-Lab\u002Fai-config","https:\u002F\u002Fmorrison-lab.github.io\u002Fai-config\u002F","https:\u002F\u002Fgithub.com\u002FMorrison-Lab","2026-11-15 04:39:15",{"source":8,"skillName":5,"commands":40,"prompt":50,"zipAvailable":30},[41,44,47],{"tool":42,"command":43},"npx","npx skills add Morrison-Lab\u002Fai-config --skill gi",{"tool":45,"command":46},"bunx","bunx skills add Morrison-Lab\u002Fai-config --skill gi",{"tool":48,"command":49},"pnpm","pnpm dlx skills add Morrison-Lab\u002Fai-config --skill gi","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FMorrison-Lab\u002Fai-config\u002Fblob\u002Fmain\u002Fskills\u002Fgi\u002FSKILL.md",[],[53,60,67,74,81,88],{"skillNo":54,"name":55,"nameZh":6,"description":56,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":57,"categories":58,"keywords":59,"publishedAt":19},"01M735BVYCGR5VEC65AFDVSNKW","wrap-up","End-of-session verification and UMS.","https:\u002F\u002Fgithub.com\u002FMorrison-Lab\u002Fai-config\u002Fblob\u002Fmain\u002Fskills\u002Fwrap-up\u002FSKILL.md",[],[],{"skillNo":61,"name":62,"nameZh":6,"description":63,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":64,"categories":65,"keywords":66,"publishedAt":19},"01M735BTH469T1CQ8G2Q9GENCR","workaround-watcher","Watch upstream issue for fix.","https:\u002F\u002Fgithub.com\u002FMorrison-Lab\u002Fai-config\u002Fblob\u002Fmain\u002Fskills\u002Fworkaround-watcher\u002FSKILL.md",[],[],{"skillNo":68,"name":69,"nameZh":6,"description":70,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":71,"categories":72,"keywords":73,"publishedAt":19},"01M735BRKZWFANSQ0GM380B4TD","wn","→ whats-next.","https:\u002F\u002Fgithub.com\u002FMorrison-Lab\u002Fai-config\u002Fblob\u002Fmain\u002Fskills\u002Fwn\u002FSKILL.md",[],[],{"skillNo":75,"name":76,"nameZh":6,"description":77,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":78,"categories":79,"keywords":80,"publishedAt":19},"01M735BPE9V830B3B6NGXQ56J6","whats-next","Recommend concrete next step or action.","https:\u002F\u002Fgithub.com\u002FMorrison-Lab\u002Fai-config\u002Fblob\u002Fmain\u002Fskills\u002Fwhats-next\u002FSKILL.md",[],[],{"skillNo":82,"name":83,"nameZh":6,"description":84,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":85,"categories":86,"keywords":87,"publishedAt":19},"01M735BMHQ60EAD5B7QAWXC5A0","wait-for-results","Wait for pipeline\u002FCI results.","https:\u002F\u002Fgithub.com\u002FMorrison-Lab\u002Fai-config\u002Fblob\u002Fmain\u002Fskills\u002Fwait-for-results\u002FSKILL.md",[],[],{"skillNo":89,"name":90,"nameZh":6,"description":91,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":92,"categories":93,"keywords":94,"publishedAt":19},"01M735BKGZHPN1PEMJ7YBD5VJ8","wai","→ send-notes.","https:\u002F\u002Fgithub.com\u002FMorrison-Lab\u002Fai-config\u002Fblob\u002Fmain\u002Fskills\u002Fwai\u002FSKILL.md",[],[]]