CodeGeass
CLAUDE.md2 starsChanged 9 months agoMITView on GitHub
Do not push code that fails linting or tests. IMPORTANT: The bundled dashboard (src/codegeass/dashboard/) is the source of truth for the backend. The development dashboard (dashboard/backend/) mirrors it for local development. Always update src/codegeass/dashboard/ first. CodeGeass is a Claude Code Scheduler Framework - a system for orchestrating automated Claude Code sessions using CRON jobs with Claude Pro/Max subscriptions. Users define reusable AI-powered tasks that run on schedules, execute skills, and track execution history. Dashboard Architecture: - src/codegeass/dashboard/ - Bundled version…
- Reads credentials
- Installs packages
- Commits and pushes
We split this CLAUDE.md into the rules it gives an agent
13 rules. About 0 are common, 11 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈11
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Distinctive: line 9
Always run tests and CI before pushing: Before committing and pushing any changes, always run:
- Distinctive: line 13
Do not push code that fails linting or tests.
- Distinctive: line 15
CLI + Dashboard Sync: When implementing new features for the CLI backend, always consider if they need to be exposed in the dashboard.
- Distinctive: line 23
Always verify before completion: After implementing changes, start both frontend and backend to confirm they work.
- Very specific: line 76
When making backend changes, update src/codegeass/dashboard/routers/ first, then sync to dashboard/backend/routers/ if needed for …
- Distinctive: line 146
File-Based Storage: No database - YAML for config, JSONL for logs
- Very specific: line 179
lucide-react icons: Always use import type for LucideIcon:
- Distinctive: line 222
No API tokens stored - uses GitHub OIDC
- Distinctive: line 251
ALL features must be implemented in the CLI first
- Distinctive: line 253
Never implement business logic in the Dashboard that doesn't exist in CLI
- Distinctive: line 285
Verify the feature works in the UI
- Distinctive: line 288
Do NOT delete test tasks automatically
- Distinctive: line 289
Wait for user confirmation that everything works
≈ “Common” is an estimate: at least 1 in 5 of the 25,680 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.
Files
CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Important Rules
- Never add "Co-Authored-By: Claude" or similar attribution lines in commits or messages
- Always run tests and CI before pushing: Before committing and pushing any changes, always run:
Do not push code that fails linting or tests.ruff check src/codegeass && pytest tests/ -v CLI + Dashboard Sync: When implementing new features for the CLI backend, always consider if they need to be exposed in the dashboard. If so, implement the full stack:
- CLI command in
src/codegeass/cli/ - Backend API endpoint in
src/codegeass/dashboard/routers/(the bundled version) - Frontend UI in
dashboard/frontend/src/ - Rebuild the dashboard:
./scripts/build-dashboard.sh
IMPORTANT: The bundled dashboard (
src/codegeass/dashboard/) is the source of truth for the backend. The development dashboard (dashboard/backend/) mirrors it for local development. Always updatesrc/codegeass/dashboard/first.- CLI command in
- Always verify before completion: After implementing changes, start both frontend and backend to confirm they work. If they fail, troubleshoot until fixed.
Project Overview
CodeGeass is a Claude Code Scheduler Framework - a system for orchestrating automated Claude Code sessions using CRON jobs with Claude Pro/Max subscriptions. Users define reusable AI-powered tasks that run on schedules, execute skills, and track execution history.
Development Commands
Core CLI
# Setup (from source)
git clone https://github.com/DonTizi/CodeGeass.git
cd CodeGeass
python -m venv .venv && source .venv/bin/activate
pip install -e .
# Or install from PyPI
pip install codegeass
# Verify
codegeass --versionTesting & Quality
pytest tests/ -v # Run all tests
pytest tests/test_entities.py -v # Single test file
mypy src/codegeass # Type checking
ruff check src/codegeass # Linting
ruff check src/codegeass --fix # Auto-fix lint issuesDashboard
# Development mode (hot reload)
cd dashboard
./setup.sh # First-time setup
./run.sh # Run frontend (5173) + backend (8001)
# Or use the bundled dashboard (same as PyPI users)
codegeass dashboard # Serves on port 8001
# Build dashboard for release (updates src/codegeass/dashboard/static/)
./scripts/build-dashboard.shDashboard Architecture:
src/codegeass/dashboard/- Bundled version (ships with PyPI package)dashboard/- Development version (for local dev with hot reload)
When making backend changes, update src/codegeass/dashboard/routers/ first, then sync to dashboard/backend/routers/ if needed for development.
CLI Commands
# Tasks
codegeass task list | show | create | run | enable | disable | delete
# Skills
codegeass skill list | show | validate | render
# Projects (multi-project support)
codegeass project list | add | show | remove | set-default | init | enable | disable | update
# Scheduler
codegeass scheduler status | run | run-due | upcoming | install-cron
# Logs
codegeass logs list | show | tail | stats
# Notifications
codegeass notification list | add | show | test | remove | enable | disable | providersArchitecture
src/codegeass/
├── core/ # Domain: Task, Skill, Template, Prompt, Project entities + value objects
├── storage/ # YAML backend, task/log/project repositories, channel/credential managers
│ └── project_repository.py # Multi-project registry management
├── factory/ # SkillRegistry, TaskFactory, TaskBuilder, SkillResolver
│ └── skill_resolver.py # Project + shared skills with priority
├── execution/ # HeadlessStrategy, AutonomousStrategy, SkillStrategy
├── scheduling/ # CronParser (croniter), Scheduler, Job wrappers
├── notifications/ # Chat notifications (Telegram, Discord) with provider pattern
└── cli/ # Click commands: task, skill, project, scheduler, logs, notification
dashboard/
├── backend/ # FastAPI + Uvicorn (port 8001)
│ ├── routers/ # tasks, skills, logs, scheduler, notifications endpoints
│ └── services/ # Business logic layer
└── frontend/ # React 18 + Vite + TypeScript + Tailwind v4 + shadcn/ui + Zustand
~/.codegeass/ # Global user configuration
├── projects.yaml # Project registry (multi-project mode)
├── credentials.yaml # Secrets (API keys, tokens)
└── skills/ # Shared skills (available to all projects)Execution Strategies
- HeadlessStrategy: Safe, read-only with
claude -p(default) - AutonomousStrategy: Allows file modifications with
--dangerously-skip-permissions - SkillStrategy: Invokes skills using
/skill-namesyntax
Data Storage
- Tasks:
config/schedules.yaml(YAML list) - Settings:
config/settings.yaml - Notifications:
config/notifications.yaml(channels, non-secret) - Projects:
~/.codegeass/projects.yaml(project registry, global) - Credentials:
~/.codegeass/credentials.yaml(secrets, global) - Shared Skills:
~/.codegeass/skills/(available to all projects) - Logs:
data/logs/*.jsonl(one JSON per line) - Sessions:
data/sessions/
Key Design Decisions
- Subscription-Only: Deliberately unsets
ANTHROPIC_API_KEYin CRON to use Pro/Max subscription, not API credits - File-Based Storage: No database - YAML for config, JSONL for logs
- Strategy Pattern: Multiple execution modes via interchangeable strategies
- Skill Standard: Uses Agent Skills open standard for reusable prompts
- Multi-Project Support: Global project registry with shared skills and per-project overrides
Skills Format
Skills live in .claude/skills/ and follow this YAML frontmatter format:
---
name: my-skill
description: What it does
context: fork
agent: Explore
allowed-tools: Read, Grep, Glob
---
# Instructions for $ARGUMENTSAvailable Skills
| Skill | Purpose | Usage |
/new-feature | Plan new features/integrations with SOLID principles, research docs, create GitHub issue | /new-feature WhatsApp notification channel |
/implement | Implement code from a GitHub issue specification using TDD-style incremental development | /implement #4 |
/refactor | Refactor monolithic code into clean modules | /refactor src/codegeass/cli/ |
/release | Release new version to PyPI | /release 0.2.0 |
/code-review | Automated code review (security, performance, maintainability) | /code-review . |
/security-scan | Security vulnerability scan | /security-scan |
Frontend Patterns
lucide-react icons: Always use import type for LucideIcon:
// CORRECT
import type { LucideIcon } from 'lucide-react';
import { Home, Settings } from 'lucide-react';
// WRONG - causes Vite error
import { LucideIcon } from 'lucide-react';Configuration
Python 3.10+ required. Key dependencies: pydantic, click, rich, pyyaml, jinja2, croniter.
ruff line-length: 100, mypy strict mode enabled.
Release Process
PyPI Distribution (v0.1.0+)
The package is published on PyPI: https://pypi.org/project/codegeass/
To release a new version:
# Use the release skill (recommended)
/release 0.2.0
# Or manually:
# 1. Update version in pyproject.toml
# 2. Update CHANGELOG.md
# 3. Commit and push
git add -A && git commit -m "Release vX.Y.Z" && git push origin main
# 4. Create and push tag (triggers GitHub Actions)
git tag vX.Y.Z && git push origin vX.Y.ZGitHub Actions Workflows:
ci.yml: Runs on push/PR - lint, test, buildrelease.yml: Runs on tagv*- build, test install, publish to PyPI, create GitHub releasedocs.yml: Runs on push/tag - deploy versioned docs with mike
Trusted Publishing (OIDC):
- No API tokens stored - uses GitHub OIDC
- Configured on PyPI: Owner=
DonTizi, Repo=CodeGeass, Workflow=release.yml, Environment=pypi
Systemd Service (24/7 Scheduling)
# Install service (auto-detects codegeass location)
./service/install.sh
# Check status
systemctl --user status codegeass-scheduler.timer
# View logs
journalctl --user -u codegeass-scheduler -f
# Uninstall
./service/uninstall.shDocumentation
- Live docs: https://dontizi.github.io/codegeass/
- Versioning: mike (version selector in docs)
- Build locally:
pip install -e ".[docs]" && mkdocs serve
Architecture Principle: CLI is the Source of Truth
CRITICAL: The CLI (src/codegeass/) is ALWAYS the source of truth. The Dashboard is just a UI layer.
- ALL features must be implemented in the CLI first
- The Dashboard backend should ONLY call CLI/library code
- Never implement business logic in the Dashboard that doesn't exist in CLI
- Telegram callbacks, plan approvals, notifications - everything must work from CLI
Testing Procedure for Features
When testing a new feature or debugging an existing one, follow this procedure:
- Create a test task
codegeass task create --name test-<feature> --schedule "0 0 * * *" --prompt "<test prompt>" --working-dir $(pwd) - Run the task and observe
codegeass task run test-<feature> - Verify execution logs
codegeass logs list --limit 5 codegeass task show test-<feature> - Check session data
ls -lt data/sessions/ | head -5 cat data/sessions/<latest-session>.json | python -m json.tool - Test through the Dashboard
- Start dashboard:
cd dashboard && ./run.sh - Open http://localhost:5173
- Verify the feature works in the UI
- Start dashboard:
- Keep test tasks until user confirms
- Do NOT delete test tasks automatically
- Wait for user confirmation that everything works
- Only then:
codegeass task delete test-<feature> --yes
Example: Testing Isolation
# Create test task
codegeass task create --name test-isolation --schedule "0 0 * * *" --prompt "just say hello"
# Check worktrees before
git worktree list | wc -l
# Run and observe
codegeass task run test-isolation
# Check worktrees during/after execution
git worktree list
# Verify session metadata shows isolation
cat data/sessions/<session>.json | grep -E "isolated|worktree"In this repository11 other files it gives its agents.
- codegeass-testingSkill
- code-reviewSkill
- dependency-checkSkill
- implementSkill
- new-featureSkill
- refactorSkill
- releaseSkill
- reviewSkill
- security-auditSkill
- security-scanSkill
- test-runnerSkill
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
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.

