agentleFS
rubenmarcusrubenmarcus/ralph-starter/CLAUDE.md

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…

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
  1. Very specific:

    Run pnpm build after changes

    line 99
  2. Very specific:

    Run pnpm test:run to verify tests pass

    line 100
  3. Distinctive:

    Update README.md for user-facing features

    line 101
  4. Distinctive:

    Follow existing code patterns

    line 102
  5. Very specific:

    Use ESM imports with .js extensions

    line 103
  6. Distinctive:

    Use Biome for linting/formatting (not ESLint/Prettier)

    line 104

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
CLAUDE.md

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 emitting

Repository Structure

  • src/ - TypeScript source code (see directory overview below)
  • docs/ - Docusaurus documentation site
  • dist/ - Compiled output
  • specs/ - 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

FilePurpose
src/cli.tsCLI entry point
src/loop/executor.tsMain loop logic (1400+ lines)
src/loop/agents.tsAgent detection and invocation
src/loop/context-builder.tsIteration prompt building and progressive trimming
src/loop/cost-tracker.tsToken/cost tracking per iteration
src/loop/validation.tsLint/build validation between iterations
src/loop/session.tsPause/resume support
src/loop/step-detector.tsReal-time progress detection from agent output
src/commands/run.tsRun command implementation
src/commands/auto.tsBatch/auto mode command
src/integrations/base.tsIntegration interface
src/llm/providers.tsLLM provider definitions
src/mcp/server.tsMCP server entry point
src/utils/package-manager.tsPackage manager detection (npm/yarn/pnpm/bun)
src/sources/Spec source fetching (file, URL, PDF, GitHub, integrations)

src/ Directory Overview

DirectoryPurpose
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

  1. Run pnpm build after changes
  2. Run pnpm test:run to verify tests pass
  3. Update README.md for user-facing features
  4. Follow existing code patterns
  5. Use ESM imports with .js extensions
  6. 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

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.