Skip to content

Add nimbus-worker-scaffold + nimbus-worker-hardening skills (Claude Code + Codex) - #154

Merged
arjunrajlab merged 2 commits into
masterfrom
add-nimbus-worker-skills
Jul 13, 2026
Merged

Add nimbus-worker-scaffold + nimbus-worker-hardening skills (Claude Code + Codex)#154
arjunrajlab merged 2 commits into
masterfrom
add-nimbus-worker-skills

Conversation

@arjunrajlab

Copy link
Copy Markdown
Collaborator

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 IndexRange fallbacks, #142 channelCheckboxes, #143 batch coords, #145 degenerate/MultiPolygon geometry, #144 stardist setuptools).

New skills

  • nimbus-worker-scaffold — create a worker end-to-end: entrypoint.py, the Dockerfile label set (including the mandatory isGPUWorker label that routes the GPU/CPU queue), an optional Dockerfile_M1, tests, WORKERNAME.md, docker-compose registration, and the REGISTRY.md update. Copy-paste templates for each worker kind live in references/templates.md, validated against real workers in the tree.
  • nimbus-worker-hardening — a catalog of the recurring worker failure modes (missing IndexRange fallbacks, non-dict channelCheckboxes, degenerate/MultiPolygon geometry, 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-interface description 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.mdAGENTS.md references, "Claude"→"the agent" phrasing, and the Claude-only mycelium:codex-review reference 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, mirroring CLAUDE.md.

(A .codex/hooks/ placeholder dir also exists locally but is empty, so it isn't part of this PR.)

Validation

  • Accuracy pass against the codebase caught and fixed two errors before this PR: the Dockerfile_M1/MAC_DEVELOPMENT_MODE framing (they're the same mechanism and a Dockerfile_M1 is optional, not required for GPU workers) and a Dockerfile_Test template that didn't match the repo's conda house style.
  • Triggering disambiguation validated with three independent router judges over 14 realistic queries: 14/14 unanimous, each routed to the intended skill (create→scaffold, crash/fix→hardening, API how-to→interface, unrelated→none).

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

…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>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment on lines +90 to +92
isGPUWorker="true" # or "false" — MANDATORY, no default \
isAnnotationWorker="" \ # OR isPropertyWorker="" for property workers
annotationShape="polygon" \ # polygon | point | line (property + shaped annotation workers)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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']

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

Comment on lines +73 to +75
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

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

@arjunrajlab
arjunrajlab merged commit 1d9cd60 into master Jul 13, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant