agentleFS
MaxwellCalkinMaxwellCalkin/Autobot/templates/CLAUDE.md

Autobot / templates

CLAUDE.md0 starsChanged 10 months agoMITView on GitHub

Autobot enables Claude Code to autonomously complete long-running development tasks by: 1. Decomposing large tasks into context-window-sized subtasks 2. Persisting state and learnings across iterations 3. Enforcing quality gates through hooks (tests must pass before continuing) 4. Recovering gracefully from failures (pause after 3 consecutive failures) Auto-detected by project type: - Node.js: npm test - Python: pytest -x --tb=short - Rust: cargo test - Go: go test ./... The autonomous loop stops when: 1. All subtasks in plan.json are marked…

The file

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

11 rules. About 0 are common, 8 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈8

    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. Distinctive:

    Tests are first-class citizens: - Write tests before implementation (TDD)

    line 15
  2. Distinctive:

    Quality gates are mandatory: - All tests must pass before marking complete

    line 17
  3. Distinctive:

    Fail fast, recover gracefully: - Stop on blocking issues, not minor failures

    line 19
  4. Distinctive:

    Run tests after every code change (automatic via hooks)

    line 57
  5. Distinctive:

    All tests must pass before marking subtask complete

    line 58
  6. Distinctive:

    No linting errors before commits

    line 59
  7. Distinctive:

    Follow existing code patterns in the codebase

    line 61
  8. Very specific:

    Never edit .autobot/ files directly - use the provided commands

    line 108
  9. Very specific:

    Always check .autobot/progress.md for learned patterns before starting

    line 109
  10. Distinctive:

    If tests fail 3 times consecutively, the loop pauses for human review

    line 110
  11. Very specific:

    All subtasks in plan.json are marked completed

    line 117

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

What is Autobot?

Autobot enables Claude Code to autonomously complete long-running development tasks by:

  1. Decomposing large tasks into context-window-sized subtasks
  2. Persisting state and learnings across iterations
  3. Enforcing quality gates through hooks (tests must pass before continuing)
  4. Recovering gracefully from failures (pause after 3 consecutive failures)

Philosophy

  • Tests are first-class citizens - Write tests before implementation (TDD)
  • Small, verifiable steps - Each subtask must fit in one context window
  • Quality gates are mandatory - All tests must pass before marking complete
  • Learn and adapt - Observations persist in .autobot/progress.md
  • Fail fast, recover gracefully - Stop on blocking issues, not minor failures

Architecture

.autobot/           # Runtime state (preserved across iterations)
├── task.json       # Current task definition
├── plan.json       # Decomposed subtasks with status
├── progress.md     # Append-only learning log
├── observations.jsonl  # Structured queryable logs
└── metrics.json    # Quantitative tracking

.claude/            # Claude Code customization
├── settings.json   # Hooks, permissions
├── hooks/          # Node.js scripts for automation
├── agents/         # Specialized subagent definitions
├── commands/       # User-invoked slash commands
└── skills/         # Auto-invoked capabilities

Commands

CommandDescription
/init-task <description>Start new autonomous task
/statusView progress dashboard
/pausePause autonomous loop
/resumeResume paused loop
/abortEmergency stop with state preservation

Hooks (Automatic)

  • Stop - Checks for incomplete subtasks, re-injects prompt to continue
  • PostToolUse (Edit/Write) - Runs tests after code changes
  • SessionStart - Loads .autobot/ state into context

Quality Standards

  1. Run tests after every code change (automatic via hooks)
  2. All tests must pass before marking subtask complete
  3. No linting errors before commits
  4. Public APIs require documentation
  5. Follow existing code patterns in the codebase

Test Commands

Auto-detected by project type:

  • Node.js: npm test
  • Python: pytest -x --tb=short
  • Rust: cargo test
  • Go: go test ./...

State Files

task.json

{
  "id": "task-{timestamp}",
  "title": "Short title",
  "description": "Full description",
  "status": "in_progress"
}

plan.json

{
  "subtasks": [
    {
      "id": "st-001",
      "title": "Subtask title",
      "status": "pending|in_progress|completed",
      "acceptance_criteria": ["..."]
    }
  ]
}

metrics.json

{
  "current_iteration": 5,
  "max_iterations": 50,
  "consecutive_test_failures": 0
}

Key Gotchas

  • Never edit .autobot/ files directly - use the provided commands
  • Always check .autobot/progress.md for learned patterns before starting
  • If tests fail 3 times consecutively, the loop pauses for human review
  • Max 50 iterations by default (configurable in metrics.json)
  • Each subtask should be completable in ~30 minutes of focused work

Exit Conditions

The autonomous loop stops when:

  1. All subtasks in plan.json are marked completed
  2. progress.md contains EXIT_SIGNAL: COMPLETE
  3. Max iterations reached (safety limit)
  4. 3+ consecutive test failures (requests human review)
  5. User runs /pause or /abort

Subagents

AgentModelPurpose
plannerOpusTask decomposition
builderSonnetImplementation with TDD
reviewerSonnetCode review
fixerSonnetDebug test failures

Quick Start

# Start a new task
/init-task "Add user authentication with OAuth support"

# Check progress at any time
/status

# Pause if needed
/pause

# Resume when ready
/resume

@.autobot/progress.md for learned patterns @.autobot/plan.json for current subtask status

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.