agentleFS
jhd3197jhd3197/CachiBot/CLAUDE.md

CachiBot

CLAUDE.md19 starsChanged 9 months agoMITView on GitHub

CachiBot is a security-focused AI agent that uses the Prompture library for structured LLM interactions. It features a Python backend (FastAPI) with WebSocket streaming and a React+TypeScript frontend. The frontend dev server proxies /api and /ws to http://127.0.0.1:5870. CachiBot depends on two libraries that we own and maintain: Prompture and Tukuy. These libraries were built primarily to support CachiBot at a monolithic-repo level. When a bug or issue is encountered in Prompture or Tukuy while working on CachiBot: Treat all…

  • Installs packages

The file

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

4 rules. About 0 are common, 0 are distinctive, and 4 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 4

    Very specific

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

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

    When a bug or issue is encountered in Prompture or Tukuy while working on CachiBot:

    line 67
  2. Very specific:

    Fix it at the source: Do NOT work around bugs in CachiBot — fix the actual library code.

    line 69
  3. Very specific:

    After fixing the source library, verify the fix works in CachiBot.

    line 71
  4. Very specific:

    Treat all three repos (CachiBot, Prompture, Tukuy) as a single cohesive codebase.

    line 73

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

Project Overview

CachiBot is a security-focused AI agent that uses the Prompture library for structured LLM interactions. It features a Python backend (FastAPI) with WebSocket streaming and a React+TypeScript frontend.

Common Commands

Backend Development

pip install -e ".[dev]"          # Install with dev dependencies
cachibot server                   # Start API server (port 5870)
cachibot "your prompt"            # Run single prompt via CLI
cachibot -i                       # Interactive mode
pytest                            # Run all tests
pytest -v                         # Verbose test output
ruff check .                      # Lint Python code
ruff format .                     # Format Python code
mypy cachibot                 # Type check

Frontend Development

cd frontend
npm install                       # Install dependencies
npm run dev                       # Start Vite dev server (port 5173)
npm run build                     # Production build
npm run lint                      # ESLint

The frontend dev server proxies /api and /ws to http://127.0.0.1:5870.

Architecture

Backend (cachibot/)

  • agent.py: Core CachibotAgent dataclass wrapping Prompture's Agent with callbacks, tool registration, and Python sandbox
  • cli.py: Typer-based CLI with cachibot and cachi entry points
  • api/server.py: FastAPI app with lifespan management
  • api/websocket.py: WebSocket streaming for real-time agent responses
  • api/routes/: REST endpoints (chat, config, health, models)
  • models/: Pydantic schemas for chat, config, jobs, websocket messages
  • storage/: SQLite async database layer with repository pattern

Frontend (frontend/src/)

  • stores/: Zustand state management with localStorage persistence
    • bots.ts: Bot/Chat/Jobs/Tasks stores
    • ui.ts: UI state (sidebar, themes)
    • connections.ts: API connection state
  • api/: REST client and WebSocket management
  • components/: React components organized by feature (chat/, common/, dialogs/, layout/, views/)

Agent Tool System

Built-in tools registered in agent.py:

  • python_execute: Sandboxed Python execution with AST risk analysis
  • file_read, file_write, file_list, file_edit: Workspace file operations
  • task_complete: Signal task completion

Configuration

Supports TOML config files (~/.cachibot.toml or ./cachibot.toml) with environment variable overrides. See cachibot.example.toml for all options.

Owned Dependencies: Prompture & Tukuy

CachiBot depends on two libraries that we own and maintain: Prompture and Tukuy. These libraries were built primarily to support CachiBot at a monolithic-repo level.

When a bug or issue is encountered in Prompture or Tukuy while working on CachiBot:

  1. Fix it at the source. Do NOT work around bugs in CachiBot — fix the actual library code.
  2. We own both repos — just go fix it directly, no contribution barriers.
  3. After fixing the source library, verify the fix works in CachiBot.

Treat all three repos (CachiBot, Prompture, Tukuy) as a single cohesive codebase.

Code Style

Python

  • Google-style docstrings
  • Type hints required (mypy strict)
  • Ruff formatter with line length 100

TypeScript

  • Strict mode enabled
  • Path alias: @/* maps to src/*
  • ESLint with React Hooks and React Refresh plugins

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.