[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M735BMHQ60EAD5B7QAWXC5A0":3,"skill-same:01M735BMHQ60EAD5B7QAWXC5A0":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},"01M735BMHQ60EAD5B7QAWXC5A0","wait-for-results",null,"Wait for pipeline\u002FCI results.","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\u002Fwait-for-results\u002FSKILL.md",[],[],"2026-11-11 15:11:14",false,"---\nname: wait-for-results\ndescription: \"Wait for pipeline\u002FCI results.\"\nuser-invocable: true\nallowed-tools:\n  - Bash\n  - Skill\n  - Read\n  - Write\n  - Edit\n---\n\n# wait-for-results\n\nBlock on one or more long-running jobs until they finish, then run the\nfollow-up step the work needs (combine, build, deploy, report). Because the\nwait may outlive the session, this skill **leads with a handoff** so state is\nnever lost.\n\n## When this fires\n\n- \"wait for results\", \"wait for the jobs\", \"poll until done then \u003Cdo X>\".\n- Right after launching a long job (SLURM array, CI run, background task,\n  remote agent) that you intend to act on at completion.\n\n## Step 1 — Hand off first (always)\n\nInvoke the `handoff` skill **immediately**, before waiting. This snapshots the\nbranch\u002FHEAD\u002Funpushed commits\u002Fjob IDs\u002Fpick-up steps into a project memory and\nposts a paused-state note on any active PR\u002FMR. The point: if the session ends\nor context resets while you're waiting, the next session resumes cleanly with\nzero lost state.\n\nRefresh the handoff (re-run it) if the situation materially changes during the\nwait — a job fails, the plan changes, or new commits land.\n\n## Step 2 — Identify what to wait on and the success condition\n\nPin down, concretely:\n- **What** the jobs are — SLURM array IDs, background task IDs + output files,\n  CI run, etc.\n- The **done** condition — `squeue` empty, expected output-file count reached,\n  `gh run watch` exits, a sentinel file appears.\n- The **follow-up step** to run on success (e.g. `combine-slurm-results.R`), and\n  what counts as failure (missing chunks, non-zero exit, error in logs).\n\n## Step 3 — Poll on a sensible cadence\n\nPick the waiting mechanism by whether the wait must survive the session ending\nor a context reset:\n\n- **`ScheduleWakeup` (primary for cross-session survival).** Schedule a\n  re-invocation with a cadence matched to the job and a long fallback\n  heartbeat. This is the only mechanism that wakes the model back up *after*\n  the current session has ended, so prefer it whenever the wait may outlive the\n  session.\n- **Background Bash loop (same-session short waits).** Run the poll as a\n  background Bash command so the session stays responsive; the harness\n  re-invokes you when the command exits — but only while *this* session is\n  still alive. If the session has already ended, a finished loop wakes nobody,\n  so don't rely on it to survive a reset.\n\nEither way, match the cadence to how fast the state actually changes; don't\nburn cycles polling every few seconds for a multi-hour job.\n\n```bash\n# Same-session example: wait for a SLURM array, then verify chunk count\nfor i in $(seq 1 240); do\n  sleep 60\n  if [ -z \"$(squeue -u \"$USER\" --name=\u003Cjob-name> 2>\u002Fdev\u002Fnull | tail -n +2)\" ]; then\n    echo \"JOBS DONE (check $i); outputs: $(ls \u003Coutput-glob> 2>\u002Fdev\u002Fnull | wc -l)\"\n    break\n  fi\ndone\n# Fallback: the loop has a silent 4-hour ceiling (240 × 60s). If it exhausted\n# without breaking, the jobs are still running — make that observable.\nif [ \"$i\" -eq 240 ] && [ -n \"$(squeue -u \"$USER\" --name=\u003Cjob-name> 2>\u002Fdev\u002Fnull | tail -n +2)\" ]; then\n  echo \"TIMEOUT: jobs still running after 240 checks — run a fresh handoff and check manually.\"\nfi\n```\n\n## Step 4 — On completion, verify then run the follow-up\n\n- **Verify** the success condition before acting — e.g. expected output count,\n  no failures in `logs\u002F`, clean exit. If the jobs failed or came up short,\n  **stop and report** rather than running the follow-up on bad inputs.\n- **Run the follow-up step**, capture its output, and sanity-check the result.\n- **Update the handoff memory** to reflect the new state (jobs done, results\n  produced, next action), and update or close the PR paused-note accordingly.\n- Recap to the user with a local-time stamp: what finished, what the follow-up\n  produced, and what's next.\n\n## Relationship to other skills\n\n- `handoff` — run first (Step 1) and refreshed at the end; this skill *includes*\n  it so the wait is crash-safe.\n- `memories\u002Fpreferences.md` (the \"always leave handoff notes proactively\"\n  bullet) — the policy that makes Step 1 mandatory.\n- `claim-pr` — the paused note posted via `handoff` lives inside an existing\n  claim.\n","# wait-for-results\n\nBlock on one or more long-running jobs until they finish, then run the\nfollow-up step the work needs (combine, build, deploy, report). Because the\nwait may outlive the session, this skill **leads with a handoff** so state is\nnever lost.\n\n## When this fires\n\n- \"wait for results\", \"wait for the jobs\", \"poll until done then \u003Cdo X>\".\n- Right after launching a long job (SLURM array, CI run, background task,\n  remote agent) that you intend to act on at completion.\n\n## Step 1 — Hand off first (always)\n\nInvoke the `handoff` skill **immediately**, before waiting. This snapshots the\nbranch\u002FHEAD\u002Funpushed commits\u002Fjob IDs\u002Fpick-up steps into a project memory and\nposts a paused-state note on any active PR\u002FMR. The point: if the session ends\nor context resets while you're waiting, the next session resumes cleanly with\nzero lost state.\n\nRefresh the handoff (re-run it) if the situation materially changes during the\nwait — a job fails, the plan changes, or new commits land.\n\n## Step 2 — Identify what to wait on and the success condition\n\nPin down, concretely:\n- **What** the jobs are — SLURM array IDs, background task IDs + output files,\n  CI run, etc.\n- The **done** condition — `squeue` empty, expected output-file count reached,\n  `gh run watch` exits, a sentinel file appears.\n- The **follow-up step** to run on success (e.g. `combine-slurm-results.R`), and\n  what counts as failure (missing chunks, non-zero exit, error in logs).\n\n## Step 3 — Poll on a sensible cadence\n\nPick the waiting mechanism by whether the wait must survive the session ending\nor a context reset:\n\n- **`ScheduleWakeup` (primary for cross-session survival).** Schedule a\n  re-invocation with a cadence matched to the job and a long fallback\n  heartbeat. This is the only mechanism that wakes the model back up *after*\n  the current session has ended, so prefer it whenever the wait may outlive the\n  session.\n- **Background Bash loop (same-session short waits).** Run the poll as a\n  background Bash command so the session stays responsive; the harness\n  re-invokes you when the command exits — but only while *this* session is\n  still alive. If the session has already ended, a finished loop wakes nobody,\n  so don't rely on it to survive a reset.\n\nEither way, match the cadence to how fast the state actually changes; don't\nburn cycles polling every few seconds for a multi-hour job.\n\n```bash\n# Same-session example: wait for a SLURM array, then verify chunk count\nfor i in $(seq 1 240); do\n  sleep 60\n  if [ -z \"$(squeue -u \"$USER\" --name=\u003Cjob-name> 2>\u002Fdev\u002Fnull | tail -n +2)\" ]; then\n    echo \"JOBS DONE (check $i); outputs: $(ls \u003Coutput-glob> 2>\u002Fdev\u002Fnull | wc -l)\"\n    break\n  fi\ndone\n# Fallback: the loop has a silent 4-hour ceiling (240 × 60s). If it exhausted\n# without breaking, the jobs are still running — make that observable.\nif [ \"$i\" -eq 240 ] && [ -n \"$(squeue -u \"$USER\" --name=\u003Cjob-name> 2>\u002Fdev\u002Fnull | tail -n +2)\" ]; then\n  echo \"TIMEOUT: jobs still running after 240 checks — run a fresh handoff and check manually.\"\nfi\n```\n\n## Step 4 — On completion, verify then run the follow-up\n\n- **Verify** the success condition before acting — e.g. expected output count,\n  no failures in `logs\u002F`, clean exit. If the jobs failed or came up short,\n  **stop and report** rather than running the follow-up on bad inputs.\n- **Run the follow-up step**, capture its output, and sanity-check the result.\n- **Update the handoff memory** to reflect the new state (jobs done, results\n  produced, next action), and update or close the PR paused-note accordingly.\n- Recap to the user with a local-time stamp: what finished, what the follow-up\n  produced, and what's next.\n\n## Relationship to other skills\n\n- `handoff` — run first (Step 1) and refreshed at the end; this skill *includes*\n  it so the wait is crash-safe.\n- `memories\u002Fpreferences.md` (the \"always leave handoff notes proactively\"\n  bullet) — the policy that makes Step 1 mandatory.\n- `claim-pr` — the paused note posted via `handoff` lives inside an existing\n  claim.\n",{"name":5,"description":7,"allowed-tools":24,"user-invocable":30},[25,26,27,28,29],"Bash","Skill","Read","Write","Edit",true,"main","0f720481f8ce3b3d9fef485f6e230d8b3035748e","skills\u002Fwait-for-results",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 wait-for-results",{"tool":45,"command":46},"bunx","bunx skills add Morrison-Lab\u002Fai-config --skill wait-for-results",{"tool":48,"command":49},"pnpm","pnpm dlx skills add Morrison-Lab\u002Fai-config --skill wait-for-results","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FMorrison-Lab\u002Fai-config\u002Fblob\u002Fmain\u002Fskills\u002Fwait-for-results\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},"01M735BKGZHPN1PEMJ7YBD5VJ8","wai","→ send-notes.","https:\u002F\u002Fgithub.com\u002FMorrison-Lab\u002Fai-config\u002Fblob\u002Fmain\u002Fskills\u002Fwai\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},"01M735BJ0ZBADJXQ9YPTYSWJZN","use-preferred-style","Apply preferred writing style.","https:\u002F\u002Fgithub.com\u002FMorrison-Lab\u002Fai-config\u002Fblob\u002Fmain\u002Fskills\u002Fuse-preferred-style\u002FSKILL.md",[],[]]