codeflash-agent/CLAUDE.md

38 lines
1.6 KiB
Markdown
Raw Normal View History

2026-04-03 22:36:50 +00:00
# codeflash-agent
Monorepo for the Codeflash optimization platform: Python packages, Claude Code plugin, and services.
## Layout
- **`packages/`** — UV workspace with Python packages (core, python, mcp, lsp)
- **`plugin/`** — Claude Code plugin (language-agnostic base: review agent, hooks, shared references)
- **`languages/python/plugin/`** — Python-specific plugin overlay (domain agents, skills, references)
- **`vendor/codex/`** — Vendored OpenAI Codex runtime
- **`services/github-app/`** — GitHub App integration service
- **`evals/`** — Eval templates and real-repo scenarios
## Build
```bash
make build-plugin # Assemble plugin → dist/ (base + python overlay + vendor)
make clean # Remove dist/
```
## Packages (UV workspace)
```bash
uv sync # Install all packages + dev deps
prek run --all-files # Lint: ruff check, ruff format, interrogate, mypy
uv run pytest packages/ -v # Test all packages
```
Package-specific conventions (attrs patterns, type annotations, testing) are in `packages/.claude/rules/` and load automatically when editing package source.
## Plugin Development
The plugin is split for composition:
- `plugin/` has language-agnostic agents, hooks, and shared references
- `languages/python/plugin/` has Python domain agents, skills, and references
- `make build-plugin` merges them into `dist/` with path rewriting
Agent files use `${CLAUDE_PLUGIN_ROOT}` for references. When editing agents, be aware that paths differ between source (`languages/python/plugin/references/`) and assembled (`references/`).