Skip to content

ZeroSumQuant/CAKE

Repository files navigation

CAKE - Claude Autonomy Kit Engine

CI Status Development Status Python 3.11+ Code style: black Imports: isort License: MIT PRs Welcome

CAKE is a deterministic intervention system that monitors LLM operations, prevents known failure patterns, and enforces safety guardrails without human escalation.

Icing is an optional refactoring tool that helps keep Python repositories CI-green by fixing syntax errors, organizing imports, and standardizing project structure. See icing/README.md for details.

Note: CAKE is under active development. We're using an innovative adversarial LLM pair programming approach for rapid prototyping. See PROCESS.md for our development methodology.

🎯 Overview

CAKE acts as an autonomous "operator" that watches, intervenes, and recovers from errors in real-time. It's designed to achieve zero-escalation autonomy - resolving all failures without paging humans.

📁 Repository Layout

├── cake/         # Main CAKE application code
├── icing/        # Repository cleanup helper (pip install -e icing/)
├── tests/        # Test suite for CAKE
├── docs/         # Documentation and specifications
├── scripts/      # Utility scripts and tools
├── .github/      # CI/CD workflows
└── README.md     # This file

🏗️ Architecture

CAKE uses a single-process, component-based architecture:

  • CakeController: Central state machine orchestrator
  • Operator: Intervention message generator (matches Dustin's voice style)
  • RecallDB: Error pattern memory store
  • PTYShim: Command interceptor for safety
  • Validator: Error classifier
  • Watchdog: Stream monitor for error detection

See cake-architecture-v2.md for detailed architecture documentation.

🧪 Testing with Bad Claude

CAKE includes a comprehensive testing framework called "Bad Claude Simulator" that intentionally makes mistakes to validate our safety systems. Bad Claude helps test:

  • Dangerous command blocking
  • Repeat error detection
  • CI/CD safety violations
  • Anti-pattern recognition
  • And much more!

See tests/bad_claude_simulator/ for the mischievous testing framework.

🚀 Quick Start

Prerequisites

  • Python 3.9+
  • Git

Setup

  1. Clone the repository:
git clone https://github.com/ZeroSumQuant/CAKE.git
cd CAKE
  1. Create virtual environment:
python3 -m venv .venv
source .venv/bin/activate  # On Windows: .venv\Scripts\activate
  1. Install dependencies:
pip install -r requirements-dev.txt
  1. Run quality checks:
./scripts/cake-lint.sh scripts/

🛠️ Development

Essential Scripts

  • cake-lint.sh: Comprehensive linting (black, isort, flake8, mypy, bandit, safety)
  • cake-check-voice.py: Validates Operator messages match intervention style
  • cake-handoff.sh: Auto-generates handoff documentation
  • cake-stub-component.py: Generates component code from specifications

Code Quality

All code must pass strict quality checks:

./scripts/cake-lint.sh .              # Run all checks
./scripts/cake-lint.sh . --check-only  # CI mode (no auto-fix)

Testing

pytest tests/ -v --cov=cake

📚 Documentation

🤝 Contributing

  1. Create a feature branch
  2. Run ./scripts/cake-lint.sh before committing
  3. Ensure all tests pass
  4. Submit a pull request

📄 License

[License information to be added]

🙏 Acknowledgments

Built with Claude Code assistance.

About

Claude Autonomy Kit Engine - Deterministic intervention system for LLM operations

Resources

License

Contributing

Stars

Watchers

Forks

Packages

No packages published