Add nimbus-worker-scaffold + nimbus-worker-hardening skills (Claude Code + Codex) - #154
Conversation
…irror to Codex Two repo-specific skills distilled from recurring workflows across recent PRs and Claude Code sessions: - nimbus-worker-scaffold: create a new worker end-to-end (entrypoint.py, Dockerfile label set incl. the mandatory isGPUWorker, optional Dockerfile_M1, tests, WORKERNAME.md, docker-compose registration, REGISTRY.md), with copy-paste templates for each worker kind in references/templates.md. - nimbus-worker-hardening: catalog of the recurring worker failure modes (missing IndexRange fallbacks, non-dict channelCheckboxes, degenerate/ MultiPolygon geometry, out-of-range batch coords, build-time dep breakage, tags-as-dict), each with symptom, fix, and a grep sweep — plus the fix-one-then-audit-all-siblings method. Also tighten the existing nimbus-interface description to a runtime-API-reference scope so the three worker skills route cleanly (create -> scaffold, fix/crash -> hardening, API how-to -> interface); validated 14/14 unanimous across three independent router judges. Mirror all three skills into .agents/skills/ and add AGENTS.md so Codex can use the same skills as Claude Code (tool-neutral prose, AGENTS.md references, generic PR-review reference in place of the Claude-only mycelium skill). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 87f3758e78
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| isGPUWorker="true" # or "false" — MANDATORY, no default \ | ||
| isAnnotationWorker="" \ # OR isPropertyWorker="" for property workers | ||
| annotationShape="polygon" \ # polygon | point | line (property + shaped annotation workers) |
There was a problem hiding this comment.
Move Dockerfile comments out of continued LABELs
When a new worker author copies this scaffolded label block, Docker does not treat these inline # fragments as comments; Docker's Dockerfile reference states that a # outside the start of a line is parsed as an argument. In this continued LABEL, those words become part of the instruction and the escaped newlines/comments can make the generated Dockerfile fail to parse or produce bogus labels, blocking scaffolded worker builds. Put these explanations on separate comment lines outside the LABEL continuation.
Useful? React with 👍 / 👎.
|
|
||
| ### Metadata | ||
| ```python | ||
| idx = tileClient.tiles['IndexRange'] |
There was a problem hiding this comment.
Guard missing IndexRange in the API snippet
This Codex API reference reintroduces direct tileClient.tiles['IndexRange'] access even though single-frame datasets can omit IndexRange entirely; the existing helpers such as annotation_utilities.annotation_tools.get_images_for_all_channels() and WorkerClient.get_image_stack() already use .get('IndexRange', {}) for that reason. If an agent copies this snippet into a worker, it will crash with KeyError: 'IndexRange' before the default dimension sizes on the next lines can apply. Initialize idx with tileClient.tiles.get('IndexRange', {}) instead.
Useful? React with 👍 / 👎.
| pip install -e /home/arjun/UPennContrast/devops/girder/annotation_client | ||
| pip install -e /home/arjun/ImageAnalysisProject/annotation_utilities | ||
| pip install -e /home/arjun/ImageAnalysisProject/worker_client |
There was a problem hiding this comment.
Replace user-specific install paths in the Codex skill
Because this is the new Codex-facing mirror, the local setup commands need to work from arbitrary checkouts. As written, any agent or user not running under /home/arjun (for example this repository checkout at /workspace/ImageAnalysisProject) will hit missing-path errors for the local packages, making the documented local test workflow unusable. Use repo-relative paths for annotation_utilities and worker_client, and make the external annotation_client checkout path configurable.
Useful? React with 👍 / 👎.
Summary
Adds two repo-specific skills that codify the two workflows that dominate recent PRs and Claude Code sessions, and makes them usable from both Claude Code and Codex.
They were distilled from real history — the new-worker PRs (#150 Trackastra/Ultrack, #151 fluorescence correction, #152 Cellpose-SAM retrain, #134 CondensateNet, #136 error_generator) and the robustness fix PRs (#139/#140
IndexRangefallbacks, #142channelCheckboxes, #143 batch coords, #145 degenerate/MultiPolygon geometry, #144 stardistsetuptools).New skills
nimbus-worker-scaffold— create a worker end-to-end:entrypoint.py, the Dockerfile label set (including the mandatoryisGPUWorkerlabel that routes the GPU/CPU queue), an optionalDockerfile_M1, tests,WORKERNAME.md,docker-composeregistration, and theREGISTRY.mdupdate. Copy-paste templates for each worker kind live inreferences/templates.md, validated against real workers in the tree.nimbus-worker-hardening— a catalog of the recurring worker failure modes (missingIndexRangefallbacks, non-dictchannelCheckboxes, degenerate/MultiPolygongeometry, out-of-range batch coordinates, build-time transitive-dep breakage,tags-as-dict). Each entry has symptom → fix → a grep sweep, plus the defining fix-one-then-audit-all-siblings method.Existing skill touched
nimbus-interfacedescription narrowed to runtime-API-reference scope. Previously it claimed "building, debugging, or testing workers," which overlapped the two new skills. All three now carry explicit, mutually-exclusive scope boundaries.Codex migration (done separately by Codex)
So both toolchains share one set of skills, this PR also includes a Codex-readable mirror:
.agents/skills/— the same three skills, tool-neutralized:CLAUDE.md→AGENTS.mdreferences, "Claude"→"the agent" phrasing, and the Claude-onlymycelium:codex-reviewreference generalized to the available PR-review workflow. Substance is otherwise identical to the.claude/skills/versions (verified by diff); frontmatter differs only in serialization (quoted/unicode-escaped).AGENTS.md— Codex's guidance file, mirroringCLAUDE.md.(A
.codex/hooks/placeholder dir also exists locally but is empty, so it isn't part of this PR.)Validation
Dockerfile_M1/MAC_DEVELOPMENT_MODEframing (they're the same mechanism and aDockerfile_M1is optional, not required for GPU workers) and aDockerfile_Testtemplate that didn't match the repo's conda house style.Caveat: the router test covered clear-cut queries; genuinely borderline phrasings (e.g. "building a new worker — how do I merge channels in
compute()?") weren't scored. No functional code changed — skills and agent-guidance docs only.🤖 Generated with Claude Code