agentleFS
allieraysallierays/agentic-loop/CLAUDE.md

agentic-loop

CLAUDE.md38 starsChanged 9 months agoMITView on GitHub

The file

Show its rules and text

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

13 rules. About 0 are common, 2 are distinctive, and 11 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 11

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Always use shellcheck directive: # shellcheck shell=bash

    line 29
  2. Very specific:

    Use [[ ]] for conditionals, not [ ]

    line 31
  3. Very specific:

    Use local for function variables

    line 32
  4. Very specific:

    Prefer $(command) over backticks

    line 33
  5. Very specific:

    Use constants from utils.sh instead of magic numbers

    line 34
  6. Distinctive:

    Always clean up temp files on error paths

    line 38
  7. Very specific:

    Use get_config for reading config values with defaults

    line 61
  8. Very specific:

    Use create_temp_file for temp files (auto-cleanup)

    line 62
  9. Very specific:

    Use safe_exec for running external commands

    line 63
  10. Very specific:

    Use log_progress for audit trail

    line 64
  11. Very specific:

    Use centralized constants from utils.sh for timeouts, limits, etc.

    line 65
  12. Distinctive:

    Never store credentials in plain text if avoidable — prefer env vars

    line 68
  13. Very specific:

    Use validate_command() for any user-provided commands

    line 69

≈ “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 Code Instructions for agentic-loop

Project Overview

Ralph is an autonomous AI development loop written in Bash. It orchestrates Claude CLI for automated development workflows including code generation, verification, and testing.

Naming Conventions

Bash (ralph/*.sh)

  • Functions: snake_case — e.g., run_verification, parse_endpoint, get_config
  • Local variables: snake_case — e.g., story_id, base_url, failed
  • Constants: SCREAMING_SNAKE — e.g., MAX_LOG_LINES, DEFAULT_TIMEOUT_SECONDS
  • Global state variables: SCREAMING_SNAKE — e.g., RALPH_DIR, BACKUP_QUIET
  • Private/helper functions: _prefixed_snake_case — e.g., _inject_story_context

TypeScript/JavaScript (src/, tests/)

  • Functions/methods: camelCase — e.g., runCheck, parseFile
  • Variables: camelCase — e.g., fileName, isValid
  • Constants: SCREAMING_SNAKE or camelCase — follow existing file patterns
  • Classes/Types: PascalCase — e.g., CheckResult, FileReader

File Names

  • Bash scripts: kebab-case.sh or snake_case.sh (match existing pattern in directory)
  • TypeScript: kebab-case.ts — e.g., check-secrets.ts
  • Test files: *.test.ts

Code Style

Bash

  • Always use shellcheck directive: # shellcheck shell=bash
  • Quote all variables: "$var" not $var
  • Use [[ ]] for conditionals, not [ ]
  • Use local for function variables
  • Prefer $(command) over backticks
  • Use constants from utils.sh instead of magic numbers

Error Handling

  • Bash: Check return values, use || return 1 pattern
  • Always clean up temp files on error paths
  • Log failures to progress file for debugging

Architecture

Ralph Module Structure

ralph/
  utils.sh      # Shared constants and utilities (source first)
  loop.sh       # Main autonomous loop
  prd-check.sh  # PRD validation before loop starts
  code-check.sh # Code verification after Claude writes
  verify/       # Verification submodules for code-check.sh
    lint.sh     # Linting/auto-fix
    tests.sh    # Unit tests
    api.sh      # API/frontend smoke tests
  backup.sh     # Database backup/restore
  init.sh       # Project initialization
  prd.sh        # PRD generation
  lessons.sh    # Learned patterns

Key Patterns

  • Use get_config for reading config values with defaults
  • Use create_temp_file for temp files (auto-cleanup)
  • Use safe_exec for running external commands
  • Use log_progress for audit trail
  • Use centralized constants from utils.sh for timeouts, limits, etc.

Security

  • Never store credentials in plain text if avoidable — prefer env vars
  • Use validate_command() for any user-provided commands
  • Escape strings before embedding in AppleScript/SQL/etc.

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.