# Ralph

Queue processing with fresh context per phase.

- Repository: https://github.com/agenticnotetaking/arscontexta (3518 stars)
- Category: Engineering
- License: MIT
- Last updated: 2026-02-24
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add agenticnotetaking/arscontexta --skill ralph -g -a claude-code -y`
Codex: `npx skills add agenticnotetaking/arscontexta --skill ralph -g -a codex -y`
Cursor: `npx skills add agenticnotetaking/arscontexta --skill ralph -g -a cursor -y`
Gemini CLI: `npx skills add agenticnotetaking/arscontexta --skill ralph -g -a gemini-cli -y`
Claude Code plugin marketplace: `/plugin marketplace add agenticnotetaking/arscontexta`

## Description

Queue processing with fresh context per phase. Processes N tasks from the queue, spawning isolated subagents to prevent context contamination. Supports serial, parallel, batch filter, and dry run modes. Triggers on "/ralph", "/ralph N", "process queue", "run pipeline tasks".

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

## EXECUTE NOW

**Target: $ARGUMENTS**

Parse arguments:
- N (required unless --dry-run): number of tasks to process
- --parallel: concurrent claim workers (max 5) + cross-connect validation
- --batch [id]: process only tasks from specific batch
- --type [type]: process only tasks at a specific phase (extract, create, reflect, reweave, verify, enrich)
- --dry-run: show what would execute without running
- --handoff: output structured RALPH HANDOFF block at end (for pipeline chaining)

### Step 0: Read Vocabulary

Read `ops/derivation-manifest.md` (or fall back to `ops/derivation.md`) for domain vocabulary mapping. All output must use domain-native terms. If neither file exists, use universal terms.

**START NOW.** Process queue tasks.

---

## MANDATORY CONSTRAINT: SUBAGENT SPAWNING IS NOT OPTIONAL

**You MUST use the Task tool to spawn a subagent for EVERY task. No exceptions.**

This is not a suggestion. This is not an optimization you can skip for "simple" tasks. The entire architecture depends on fresh context isolation per phase. Executing tasks inline in the lead session:
- Contaminates context (later tasks run on degraded attention)
- Skips the handoff protocol (learnings are not captured)
- Violates the ralph pattern (one phase per context window)

**If you catch yourself about to execute a task directly instead of spawning a subagent, STOP.** Call the Task tool. Every time. For every task. Including create tasks. Including "simple" tasks.

The lead session's ONLY job is: read queue, spawn subagent, evaluate return, update queue, repeat.

---

## Phase Configuration

Each phase maps to specific Task tool parameters. Use these EXACTLY when spawning subagents.

The rest: https://github.com/agenticnotetaking/arscontexta/blob/HEAD/skill-sources/ralph/SKILL.md
