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

Filter by extension

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 docs/guides/coordinator.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ The `/run-workflow` slash command provides a guided end-to-end workflow for subm
/run-workflow --repo owner/name "Fix the auth bug"
```

It walks through five phases automatically: seed (gather parameters), submit (`submit_task`), monitor (`get_status` polling every 60 seconds), HITL (present decisions inline via `AskUserQuestion`), and complete (summarize results and show PR link). See `sandbox/.claude/commands/run-workflow.md` for the full workflow definition.
It walks through five phases automatically: seed (gather parameters), submit (`submit_task`), monitor (`get_status` polling every 60 seconds), HITL (present decisions inline via `AskUserQuestion`), and complete (summarize results and show PR link). See `skills/run-workflow/SKILL.md` for the full workflow definition.

### Available Tools

Expand Down
14 changes: 0 additions & 14 deletions sandbox/.claude/commands/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,20 +60,6 @@ Switch to Reviewer agent mode for code quality or contract adherence review.

**File**: `reviewer-mode.md`

### /run-workflow
Guide a full pipeline lifecycle: seed prompt creation, submit, monitor, HITL handling, and completion. Uses MCP tools (`submit_task`, `get_status`, `provide_input`) to interact with the coordinator.

**Usage**: `/run-workflow`

**What it does**:
- Gathers task parameters (description, repo, issue)
- Submits the task via the `submit_task` MCP tool
- Sets up recurring polling to monitor pipeline progress
- Handles HITL decisions inline (choice and feedback types)
- Summarizes results on completion or failure

**File**: `run-workflow.md`

## How Commands Work

These commands are **slash commands** for Claude Code. They are markdown files that provide instructions to Claude on how to respond when you use the command syntax.
Expand Down
4 changes: 4 additions & 0 deletions sandbox/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,10 @@ RUN mkdir -p /usr/local/share/claude-commands
COPY sandbox/claude-commands/*.md /usr/local/share/claude-commands/
RUN chmod 644 /usr/local/share/claude-commands/*.md

# Copy Claude skills
COPY skills/ /usr/local/share/claude-skills/
RUN find /usr/local/share/claude-skills -type f -exec chmod 644 {} \;

# Copy Claude agent rules directory
RUN mkdir -p /opt/claude-rules
COPY sandbox/claude-rules/*.md /opt/claude-rules/
Expand Down
17 changes: 17 additions & 0 deletions sandbox/egg_lib/docker.py
Original file line number Diff line number Diff line change
Expand Up @@ -460,6 +460,16 @@ def create_dockerfile() -> None:
else:
warn("claude-commands directory not found")

# Copy skills directory from repo root to build context
# (Dockerfile references skills/)
skills_src = script_dir.parent / "skills"
skills_dest = Config.CONFIG_DIR / "skills"
if skills_src.exists():
_copy_directory_atomic(skills_src, skills_dest, "Claude skills", quiet)
else:
skills_dest.mkdir(parents=True, exist_ok=True)
warn("skills directory not found")

# Copy claude-rules directory to sandbox subdirectory of build context
# (Dockerfile references sandbox/claude-rules/)
# Use atomic copy with retry to handle race conditions
Expand Down Expand Up @@ -697,6 +707,7 @@ def compute_build_hash() -> str:
- entrypoint.py
- docker-setup.py
- claude-commands/
- skills/ (from repo root)
- claude-rules/
- .claude/hooks/
- bin/, egg_lib/, llm/, tools/, scripts/
Expand Down Expand Up @@ -750,6 +761,12 @@ def compute_build_hash() -> str:
hasher.update(b".claude/hooks")
hash_directory(hooks_path, hasher)

# skills/ directory from repo root
skills_path = repo_root / "skills"
if skills_path.exists():
hasher.update(b"skills")
hash_directory(skills_path, hasher)

# shared/ directory from repo root
shared_path = repo_root / "shared"
if shared_path.exists():
Expand Down
16 changes: 16 additions & 0 deletions sandbox/entrypoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -897,6 +897,22 @@ def setup_claude(config: Config, logger: Logger) -> None:
for cmd in (config.claude_dir / "commands").glob("*.md"):
print(f" @{cmd.stem}")

# Copy skills (directory-based, each skill is a subdirectory with SKILL.md)
skills_src = Path("/usr/local/share/claude-skills")
if skills_src.exists():
skills_dest = config.claude_dir / "skills"
skills_dest.mkdir(parents=True, exist_ok=True)
installed = []
for skill_dir in skills_src.iterdir():
if skill_dir.is_dir() and (skill_dir / "SKILL.md").exists():
target = skills_dest / skill_dir.name
if target.exists():
shutil.rmtree(target)
shutil.copytree(skill_dir, target)
installed.append(skill_dir.name)
if installed:
logger.success(f"Skills installed: {', '.join(installed)}")

# Create settings.json
settings = {
"defaultPermissionMode": "bypassPermissions",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
---
name: run-workflow
description: Guide a full egg pipeline lifecycle — seed prompt, submit, monitor, HITL handling, and completion — using MCP tools (submit_task, get_status, provide_input).
disable-model-invocation: true
argument-hint: "[description] [--repo owner/name] [--issue N]"
---

# Run Workflow

You are guiding the user through a complete egg pipeline lifecycle using MCP tools. Walk through 5 phases: Seed, Submit, Monitor, HITL, and Complete.
Expand Down
Loading