Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .claude/skills/template/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ description: Create, maintain, format, and publish Anyscale console templates. U

# Template skill

A console template = a `BUILD.yaml` entry + `templates/<name>/` content + `configs/<name>/` compute configs + a `tests/<name>/` test. Every template under `templates/` is tested (the validator enforces it); `archive/` holds **test-exempt** content — retired/past-event templates, plus fast untested iteration that can still be published — via `workflows/archive-template.md`.
A console template = a `BUILD.yaml` entry + `templates/<name>/` content + `configs/<name>/` compute configs + a `tests/<name>/` test. Every entry carries a required `owner_team` (`ray-serve` | `ray-data` | `llm` | `ray-train` | `general`), deduced from the template's content — the rule + tie-break live in `schemas/build-yaml-schema.yaml`. Every template under `templates/` is tested (the validator enforces it); `archive/` holds **test-exempt** content — retired/past-event templates, plus fast untested iteration that can still be published — via `workflows/archive-template.md`.

**How to use:** create/update are **interactive** — interview the user, explain at the point of need, and ask for any missing input. **ray-bump is non-interactive** (the `template-updater` Cursor cloud agent; signals: `.cursor/` setup, a `cursor/...` branch, an automation trigger): never prompt, use defaults; on missing input or preflight failure, post to the PR and stop. Track multi-step runs with your task tool.

Expand Down
2 changes: 1 addition & 1 deletion .claude/skills/template/references/conventions.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ templates/

Run the `check-build-yaml` hook first (see **Validate locally**) — it authoritatively covers BUILD.yaml schema, referenced paths, naming, and the compute-config schema check. Fix what it reports, then verify:

- **BUILD.yaml entry** matches `../schemas/build-yaml-schema.yaml`. Under `cluster_env:`, use either `cluster_env.image_uri` OR `cluster_env.byod`, never both. Image taxonomy: SKILL.md "Image URI cases".
- **BUILD.yaml entry** matches `../schemas/build-yaml-schema.yaml`. `owner_team` is required (`ray-serve` | `ray-data` | `llm` | `ray-train` | `general`) — deduce per that schema file's rule. Under `cluster_env:`, use either `cluster_env.image_uri` OR `cluster_env.byod`, never both. Image taxonomy: SKILL.md "Image URI cases".
- **Compute configs** present at `configs/<name>/aws.yaml` and `configs/<name>/gce.yaml`. Schema: `../schemas/compute-config-schema.yaml`.
- **Test** present at `tests/<name>/tests.sh`.
- **Dependencies pinned.** Declare template deps in `templates/<name>/requirements.txt`, the BYOD `Dockerfile` (`RUN pip install "pkg==x.y.z"`), or notebook `!pip install` — with exact versions. (The repo-root `dependencies/` directory is Ray base-image constraint management, not per-template deps.)
Expand Down
26 changes: 26 additions & 0 deletions .claude/skills/template/schemas/build-yaml-schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
# --- Full schema with all fields ---

- name: <template-name> # REQUIRED. Unique identifier. Appears in console URL.
owner_team: <team> # REQUIRED. One of: ray-serve | ray-data | llm | ray-train | general.
# Deduced from content — see "owner_team deduction" below.
dir: templates/<dir-name> # REQUIRED. Path to template content (relative to repo root).

# REQUIRED. Exactly one of: image_uri, or byod.
Expand Down Expand Up @@ -59,6 +61,30 @@
#
# See: https://docs.anyscale.com/reference/base-images

# --- owner_team deduction (content → single value) ---
#
# The owning team, deduced from what the template is fundamentally ABOUT (its
# center of gravity), not merely what it imports. Pick exactly one:
#
# ray-serve - non-LLM online model serving: @serve.deployment, model
# composition / multiplexing, inference APIs.
# ray-data - non-LLM batch/streaming data pipelines & offline batch
# inference: map_batches, embeddings-at-scale, ETL.
# llm - fundamentally LLM: vLLM, ray.serve.llm, ray.data.llm, LLM
# fine-tuning, RAG, LLM agents.
# ray-train - distributed training / fine-tuning (TorchTrainer, FSDP,
# DeepSpeed, tensor-parallel) & Ray Tune HPO, non-LLM-centric.
# general - platform / Ray Core / onboarding with no single-library owner:
# intros (jobs, workspaces, services, clusters), multi-library
# surveys, pure Ray Core task/actor parallelism.
#
# Multi-library tie-break: llm wins when the template is fundamentally an LLM
# template (even if it also uses ray.data for batch or ray.train to fine-tune an
# LLM). Otherwise pick the primary purpose — a Data→Train pipeline whose point is
# training → ray-train; a batch-inference/embeddings pipeline → ray-data; a
# serving demo → ray-serve. Teaching the platform/Core rather than a library →
# general.

# --- Cross-field rules (enforced by ci/validate_build_yaml.py) ---
#
# - tests_path basename must equal name → tests/<name>/
Expand Down
2 changes: 1 addition & 1 deletion .claude/skills/template/workflows/create-template.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Move the content into `templates/<name>/`. For a notebook template, the main not

## 3. BUILD.yaml entry

Append a list item per `../schemas/build-yaml-schema.yaml`. Set the image for the chosen case: `cluster_env.image_uri` (anyscale base) or `cluster_env.byod.{docker_image,ray_version}` (custom or third-party). For custom GCP, publish the image first (`.claude/skills/template/scripts/push-custom-image-to-gcp.sh <dockerfile-dir> <name> <ray-version>`) and use the printed URI. The entry also wires `compute_config` (step 4) and the `test` block (`command: bash tests.sh`, `tests_path: tests/<name>/`, and `timeout_in_sec` set a bit above the test's measured runtime — target < 30 min).
Append a list item per `../schemas/build-yaml-schema.yaml`. Set `owner_team` (required — `ray-serve` | `ray-data` | `llm` | `ray-train` | `general`, deduced from the template's center of gravity; the schema file has the rule + tie-break). Set the image for the chosen case: `cluster_env.image_uri` (anyscale base) or `cluster_env.byod.{docker_image,ray_version}` (custom or third-party). For custom GCP, publish the image first (`.claude/skills/template/scripts/push-custom-image-to-gcp.sh <dockerfile-dir> <name> <ray-version>`) and use the printed URI. The entry also wires `compute_config` (step 4) and the `test` block (`command: bash tests.sh`, `tests_path: tests/<name>/`, and `timeout_in_sec` set a bit above the test's measured runtime — target < 30 min).

## 4. Compute configs

Expand Down
Loading
Loading