# ray - Doramagic AI Context Pack

> Positioning: a pre-install experience and judgment asset. It helps the host AI get off to a good start, but it does not mean the project has already been installed, run, or validated.

## Sufficiency Principle

- **Sufficiency over compression**: The AI Context Pack should be sufficient for the host AI to understand the project's value, capability boundaries, entrypoints, risks, and evidence sources before starting work; it may be layered, but it does not aim for the shortest possible summary.
- **Compression policy**: Compress only noise and duplication, never context that affects judgment or the quality of the work.

## How the Host AI Should Use This

You are reading the AI Context Pack that Doramagic compiled for ray. Treat it as pre-work context: help the user understand who it fits, what it can do, how to start, what must be verified after install, and where the risks are. Do not claim that you have already installed, run, or executed the target project.

## Claim Consumption Rules

- **Fact source**: Repo Evidence + Claim/Evidence Graph; the Human Wiki only supplies salience, terminology, and narrative structure.
- **Minimum status for a fact**: `supported`
- `supported`: May be used as a project fact, but the answer must cite the claim_id and evidence path.
- `weak`: Usable only as a low-confidence lead; the user must be asked to keep verifying.
- `inferred`: Usable only for risk notes or open questions; must not be packaged as a project fact.
- `unverified`: Must not be used as fact; state clearly that evidence is insufficient.
- `contradicted`: Must show the conflicting sources and must not force a single version on the user's behalf.

## Who It Fits Best

- **Users who want to bring professional workflows into a host AI**: The repo contains Skill documents. Evidence: `.claude/skills/fetch-buildkite-logs/SKILL.md`, `.claude/skills/lint/SKILL.md`, `.claude/skills/ray-dependencies/SKILL.md`, `.claude/skills/rebuild/SKILL.md` et al. Claim: `clm_0003` supported 0.86

## What It Can Do

- **AI Skill / Agent Instruction Asset Library** (Previewable before install): The project contains Skill or Agent instruction files that a host AI can read, useful for bringing professional workflows into hosts like Claude, Codex, or Cursor. Evidence: `.claude/skills/fetch-buildkite-logs/SKILL.md`, `.claude/skills/lint/SKILL.md`, `.claude/skills/ray-dependencies/SKILL.md`, `.claude/skills/rebuild/SKILL.md` et al. Claim: `clm_0001` supported 0.86, `clm_0002` supported 0.86
- **Command-Line Startup or Install Flow** (Verify after install): The project documentation contains runnable commands; real use requires running them in a local or host environment. Evidence: `.claude/skills/fetch-buildkite-logs/SKILL.md`, `.claude/skills/lint/SKILL.md`, `doc/source/cluster/kubernetes/examples/distributed-checkpointing-with-gcsfuse.md`, `doc/source/cluster/kubernetes/examples/mnist-training-example.md` et al. Claim: `clm_0001` supported 0.86, `clm_0002` supported 0.86

## How to Start

- `curl -s -H "Authorization: Bearer $BUILDKITE_API_TOKEN" \` Evidence: `.claude/skills/fetch-buildkite-logs/SKILL.md` Claim: `clm_0004` supported 0.86
- `pip install -c python/requirements_compiled.txt pre-commit && pre-commit install` Evidence: `.claude/skills/lint/SKILL.md` Claim: `clm_0005` supported 0.86
- `curl -LO https://raw.githubusercontent.com/ray-project/kuberay/master/ray-operator/config/samples/pytorch-resnet-image-classifier/ray-job.pytorch-image-classifier.yaml` Evidence: `doc/source/cluster/kubernetes/examples/distributed-checkpointing-with-gcsfuse.md` Claim: `clm_0006` unverified 0.25
- `curl -LO https://raw.githubusercontent.com/ray-project/kuberay/master/ray-operator/config/samples/pytorch-mnist/ray-job.pytorch-mnist.yaml` Evidence: `doc/source/cluster/kubernetes/examples/mnist-training-example.md` Claim: `clm_0007` unverified 0.25
- `curl -LO https://raw.githubusercontent.com/ray-project/kuberay/v1.6.0/ray-operator/config/samples/ray-job.batch-inference.yaml` Evidence: `doc/source/cluster/kubernetes/examples/rayjob-batch-inference-example.md` Claim: `clm_0008` unverified 0.25
- `curl -LO https://raw.githubusercontent.com/ray-project/kuberay/master/ray-operator/config/samples/pytorch-text-classifier/ray-job.pytorch-distributed-training.yaml` Evidence: `doc/source/cluster/kubernetes/examples/rayjob-kueue-gang-scheduling.md` Claim: `clm_0009` unverified 0.25
- `curl -o ray-service.llm-serve.yaml https://raw.githubusercontent.com/ray-project/kuberay/master/ray-operator/config/samples/ray-service.llm-serve.yaml` Evidence: `doc/source/cluster/kubernetes/examples/rayserve-llm-example.md` Claim: `clm_0010` unverified 0.25
- `curl --location 'http://localhost:8000/v1/chat/completions' --header 'Content-Type: application/json'` Evidence: `doc/source/cluster/kubernetes/examples/rayserve-llm-example.md` Claim: `clm_0011` unverified 0.25
- `curl -LO https://raw.githubusercontent.com/ray-project/serve_config_examples/master/stable_diffusion/stable_diffusion_req.py` Evidence: `doc/source/cluster/kubernetes/examples/stable-diffusion-rayservice.md` Claim: `clm_0012` unverified 0.25
- `curl -LO https://raw.githubusercontent.com/ray-project/serve_config_examples/master/text_summarizer/text_summarizer_req.py` Evidence: `doc/source/cluster/kubernetes/examples/text-summarizer-rayservice.md` Claim: `clm_0013` unverified 0.25

## Continue-or-Stop Decision Card

- **Current recommendation**: Sandbox trial only
- **Why**: The project has signals of install commands, host configuration, or local writes; do not go straight into your primary environment—trial it in isolation first.

### 30-Second Read

- **What to do now**: Sandbox trial only
- **Minimum safe next step**: Run Prompt Preview first; if you still want to install, trial only in an isolated environment
- **Do not trust yet**: Real output quality cannot be trusted before install.
- **Continuing will touch**: Command execution, Host AI configuration, Local environment or project files

### What You Can Trust Now

- **Target-audience signal: Users who want to bring professional workflows into a host AI** (supported): Backed by a supported claim or project evidence, but that still is not the same as real install results. Evidence: `.claude/skills/fetch-buildkite-logs/SKILL.md`, `.claude/skills/lint/SKILL.md`, `.claude/skills/ray-dependencies/SKILL.md`, `.claude/skills/rebuild/SKILL.md` et al. Claim: `clm_0003` supported 0.86
- **Capability exists: AI Skill / Agent Instruction Asset Library** (supported): You can trust that the project contains signals of this capability; whether it fits your specific task still needs trial or after-install verification. Evidence: `.claude/skills/fetch-buildkite-logs/SKILL.md`, `.claude/skills/lint/SKILL.md`, `.claude/skills/ray-dependencies/SKILL.md`, `.claude/skills/rebuild/SKILL.md` et al. Claim: `clm_0001` supported 0.86, `clm_0002` supported 0.86
- **Capability exists: Command-Line Startup or Install Flow** (supported): You can trust that the project contains signals of this capability; whether it fits your specific task still needs trial or after-install verification. Evidence: `.claude/skills/fetch-buildkite-logs/SKILL.md`, `.claude/skills/lint/SKILL.md`, `doc/source/cluster/kubernetes/examples/distributed-checkpointing-with-gcsfuse.md`, `doc/source/cluster/kubernetes/examples/mnist-training-example.md` et al. Claim: `clm_0001` supported 0.86, `clm_0002` supported 0.86
- **There are Quick Start / install-command signals** (supported): You can trust that the docs mention a startup or install entrypoint; do not run it directly in your primary environment because of that. Evidence: `.claude/skills/fetch-buildkite-logs/SKILL.md` Claim: `clm_0004` supported 0.86

### What You Cannot Trust Yet

- **Real output quality cannot be trusted before install.** (unverified): Prompt Preview can only show how it guides you; it cannot prove result quality in the real project.
- **Host AI version compatibility cannot be trusted before install.** (unverified): Host loading rules and version differences across Claude, Cursor, Codex, Gemini, and others must be verified in a real environment.
- **That it will not pollute your existing host AI's behavior cannot be trusted directly.** (inferred): Skill, plugin, and AGENTS/CLAUDE/GEMINI instructions may change the host AI's default behavior. Evidence: `.claude/skills/fetch-buildkite-logs/SKILL.md`, `.claude/skills/lint/SKILL.md`, `.claude/skills/ray-dependencies/SKILL.md`, `.claude/skills/rebuild/SKILL.md` et al.
- **Safe rollback cannot be assumed by default.** (unverified): Unless the project clearly provides uninstall and recovery instructions, verify in an isolated environment first.
- **After a real install, is it compatible with the user's current host AI version?** (unverified): Compatibility can only be verified in the actual host environment.
- **Does the project's output quality meet the user's specific task?** (unverified): The pre-install preview can only show flow and boundaries; it cannot replace real evaluation.
- **Do the install commands require network access, permissions, or global writes?** (unverified): This affects install risk in both enterprise and personal environments. Evidence: `.claude/skills/fetch-buildkite-logs/SKILL.md`

### What Continuing Will Touch

- **Command execution**: Package managers, network downloads, the local plugin directory, project config, or the user's home directory. Why: Running the very first command can already change your environment; decide whether it is worth running first. Evidence: `.claude/skills/fetch-buildkite-logs/SKILL.md`, `.claude/skills/lint/SKILL.md`, `doc/source/cluster/kubernetes/examples/distributed-checkpointing-with-gcsfuse.md`, `doc/source/cluster/kubernetes/examples/mnist-training-example.md` et al.
- **Host AI configuration**: The plugin, Skill, or rule-loading config of hosts like Claude/Codex/Cursor/Gemini/OpenCode. Why: Host configuration changes how the AI works afterward and may conflict with the user's existing rules. Evidence: `.claude/skills/fetch-buildkite-logs/SKILL.md`, `.claude/skills/lint/SKILL.md`, `.claude/skills/ray-dependencies/SKILL.md`, `.claude/skills/rebuild/SKILL.md` et al.
- **Local environment or project files**: Install results, plugin caches, project config, or local dependency directories. Why: The write scope and rollback path cannot be proven before install and need isolated verification. Evidence: `.claude/skills/fetch-buildkite-logs/SKILL.md`, `.claude/skills/lint/SKILL.md`, `doc/source/cluster/kubernetes/examples/distributed-checkpointing-with-gcsfuse.md`, `doc/source/cluster/kubernetes/examples/mnist-training-example.md` et al.
- **Host AI context**: The AI Context Pack, Prompt Preview, Skill routing, risk rules, and project facts. Why: Importing context affects the host AI's later judgment, so avoid packaging unverified items as facts.

### Minimum Safe Next Steps

- **Run Prompt Preview first**: Use a pre-install interactive trial to judge whether the way of working fits; it needs no authorization or environment change. (applies when: Applies to any project, especially when output quality is unknown.)
- **Trial-install only in an isolated directory or a test account**: Avoid letting install commands pollute your primary host AI, real projects, or home directory. (applies when: When there are signals of command execution, plugin config, or local writes.)
- **Back up your host AI configuration first**: Skill, plugin, and rule files may change the default behavior of Claude/Cursor/Codex. (applies when: When there is a plugin manifest, a Skill, or a host rule entrypoint.)
- **After install, verify just one minimal task**: Verify loading, compatibility, output quality, and rollback first, then decide whether to use it deeply. (applies when: When moving from a trial into a real workflow.)

### Exit Plan

- **Preserve the pre-install state**: Record the original host config and project state so you can later judge whether it is recoverable.
- **Be ready to remove the host plugin / Skill / rule entrypoint**: If behavior is off after the trial install, you can restore the host AI to its pre-trial state.
- **Record the install commands and written paths**: Without clear uninstall instructions, you at least need to know which directories or configs to clean up manually.
- **If there is no rollback path, do not enter your primary environment**: No rollback is a blocker before continuing; do not proceed on trust or luck.

## What Can Only Be Previewed

- Explain who the project fits and what it can do
- Demonstrate a typical conversation flow based on project docs
- Help the user decide whether it is worth installing or researching further

## What Must Be Verified After Install

- Actually installing the Skill, plugin, or CLI
- Running scripts, modifying local files, or accessing external services
- Verifying real output quality, performance, and compatibility

## Boundary & Risk Decision Card

- **Mistaking the pre-install preview for a real run**: The user may overestimate how much configuration, permission, and compatibility verification the project has already done. Mitigation: Clearly separate prompt_preview_can_do from runtime_required. Claim: `clm_0028` inferred 0.45
- **Command execution will modify the local environment**: Install commands may write to the user's home directory, the host plugin directory, or project configuration. Mitigation: Run in an isolated environment or a test account first. Evidence: `.claude/skills/fetch-buildkite-logs/SKILL.md`, `.claude/skills/lint/SKILL.md`, `doc/source/cluster/kubernetes/examples/distributed-checkpointing-with-gcsfuse.md`, `doc/source/cluster/kubernetes/examples/mnist-training-example.md` et al. Claim: `clm_0029` supported 0.86
- **To confirm**: After a real install, is it compatible with the user's current host AI version?. Why: Compatibility can only be verified in the actual host environment.
- **To confirm**: Does the project's output quality meet the user's specific task?. Why: The pre-install preview can only show flow and boundaries; it cannot replace real evaluation.
- **To confirm**: Do the install commands require network access, permissions, or global writes?. Why: This affects install risk in both enterprise and personal environments.

## Pre-Work Working Context

### Loading Order

- First read how_to_use.host_ai_instruction to establish the boundaries of this pre-install judgment asset.
- Read claim_graph_summary to confirm facts come from the Claim/Evidence Graph, not the Human Wiki narrative.
- Then read intended_users, capabilities, and quick_start_candidates to judge whether the user is a match.
- When you need to carry out a concrete task, check role_skill_index first, then evidence_index.
- For real install, file modification, network access, performance, or compatibility questions, turn to risk_card and boundaries.runtime_required.

### Task Routes

- **AI Skill / Agent Instruction Asset Library**: Use role_skill_index / evidence_index to help the user pick a usable role, Skill, or workflow first. Boundary: Can be experienced via a pre-install Prompt. Evidence: `.claude/skills/fetch-buildkite-logs/SKILL.md`, `.claude/skills/lint/SKILL.md`, `.claude/skills/ray-dependencies/SKILL.md`, `.claude/skills/rebuild/SKILL.md` et al. Claim: `clm_0001` supported 0.86, `clm_0002` supported 0.86
- **Command-Line Startup or Install Flow**: State that this is an after-install capability first, then give a pre-install checklist. Boundary: Must be verified after a real install or run. Evidence: `.claude/skills/fetch-buildkite-logs/SKILL.md`, `.claude/skills/lint/SKILL.md`, `doc/source/cluster/kubernetes/examples/distributed-checkpointing-with-gcsfuse.md`, `doc/source/cluster/kubernetes/examples/mnist-training-example.md` et al. Claim: `clm_0001` supported 0.86, `clm_0002` supported 0.86

### Context Scale

- Total files: 9026
- Important-file coverage: 40/9026
- Evidence index entries: 78
- Role / Skill entries: 6

### Handling Insufficient Evidence

- **missing_evidence**: State that evidence is insufficient and ask the user for the target file, a README section, or after-install verification records; do not fill in facts.
- **out_of_scope_request**: State that the task is beyond the current AI Context Pack's evidence scope and suggest the user check the Human Manual or verify after a real install.
- **runtime_request**: Provide a pre-install checklist and command sources, but do not run commands for the user or claim they have been run.
- **source_conflict**: Show the conflicting sources side by side, mark them as unverified, and do not force a single version.

## Prompt Recipes

### Fit assessment

- Goal: Judge whether this project fits the user's current task.
- Expected output: A fit conclusion, key reasons, evidence citations, what can be previewed before install, what must be verified after install, and a next-step recommendation.

```text
Based on the AI Context Pack for ray, ask me 3 necessary questions first, then judge whether it fits my task. The answer must cover: who it fits, what it can do, what it cannot do, whether it is worth installing, and where the evidence comes from. Every project fact must cite evidence_refs, source_paths, or a claim_id.
```

### Pre-install experience

- Goal: Let the user feel the core workflow before installing, while avoiding packaging the preview as real capability or a marketing promise.
- Expected output: An experience script with boundary labels, an after-install verification checklist, and a cautious recommendation; with no real-run promises or strong marketing language.

```text
Treat ray as a pre-install experience asset, not an already-installed tool or a real runtime environment.

Output exactly four parts:
1. Ask me 3 necessary questions first.
2. Give an "experience script": use the three labels [Previewable before install], [Must verify after install], and [Insufficient evidence] to show how it might guide the workflow.
3. Give an after-install verification checklist: list which capabilities can only be confirmed after a real install, real host loading, and a real project run.
4. Give a cautious recommendation: only "worth researching/trialing further", "add information before deciding", or "not recommended to continue"; do not endorse the project.

Hard boundaries:
- Do not claim you have installed, run, executed tests, modified files, or produced real results.
- Do not write promise-like phrasing such as "auto-adapts", "guarantees passing", "perfect fit", or "strongly recommend installing".
- If you describe how it works after install, you must use a conditional such as "if installed successfully and the host loads the Skill correctly, it might...".
- The experience script may only be written as "example lines / hypothetical flow": use "might ask / might suggest / might show", not "has written, has generated, has passed, is running, is generating".
- Prompt Preview does not hand out install commands; if the user is ready to trial, only prompt them to read Quick Start and the Risk Card first and to verify in an isolated environment.
- Every project fact must come from a supported claim, evidence_refs, or source_paths; inferred/unverified items can only be risks or open questions.

```

### Role / Skill selection

- Goal: Pick the best-matching asset from the project's roles or Skills.
- Expected output: A list of candidate roles or Skills, each with an applicable scenario, evidence paths, risk boundary, and whether after-install verification is needed.

```text
Read role_skill_index and recommend 3-5 of the most relevant roles or Skills for my target task. For each recommendation, state the applicable scenario, likely output, risk boundary, and evidence_refs.
```

### Risk pre-check

- Goal: Identify environment, permission, rule-conflict, and quality risks before installing or adopting.
- Expected output: A checklist of environment, permission, dependency, license, host-conflict, quality risk, and unknown items.

```text
Based on risk_card, boundaries, and quick_start_candidates, give me a pre-install risk pre-check list. Do not run commands for me; only explain what I should check, why, and what impact a failure would have.
```

### Host AI kickoff instruction

- Goal: Turn the project context into a host AI instruction for the start of a conversation.
- Expected output: A pre-work instruction with clear boundaries and clear evidence citations, suitable to copy to a host AI.

```text
Based on the AI Context Pack for ray, generate a pre-work instruction I can paste to my host AI. This instruction must obey not_runtime=true and must not claim the project has been installed, run, or produced real results.
```

## Role / Skill Index

- Indexed 6 role / Skill / project-doc entries.

- **fetch-buildkite-logs** (skill): Fetch and analyze Buildkite CI build logs for failures Activation hint: When the user's task is highly relevant to the workflow described by “fetch-buildkite-logs”, use it for a pre-install experience first, then decide whether to install. Evidence: `.claude/skills/fetch-buildkite-logs/SKILL.md`
- **lint** (skill): Run linting and formatting checks on Ray code Activation hint: When the user's task is highly relevant to the workflow described by “lint”, use it for a pre-install experience first, then decide whether to install. Evidence: `.claude/skills/lint/SKILL.md`
- **ray-dependencies** (skill): Manage Python dependencies in Ray — add/remove/upgrade packages, work with raydepsets lock files, debug dependency conflicts, and regenerate compiled requirements. Covers python/requirements , python/requirements/ , python/deplocks/ , and ci/raydepsets/configs/ .depsets.yaml . Activation hint: When the user's task is highly relevant to the workflow described by “ray-dependencies”, use it for a pre-install experience first, then decide whether to install. Evidence: `.claude/skills/ray-dependencies/SKILL.md`
- **rebuild** (skill): Rebuild Ray from source — determines the right build mode based on what changed Activation hint: When the user's task is highly relevant to the workflow described by “rebuild”, use it for a pre-install experience first, then decide whether to install. Evidence: `.claude/skills/rebuild/SKILL.md`
- **rst-to-myst** (skill): Convert Ray documentation pages from reStructuredText .rst to MyST Markdown .md . Use when migrating existing files under doc/source/ to MyST, finishing a partial MyST migration of a directory, or when asked to convert/migrate a doc page to markdown. Covers the RST-to-MyST directive mapping, label and cross-reference preservation, sphinx-design tabs/dropdowns, doctest/testcode handling, the doc/BUILD.bazel doctest e… Activation hint: When the user's task is highly relevant to the workflow described by “rst-to-myst”, use it for a pre-install experience first, then decide whether to install. Evidence: `doc/.claude/skills/rst-to-myst/SKILL.md`
- **sphinx-fix** (skill): Diagnose a failing Ray Sphinx / Read the Docs documentation build. Parses the Sphinx warning stream an RtD build log, a local build, or pasted text , classifies each warning against a rules table, and proposes the canonical fix in severity-tier order. Detects a hard-broken build, segregates known-benign suppressed classes, and lists every unclassified warning. Use when a docs/readthedocs.com:anyscale-ray check fails… Activation hint: When the user's task is highly relevant to the workflow described by “sphinx-fix”, use it for a pre-install experience first, then decide whether to install. Evidence: `doc/.claude/skills/sphinx-fix/SKILL.md`

## Evidence Index

- Indexed 78 evidence entries.

- **Multi-Turn LLM Benchmark** (documentation): A benchmark tool for OpenAI-compatible LLM inference servers that supports multi-turn conversations with configurable prefix cache hit rates, input/output sequence lengths, and cross-session prefix sharing. Evidence: `python/ray/llm/_internal/serve/benchmark/README.md`
- **SGLang on Ray Serve LLM** (documentation): This directory contains example scripts for using SGLang with Ray Serve LLM. Evidence: `python/ray/llm/examples/sglang/readme.md`
- **Ray Serve** (documentation): Ray Serve Key Modules Gotchas Evidence: `python/ray/serve/.claude/CLAUDE.md`
- **Readme** (documentation):  Evidence: `python/ray/serve/.claude/rules/README.md`
- **Readme** (documentation): This directory should only contain unit tests that do not depend on running a Ray instance. Evidence: `python/ray/serve/tests/unit/README.md`
- **Buildkite pipelines** (documentation): This directory contains the Buildkite pipeline definitions for Ray CI, plus the rules that decide which tests run on a given change. Evidence: `.buildkite/README.md`
- **Ray** (documentation): Ray is a unified framework for scaling AI and Python applications. Evidence: `.claude/CLAUDE.md`
- **Ray Documentation** (documentation): Repository for documentation of the Ray project, hosted at docs.ray.io https://docs.ray.io . Evidence: `doc/README.md`
- **Readme** (documentation): Overview of how the ray images are built: Evidence: `docker/README.md`
- **Instructions on ray-java test** (documentation): 1. Install necessary executables - java and javac is needed to run ray-java tests, and users need to make sure they're accessible in $PATH - You could check whether they're installed by which java and which javac - Install java with sudo apt install openjdk-11-jre -y - Install javac with sudo apt install openjdk-11-jdk -y - java-11 is the version we use on CI Evidence: `java/README.md`
- **Readme** (documentation): / .md -- Evidence: `.claude/agents/README.md`
- **raydepsets** (documentation): A dependency lock file management tool for Ray CI pipelines. It maintains consistency relationships among lock files — ensuring that when a dependency is updated, all related lock files are regenerated together in the correct order. Built on top of uv pip compile https://docs.astral.sh/uv/pip/compile/ , it generates reproducible, hash-verified lock files across multiple Python versions, platforms, and CUDA variants. Evidence: `ci/raydepsets/README.md`
- **Ray Documentation** (documentation): Sphinx documentation built by Read the Docs and served at docs.ray.io . Build pipeline: .buildkite/doc.rayci.yml . Evidence: `doc/.claude/CLAUDE.md`
- **Read the Docs redirects for docs.ray.io** (documentation): Read the Docs redirects for docs.ray.io Evidence: `doc/redirects/README.md`
- **Video analysis inference pipeline with Ray Serve** (documentation): Video analysis inference pipeline with Ray Serve Evidence: `doc/source/serve/tutorials/video-analysis/README.md`
- **Scaling Batch Inference with Ray Data** (documentation): Scaling Batch Inference with Ray Data Evidence: `doc/source/templates/01_batch_inference/README.md`
- **Scaling Many Model Training with Ray Tune** (documentation): Scaling Many Model Training with Ray Tune Evidence: `doc/source/templates/02_many_model_training/README.md`
- **Serving a Stable Diffusion Model with Ray Serve** (documentation): Serving a Stable Diffusion Model with Ray Serve Evidence: `doc/source/templates/03_serving_stable_diffusion/README.md`
- **Fine-tuning Llama-2 series models with Deepspeed, Accelerate, and Ray Train TorchTrainer** (documentation): Fine-tuning Llama-2 series models with Deepspeed, Accelerate, and Ray Train TorchTrainer Template Specification Description ---------------------- ----------- Summary This template, demonstrates how to perform fine-tuning full parameter or LoRA for Llama-2 series models 7B, 13B, and 70B using TorchTrainer with the DeepSpeed ZeRO-3 strategy. Time to Run 1 epoch 3.5M tokens training wall-clock time: ~14 min. for 7B, ~26 min. for 13B, and ~190 min. for 70B see the setup details below Minimum Compute Requirements 16xg5.4xlarge for worker nodes for 7B model, 4xg5.12xlarge nodes for 13B model, and 4xg5.48xlarge or 2xp4de.24xlarge nodes for 70B Cluster Environment This template uses a Docker image… Evidence: `doc/source/templates/04_finetuning_llms_with_deepspeed/README.md`
- **DreamBooth fine-tuning of Stable Diffusion with Ray Train** (documentation): DreamBooth fine-tuning of Stable Diffusion with Ray Train Evidence: `doc/source/templates/05_dreambooth_finetuning/README.md`
- **Ray Starter Templates** (documentation): These templates are a set of minimal examples that are quick and easy to run and customize. Evidence: `doc/source/templates/README.md`
- **Train a GPT-2 model with Ray Train JaxTrainer** (documentation): Train a GPT-2 model with Ray Train JaxTrainer Evidence: `doc/source/train/examples/jax/intro_to_jax_trainer/README.md`
- **RL Post-Training using Hugging Face TRL with GRPO** (documentation): RL Post-Training using Hugging Face TRL with GRPO Evidence: `doc/source/train/examples/transformers/transformer_reinforcement_learning/README.md`
- **DEPRECATED -- Please use rayproject/ray-ml https://hub.docker.com/repository/docker/rayproject/ray-ml** (documentation): DEPRECATED -- Please use rayproject/ray-ml https://hub.docker.com/repository/docker/rayproject/ray-ml Evidence: `docker/autoscaler/README.md`
- **About** (documentation): About This is an internal image, the rayproject/ray https://hub.docker.com/repository/docker/rayproject/ray or rayproject/ray-ml https://hub.docker.com/repository/docker/rayproject/ray-ml should be used! Evidence: `docker/base-deps/README.md`
- **About** (documentation): About This image is an extension of the rayproject/ray https://hub.docker.com/repository/docker/rayproject/ray image. It includes all extended requirements of RLlib , Serve and Tune . It is a well-provisioned starting point for trying out the Ray ecosystem. Find the Dockerfile here. https://github.com/ray-project/ray/blob/master/docker/ray-ml/Dockerfile Evidence: `docker/ray-ml/README.md`
- **Tags** (documentation): Official container images for Ray https://github.com/ray-project/ray . These images contains working Python virtual environments and required dependencies to run launche Ray nodes and form Ray clusters. everything needed to get started with running Ray. One can use the images for local development, or launch clusters with Ray VM launcher vm-launcher , KubeRay kuberay , or running them on Anyscale anyscale . Evidence: `docker/ray/README.md`
- **Updating this Lambda Function** (documentation): 3. Head to the AWS Management console & select the DockerTagLatest function. Select Upload from , then .zip file and then select the zip file created in Step 2. Evidence: `docker/retag-lambda/README.md`
- **Common Utilities Shared Across the Libraries** (documentation): Common Utilities Shared Across the Libraries Evidence: `python/ray/_common/README.md`
- **How to pull upstream changes into the vendored cloudpickle** (documentation): How to pull upstream changes into the vendored cloudpickle Evidence: `python/ray/cloudpickle/README.md`
- **Ray Data** (documentation): Ray Data Key Modules Gotchas Evidence: `python/ray/data/.claude/CLAUDE.md`
- **Readme** (documentation):  Evidence: `python/ray/data/.claude/rules/README.md`
- **Video Processing Example** (documentation): This folder contains a self-contained example that demonstrates how Ray Data can prepare video inputs before they are passed to a multimodal model. The implementation lives in video processor.py ; it focuses on being a small, re-usable utility that you can compose inside map batches or call directly from an async workflow. Evidence: `python/ray/data/examples/data/video_processing/README.md`
- **Ray Train** (documentation): Ray Train Key Modules Gotchas Evidence: `python/ray/train/.claude/CLAUDE.md`
- **Readme** (documentation):  Evidence: `python/ray/train/.claude/rules/README.md`
- **Ray Train Circular Import Linter** (documentation): Ray Train functionality is overrided or "patched" by functionality from other directories. For instance, Ray Train is patched by functionality from Ray Train v2 when RAY TRAIN V2 ENABLED=1 , making Ray Train dependent on Ray Train v2. In turn, the patching directory often imports functionality from the "base" Ray Train directory ray/python/ray/train , resulting in a circular dependency. The Ray Train Circular Import Linter takes a patching directory, patch dir , and detects circular imports between it and the base Ray Train directory- displaying violations to users via pre-commit. Evidence: `python/ray/train/lint/README.md`
- **Ray Tune** (documentation): Ray Tune Key Modules Gotchas Evidence: `python/ray/tune/.claude/CLAUDE.md`
- **Readme** (documentation):  Evidence: `python/ray/tune/.claude/rules/README.md`
- **Ray Scalability Envelope** (documentation): NOTE : the Ray scalability benchmarks are in the process of being refreshed. If you have questions about a specific workload or limit, please get in touch by filing a GitHub issue https://github.com/ray-project/ray/issues . Evidence: `release/benchmarks/README.md`
- **Shared Profiling Module** (documentation): Shared profiling and monitoring infrastructure for Ray Data benchmarks. Used by benchmarks under release/nightly tests/dataset/ e.g. image embedding from jsonl . Evidence: `release/nightly_tests/dataset/profiling/README.md`
- **Profile Analysis Scripts** (documentation): CLI tools for analyzing profiling output after a benchmark run. These operate on standard formats speedscope JSON, collapsed stacks and don't depend on the profiling module -- they can be used standalone. Evidence: `release/nightly_tests/dataset/profiling/analysis/README.md`
- **Build Tools** (documentation): Docker image build tooling for Ray Data benchmarks. Evidence: `release/nightly_tests/dataset/profiling/build/README.md`
- **RLlib** (documentation): RLlib Key Modules Gotchas Evidence: `rllib/.claude/CLAUDE.md`
- **Readme** (documentation):  Evidence: `rllib/.claude/rules/README.md`
- **Asynchronous Proximal Policy Optimization APPO** (documentation): Asynchronous Proximal Policy Optimization APPO Evidence: `rllib/algorithms/appo/README.md`
- **Conservative Q-Learning CQL** (documentation): CQL https://arxiv.org/abs/2006.04779 is an offline RL algorithm that mitigates the overestimation of Q-values outside the dataset distribution via convservative critic estimates. CQL does this by adding a simple Q regularizer loss to the standard Belman update loss. This ensures that the critic does not output overly-optimistic Q-values and can be added on top of any off-policy Q-learning algorithm in this case, we use SAC . Evidence: `rllib/algorithms/cql/README.md`
- **Deep Q Networks DQN** (documentation): Code in this package is adapted from https://github.com/openai/baselines/tree/master/baselines/deepq. Evidence: `rllib/algorithms/dqn/README.md`
- **DreamerV3** (documentation): ! DreamerV3 ../../../doc/source/rllib/images/dreamerv3/dreamerv3.png Evidence: `rllib/algorithms/dreamerv3/README.md`
- **Proximal Policy Optimization PPO** (documentation): PPO https://arxiv.org/abs/1707.06347 is a model-free on-policy RL algorithm that works well for both discrete and continuous action space environments. PPO utilizes an actor-critic framework, where there are two networks, an actor policy network and critic network value function . Evidence: `rllib/algorithms/ppo/README.md`
- **Soft Actor Critic SAC** (documentation): SAC https://arxiv.org/abs/1801.01290 is a SOTA model-free off-policy RL algorithm that performs remarkably well on continuous-control domains. SAC employs an actor-critic framework and combats high sample complexity and training stability via learning based on a maximum-entropy framework. Unlike the standard RL objective which aims to maximize sum of reward into the future, SAC seeks to optimize sum of rewards as well as expected entropy over the current policy. In addition to optimizing over an actor and critic with entropy-based objectives, SAC also optimizes for the entropy coeffcient. Evidence: `rllib/algorithms/sac/README.md`
- **TQC Truncated Quantile Critics** (documentation): TQC is an extension of SAC Soft Actor-Critic that uses distributional reinforcement learning with quantile regression to control overestimation bias in the Q-function. Evidence: `rllib/algorithms/tqc/README.md`
- **Footsies Environment** (documentation): This environment implementation is based on the FootsiesGym project https://github.com/chasemcd/FootsiesGym , specifically the version as of July 28, 2025 . Evidence: `rllib/examples/envs/classes/multi_agent/footsies/README.md`
- **C++ Core Runtime** (documentation): C++ Core Runtime Key Modules Gotchas Evidence: `src/ray/.claude/CLAUDE.md`
- **Readme** (documentation):  Evidence: `src/ray/.claude/rules/README.md`
- **Pubsub module** (documentation): This doc has last been updated on Aug 19, 2025. This doc should be updated as the implementation changes. Evidence: `src/ray/pubsub/README.md`
- **Package** (package_manifest): { "name": "ray-dashboard-client", "version": "1.0.0", "private": true, "dependencies": { "@emotion/react": "^11.11.3", "@emotion/styled": "^11.11.0", "@mui/icons-material": "^5.15.5", "@mui/material": "^5.15.5", "@reduxjs/toolkit": "^1.3.1", "@types/jest": "^27.5.2", "@types/lodash": "^4.14.161", "@types/node": "13.9.5", "@types/react-redux": "^7.1.7", "@types/react-window": "^1.8.2", "axios": "^0.21.1", "copy-to-clipboard": "^3.3.2", "dayjs": "^1.9.4", "js-yaml": "^4.1.0", "lodash": "^4.17.20", "lowlight": "^2.9.0", "react": "^18.3.0", "react-dom": "^18.3.0", "react-icons": "^4.7.1", "react-router-dom": "^6.4.3", "react-scripts": "^5.0.1", "react-window": "^1.8.5", "swr": "^2.1.0", "typefa… Evidence: `python/ray/dashboard/client/package.json`
- **Fetch Buildkite Logs** (skill_instruction): Prerequisites - BUILDKITE API TOKEN must be set in the environment typically ~/.bashrc - If not configured, direct user to doc/source/ray-contribute/agent-development.md for setup Evidence: `.claude/skills/fetch-buildkite-logs/SKILL.md`
- **Lint Modified Files** (skill_instruction): Run pre-commit on the files you changed: Evidence: `.claude/skills/lint/SKILL.md`
- **Ray Dependencies** (skill_instruction): Expert skill for managing Python dependencies across the Ray repository: the monorepo requirements compiled .txt lock files, the raydepsets DAG-based lock file manager, modular python/requirements/ source files, and Docker image dependency chains. Evidence: `.claude/skills/ray-dependencies/SKILL.md`
- **Rebuild Ray** (skill_instruction): Canonical build docs: doc/source/ray-contribute/development.md Use the user's configured Python from CLAUDE.local.md, or fall back to which python . Update this skill if any changes are detected in development.rst. Evidence: `.claude/skills/rebuild/SKILL.md`
- The remaining 18 evidence entries are in `AI_CONTEXT_PACK.json` or `EVIDENCE_INDEX.json`.

## Rules the Host AI Must Follow

- **Treat this asset as pre-work context, not a runtime environment.**: The AI Context Pack contains only an evidence-backed understanding of the project, not the project's executable state. Evidence: `python/ray/llm/_internal/serve/benchmark/README.md`, `python/ray/llm/examples/sglang/readme.md`, `python/ray/serve/.claude/CLAUDE.md`
- **When answering the user, distinguish what can be previewed from what can only be verified after install.**: The consumer value of the pre-install experience comes from reducing bad installs and misjudgments, not from pretending to be a real run. Evidence: `python/ray/llm/_internal/serve/benchmark/README.md`, `python/ray/llm/examples/sglang/readme.md`, `python/ray/serve/.claude/CLAUDE.md`

## Questions the User Should Answer First

- Which host AI or local environment do you plan to use it in?
- Do you just want to experience the workflow first, or are you ready to actually install?
- What matters most to you: install cost, output quality, or conflicts with your existing rules?

## Acceptance Checks

- Every capability claim can be traced back to a file path in evidence_refs.
- AI_CONTEXT_PACK.md does not package previews as a real run.
- The user can understand who it fits, what it can do, how to start, and the risk boundaries within 3 minutes.

---

## Doramagic Context Augmentation

The following sections strengthen the repository context for a host AI. Human Manual data is a reading route, and pitfall notes become operating constraints.

## Human Manual Outline

Usage rule: this is only a reading route and salience signal, not factual authority. Concrete claims must still return to repo evidence or Claim Graph.

Host AI hard rules:
- Do not treat page titles, section order, summaries, or importance values as factual project evidence.
- When explaining the Human Manual outline, state that it is only a reading route or salience signal.
- Capability, installation, compatibility, runtime state, and risk claims must cite repo evidence, source paths, or Claim Graph.

- **Ray Overview and Core Distributed Runtime**: importance `high`
  - source_paths: python/ray/__init__.py, python/ray/_private/worker.py, python/ray/_raylet.pyx, doc/source/ray-core/walkthrough.rst, doc/source/ray-core/key-concepts.rst
- **Ray Data: Scalable Data Processing for ML**: importance `high`
  - source_paths: python/ray/data/__init__.py, python/ray/data/dataset.py, python/ray/data/read_api.py, python/ray/data/context.py, python/ray/data/_internal/execution/streaming_executor.py
- **AI Libraries: Train, Tune, RLlib, Serve, and LLM**: importance `high`
  - source_paths: python/ray/train/__init__.py, python/ray/train/v2/__init__.py, python/ray/train/v2/_internal/execution/controller/controller.py, python/ray/tune/tune.py, python/ray/tune/tuner.py
- **Deployment, Infrastructure, Observability, and Cross-Language Extensibility**: importance `high`
  - source_paths: python/ray/autoscaler/_private/autoscaler.py, python/ray/autoscaler/v2/autoscaler.py, python/ray/autoscaler/v2/instance_manager/instance_manager.py, python/ray/autoscaler/_private/kuberay/node_provider.py, python/ray/cluster_utils.py

## Repo Inspection Evidence

- repo_clone_verified: true
- repo_inspection_verified: true
- repo_commit: `8946afb99cbc62c78faf4cd73b8232cf509e7ef5`
- inspected_files: `README.rst`, `pyproject.toml`, `src/ray/.claude/CLAUDE.md`, `src/ray/.claude/rules/README.md`, `src/ray/.claude/rules/cpp-style.md`, `src/ray/.cursor/BUGBOT.md`, `src/ray/design_docs/id_specification.md`, `src/ray/pubsub/README.md`

Host AI hard rules:
- Without repo_clone_verified=true, do not claim that the source code has been read.
- Without repo_inspection_verified=true, do not write README, docs, or package-file conclusions as facts.
- Without quick_start_verified=true, do not claim that the Quick Start path has run successfully.

## Doramagic Pitfall Constraints

These rules come from Doramagic discovery, validation, or compilation findings. The host AI must treat them as operating constraints, not background notes.

### Constraint 1: Capability evidence risk requires verification

- Trigger: README/documentation is current enough for a first validation pass.
- Host AI rule: Reproduce the official install and quickstart path in an isolated environment.
- Why it matters: May increase setup, validation, or first-run risk for the user.
- Evidence: capability.assumptions | https://github.com/ray-project/ray
- Hard boundary: Do not present this pitfall as solved, verified, or ignorable unless later evidence explicitly closes it.

### Constraint 2: Security or permission risk requires verification

- Trigger: no_demo
- Host AI rule: Reproduce the official install and quickstart path in an isolated environment.
- Why it matters: May increase setup, validation, or first-run risk for the user.
- Evidence: downstream_validation.risk_items | https://github.com/ray-project/ray
- Hard boundary: Do not present this pitfall as solved, verified, or ignorable unless later evidence explicitly closes it.

### Constraint 3: Security or permission risk requires verification

- Trigger: no_demo
- Host AI rule: Reproduce the official install and quickstart path in an isolated environment.
- Why it matters: May increase setup, validation, or first-run risk for the user.
- Evidence: risks.scoring_risks | https://github.com/ray-project/ray
- Hard boundary: Do not present this pitfall as solved, verified, or ignorable unless later evidence explicitly closes it.

### Constraint 4: Maintenance risk requires verification

- Trigger: issue_or_pr_quality=unknown。
- Host AI rule: Reproduce the official install and quickstart path in an isolated environment.
- Why it matters: May increase setup, validation, or first-run risk for the user.
- Evidence: evidence.maintainer_signals | https://github.com/ray-project/ray
- Hard boundary: Do not present this pitfall as solved, verified, or ignorable unless later evidence explicitly closes it.

### Constraint 5: Maintenance risk requires verification

- Trigger: release_recency=unknown。
- Host AI rule: Reproduce the official install and quickstart path in an isolated environment.
- Why it matters: May increase setup, validation, or first-run risk for the user.
- Evidence: evidence.maintainer_signals | https://github.com/ray-project/ray
- Hard boundary: Do not present this pitfall as solved, verified, or ignorable unless later evidence explicitly closes it.
