ralph-starter
CLAUDE.md108 starsChanged 8 months agoMITView on GitHub
Context for Claude Code when working on ralph-starter. This repo uses pnpm for development. The packageManager field and a preinstall script enforce this. Note: ralph-starter itself supports any package manager in user projects via detectPackageManager() in src/utils/package-manager.ts. Do not hardcode pnpm in agent prompts or user-facing code. A CLI tool that runs autonomous AI coding loops. It fetches specs from GitHub, Linear, Notion, Figma, and OpenSpec, then orchestrates coding agents to build software automatically. Each loop iteration spawns a fresh…
In this repository11 other files it gives its agents.
- AGENTS.mdAGENTS.md
- humanizerSkill
- ralph-figmaSkill
- ralph-githubSkill
- ralph-initSkill
- ralph-linearSkill
- ralph-notionSkill
- ralph-planSkill
- ralph-runSkill
- ralph-taskSkill
- ralph-validateSkill
The file
We split this CLAUDE.md into the rules it gives an agent
6 rules. About 0 are common, 3 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 99
Run pnpm build after changes
- Very specific: line 100
Run pnpm test:run to verify tests pass
- Distinctive: line 101
Update README.md for user-facing features
- Distinctive: line 102
Follow existing code patterns
- Very specific: line 103
Use ESM imports with .js extensions
- Distinctive: line 104
Use Biome for linting/formatting (not ESLint/Prettier)
≈ “Common” is an estimate: at least 1 in 5 of the 12,729 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
CLAUDE.md
Context for Claude Code when working on ralph-starter.
Package Manager
This repo uses pnpm for development. The packageManager field and a preinstall script enforce this.
Note: ralph-starter itself supports any package manager in user projects via detectPackageManager() in src/utils/package-manager.ts. Do not hardcode pnpm in agent prompts or user-facing code.
What is ralph-starter?
A CLI tool that runs autonomous AI coding loops. It fetches specs from GitHub, Linear, Notion, Figma, and OpenSpec, then orchestrates coding agents to build software automatically. Each loop iteration spawns a fresh agent process with a progressively trimmed context — continuity is maintained through the filesystem (IMPLEMENTATION_PLAN.md, .ralph/iteration-log.md), not conversation history.
Quick Commands
pnpm build # Build TypeScript
pnpm lint # Lint code (Biome)
pnpm lint:fix # Lint and auto-fix
pnpm test # Run tests (Vitest, watch mode)
pnpm test:run # Run tests once
pnpm dev # Development mode (tsc --watch)
pnpm format # Format code (Biome)
pnpm check # Check code (Biome lint + format)
pnpm typecheck # Type-check without emittingRepository Structure
src/- TypeScript source code (see directory overview below)docs/- Docusaurus documentation sitedist/- Compiled outputspecs/- Spec files for development
Key Concepts
Integrations - Fetch specs from external sources:
- GitHub: Issues, PRs, files
- Linear: Tickets by team/project
- Notion: Pages and databases
- Figma: Design specs and tokens
Agents - AI coding assistants ralph-starter orchestrates:
- Claude Code, Cursor, OpenCode, OpenAI Codex, GitHub Copilot, Gemini CLI, Amp, Openclaw
Loop Executor - Runs agents in autonomous loops until task completion. Each iteration: build context → spawn agent → collect output → run validation (lint/build) → commit → repeat or exit.
LLM Providers - For internal features (Anthropic, OpenAI, OpenRouter)
MCP Server - Model Context Protocol server exposing ralph-starter capabilities as tools (init, plan, run)
Important Files
| File | Purpose |
src/cli.ts | CLI entry point |
src/loop/executor.ts | Main loop logic (1400+ lines) |
src/loop/agents.ts | Agent detection and invocation |
src/loop/context-builder.ts | Iteration prompt building and progressive trimming |
src/loop/cost-tracker.ts | Token/cost tracking per iteration |
src/loop/validation.ts | Lint/build validation between iterations |
src/loop/session.ts | Pause/resume support |
src/loop/step-detector.ts | Real-time progress detection from agent output |
src/commands/run.ts | Run command implementation |
src/commands/auto.ts | Batch/auto mode command |
src/integrations/base.ts | Integration interface |
src/llm/providers.ts | LLM provider definitions |
src/mcp/server.ts | MCP server entry point |
src/utils/package-manager.ts | Package manager detection (npm/yarn/pnpm/bun) |
src/sources/ | Spec source fetching (file, URL, PDF, GitHub, integrations) |
src/ Directory Overview
| Directory | Purpose |
auth/ | OAuth providers (Anthropic, OpenAI, Linear, Notion) |
automation/ | Git operations (commit, push, PR creation) |
commands/ | CLI commands (run, init, plan, auto, fix, pause, resume, etc.) |
config/ | Configuration management |
integrations/ | GitHub, Linear, Notion, Figma source fetching |
llm/ | LLM provider APIs and batch operations |
loop/ | Core autonomous loop (executor, agents, validation, context) |
mcp/ | Model Context Protocol server |
presets/ | Configuration presets |
setup/ | Setup wizards and agent detection |
skills/ | Auto-install skills for agents |
sources/ | Spec source fetching (file, URL, PDF, integrations) |
types/ | TypeScript type definitions |
ui/ | UI components (box, progress-renderer, shimmer) |
utils/ | Utilities (rate limiting, version, package manager) |
wizard/ | Interactive setup wizard and idea generation |
When Making Changes
- Run
pnpm buildafter changes - Run
pnpm test:runto verify tests pass - Update README.md for user-facing features
- Follow existing code patterns
- Use ESM imports with
.jsextensions - Use Biome for linting/formatting (not ESLint/Prettier)
Current Priorities
- Amp SDK migration (agent abstraction layer)
- Linear integration sync (status updates, GitHub Actions)
- Agent memory improvements (
.ralph/memory.md) - Multi-agent / swarm mode
- Lovable/v0/Bolt.new integrations
Links
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

