agentleFS
galz10galz10/pickle-rick-extension/cli/CLAUDE.md

pickle-rick-extension / cli

CLAUDE.md454 starsChanged 9 months agoApache-2.0View on GitHub

Pickle Rick CLI is an autonomous coding agent orchestrator with a TUI (Terminal UI) interface built on @opentui/core. It executes tasks through the Gemini CLI in isolated git worktrees. The agent progresses through phases: - prd: Draft Product Requirements Document - breakdown: Create atomic tickets from PRD - research/plan/implement/refactor: Execute individual tickets - done: All tasks completed Sessions execute in isolated worktrees: - Created at .pickle/worktrees/session-<name>/ - Project state synced via rsync (excluding .git, .pickle) - Session context mirrored inside…

The file

We split this CLAUDE.md into the rules it gives an agent

3 rules. About 0 are common, 3 are distinctive, and 0 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.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Default action launches TUI dashboard

    line 34
  2. Distinctive:

    breakdown: Create atomic tickets from PRD

    line 66
  3. Distinctive:

    done: All tasks completed

    line 68

≈ “Common” is an estimate: at least 1 in 5 of the 26,980 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

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

Build & Development Commands

# Install dependencies
bun install

# Run in development mode (TUI dashboard)
bun run dev

# Build production executable
bun run build

# Type check without emitting
bun run check

# Run tests
bun test

# Run single test file
bun test src/path/to/file.test.ts

Architecture Overview

Pickle Rick CLI is an autonomous coding agent orchestrator with a TUI (Terminal UI) interface built on @opentui/core. It executes tasks through the Gemini CLI in isolated git worktrees.

Core Flow

  1. Entry Point (src/index.ts): CLI commands using Commander.js
    • Default action launches TUI dashboard
    • pickle command runs agent with optional prompt or resume
    • sessions lists past sessions
  2. Session & Settings Management (src/config/):
    • Sessions stored in .pickle/sessions/<date-hash>/
    • State persisted as state.json with Zod validation
    • Global sessions also at ~/.gemini/extensions/pickle-rick/sessions/
    • User settings at ~/.pickle/settings.json (provider/model configuration)
  3. Execution Pipeline (src/execution/):
    • SequentialExecutor: Main orchestration loop
    • PickleTaskSource: Task state machine managing phases (prd → breakdown → tickets)
    • Creates isolated git worktrees for each session to avoid conflicts
  4. AI Providers (src/providers/):
    • GeminiProvider: Wraps Gemini CLI with streaming JSON output
    • OpencodeProvider: Alternative provider using opencode CLI
    • Provider selected via ~/.pickle/settings.json or defaults to Gemini
    • Temporarily disables pickle-rick extension during execution to prevent recursion
    • Supports session resumption via resumeSessionId
  5. TUI Components (src/ui/):
    • dashboard.ts: Main dashboard composition
    • DashboardController: Manages session spawning and UI state
    • LandingView: Initial prompt entry view
    • Built with @opentui/core renderables (BoxRenderable, TextRenderable, etc.)

Task State Machine

The agent progresses through phases:

  • prd: Draft Product Requirements Document
  • breakdown: Create atomic tickets from PRD
  • research/plan/implement/refactor: Execute individual tickets
  • done: All tasks completed

Git Worktree Isolation

Sessions execute in isolated worktrees:

  • Created at .pickle/worktrees/session-<name>/
  • Project state synced via rsync (excluding .git, .pickle)
  • Session context mirrored inside worktree for sandbox bypass
  • Offers merge back to base branch on completion

Key Patterns

  • Streaming output parsed as JSON lines from Gemini CLI
  • Progress callbacks for TUI spinner updates
  • State reloaded from disk after each iteration to capture external changes
  • Completion detected via <promise>I AM DONE</promise> or [STOP_TURN] markers

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.