Hello-QM/catgo-LRG / server/catgo/workflow/skills/catgo-campaign-loop
catgo-campaign-loop
VerifiedRun and resume the CatGo md-orchestration poll loop — delegate each poll to a subagent (keep main context lean), verify convergence by force, auto-advance each converged species per-species (pipeline, not barrier), and resume a campaign from disk after context compaction / new session. Use when driving or resuming a campaign's job-watch loop. Pairs with catgo-campaign.
catgo-campaign-loop — drive & resume the poll loop
TL;DR: Human-triggered ~10-min loop. Delegate each poll to a subagent (compact summary back). Verify convergence by force. Auto-advance each converged species to its next step (per species, not a barrier). State is on disk → any agent resumes.
RULE — delegate each poll to a subagent
Do NOT run poll/verify inline. Dispatch ONE subagent (opus) to run steps 1-3 (poll, ssh-read OUTCAR, verify, write result.md/STATUS/LESSONS) and return a compact summary only (one line per calc; no raw OUTCAR/OSZICAR/ssh dumps) — over a long run the verbose output would fill the main context toward 1M. Gates stay in the main agent (input-file gate, checkpoints): the subagent reports, the main agent shows the user + acts. The subagent must not submit/cancel jobs or touch the :8000 backend.
Each wake
- Read
plan.md+ activeSTATUS.md(keep working context lean). python poll.py --project <dir> --ssh <alias>— updates STATUS: queued viasqueue; once a job leaves the queue,sacctgives the terminal verdict (COMPLETED→DONE; FAILED/TIMEOUT/OUT_OF_MEMORY/CANCELLED→FAILED;exit_coderecorded).- For finished calcs: a scheduler DONE ≠ "the science succeeded" — open the remote
outputs and verify real convergence by
FORCES: max atom< |EDIFFG| (force, NOT dE; the "kinetic energy error for atom" EATOM line is benign). Write energy_eV + max_force_eVA intoresult.md; on real failure (DONE-but-unconverged, or FAILED) record cause + fix inLESSONS.md. - Auto-advance each newly-converged calc to its NEXT plan step — per species, PIPELINE,
not a barrier. A converged geo_opt immediately triggers that species' next step (e.g.
freq in a Gibbs study) from its CONTCAR; don't wait for siblings, don't wait for a user
reminder. Render next-step inputs → input-file gate →
submit_calc.py. ⛔ INPUT-FILE GATE (hard rule): "auto-advance" means auto-PREP, NOT auto-submit. Sync the converged CONTCAR and the next-step INCAR to the LOCAL folder, tell the user the exact LOCAL paths of INCAR + CONTCAR, and WAIT — the user checks/edits the files on disk. Submit ONLY after the user confirms. Do NOT push to the CatGO viewer as a substitute, and NEVER auto-submit. (YOLO waives.) - Stage/decision point →
python aggregate.py --project <dir> --plot→ summary → checkpoint. - Group meeting →
python make_report.py --project <dir> --occasion groupmeeting. - Unhandleable problem → write it to STATUS/LESSONS and stop (surface to the user).
Resuming (fresh agent / after compaction)
State lives ON DISK, not in context — a campaign survives compaction, a new session, or a different agent. To resume with zero conversation history:
- Invoke the
catgo-campaignskill; identify the project dir. - Read in order:
README.md→plan.md(+ eachcalc/<stage>/plan.md) →cluster.md→ everycalc/**/STATUS.md→result.mdfiles →LESSONS.md= done / running / next. - Continue the loop (delegate each poll to a subagent). Keep the discipline: flush results/STATUS/LESSONS/plan to files as it happens — never hold campaign state only in context.
Unattended (fully-ended session)
ScheduleWakeup dies with the session. For a campaign that must advance without you, register a cron routine that wakes a fresh agent on a schedule to poll the project (it resumes from disk). Otherwise the user says "resume " in a new session.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| writing-skillsobra/superpowersUse when creating new skills, editing existing skills, or verifying skills work before deployment | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| xlsxanthropics/skillsUse this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing .xlsx, .xlsm, .xltx, .csv, or .tsv file (e.g., adding columns, computing formulas, formatting, charting, cleaning messy data); create a new spreadsheet from scratch or from other data sources; or convert between tabular file formats. Trigger especially when the user references a spreadsheet file by name or path — even casually (like "the xlsx in my downloads") — and wants something done to it or produced from it. Also trigger for cleaning or restructuring messy tabular data files (malformed rows, misplaced headers, junk data) into proper spreadsheets. The deliverable must be a spreadsheet file. Do NOT trigger when the primary deliverable is a Word document, HTML report, standalone Python script, database pipeline, or Google Sheets API integration, even if tabular data is involved. | Stars: 197k | Updated | Claude CodeCodex | Verified | Install |
| shipping-and-launchaddyosmani/agent-skillsPrepares production launches. Use when preparing to deploy to production, or when asking what needs to be in place before shipping. Use when you need a pre-launch checklist, when setting up monitoring, when planning a staged rollout, or when you need a rollback strategy. | Stars: 119k | Updated | Claude CodeCodex | Verified | Install |
| childhoodthedotmack/claude-memBabysit a shipped release after merge, publication, or deployment. Verify published packages, production behavior, installed plugins, and late CI or user reports until the observation window is clean; use babysit for PR readiness before release. | Stars: 118k | Updated | Claude CodeCodex | Verified | Install |