Project-Specific Personalization for Coding Agents
Start with a generic project. End with a perfectly tailored solution.
⭐ Star us on GitHub — it motivates us to cook more features!
- [04/2026] 🎉 OpenCook v1.0 is live — the first project-specific personalization layer purpose-built for coding agents. Built-in recipe library
open-cookbook/released. Community recipes are welcome!
Coding agents are powerful but generic. They can navigate your codebase, but they struggle to deeply personalize it — injecting a production-ready feature that respects internal conventions, passes the build system, clears regression tests, and ships as a mergeable patch, all without hand-holding.
OpenCook is the missing layer. It wraps any coding agent with project-local Recipes, Rules, and Memory — giving it the deep project context needed to autonomously deliver precise, production-grade personalizations.
Why database functions as the reference case?
Implementing a function at C/C++ source level inside a production database — respecting its memory model, type system, and build infrastructure — is one of the hardest personalization tasks imaginable.
A live session personalizing SQLite with a new scalar function:
Prerequisites: Python 3.10+, an LLM API key, and the source tree of your target project.
git clone https://github.com/weAIDB/OpenCook.git && cd OpenCook
conda create -n opencook python=3.10 -y && conda activate opencook
pip install -e .This installs OpenCook and its runtime dependencies, then exposes the
opencook command for all CLI workflows.
OpenCook is a pure Python CLI project. In most day-to-day development, you do not need to build a wheel manually.
When you do NOT need to reinstall
- You changed Python source files under
code_agent/ - You edited prompts, markdown docs, or skill files under
open-cookbook/ - You changed YAML config files such as
opencook_config.yaml
In these cases, just run the command again:
opencook --help
opencook interactive --config-file opencook_config.yamlWhen you SHOULD reinstall
- You changed
pyproject.toml - You changed package dependencies
- You changed the CLI entrypoint or script name
- You want to refresh the installed
opencooklauncher after packaging changes
Reinstall with:
pip install -e .If you want to force a clean reinstall:
pip uninstall opencook -y
pip install -e .How to verify the CLI is healthy
opencook --help
opencook run --help
opencook interactive --helpIf opencook is not found, check that your current Python environment is activated,
then run:
python -m pip install -e .As a fallback, the module entrypoint should also work:
python -m code_agent --helpUse the bundled opencook_config.yaml as your starting point, or copy it before editing:
cp opencook_config.yaml my_opencook_config.yamlThen update the database paths, model providers, and agent settings for your environment.
See opencook_config.yaml in the repository root for the full supported structure.
You can also point the CLI at a config file globally:
export OPENCOOK_CONFIG_FILE=my_opencook_config.yaml# Interactive TUI (recommended)
opencook interactive --config-file my_opencook_config.yaml
# Headless single task
opencook run "Implement the BOOL_AND aggregate function for SQLite" --config-file my_opencook_config.yaml
# Start an interactive PostgreSQL session
opencook interactive --database postgresql --config-file my_opencook_config.yaml|
🧩 Project-Local Personalization |
🔄 Built-in Delivery Loop |
|
🧠 4-Layer Memory Stack |
📖 Dynamic Recipe System |
|
🔎 Context-Aware Injection |
📋 Patch-Oriented Traceability |
OpenCook runs a deterministic Plan → Code → Test pipeline through three specialized agents:
| Agent | Role | Key Behavior |
|---|---|---|
| CodeAgent | Orchestrator | Writes code, coordinates sub-agents, self-corrects on failure |
| PlanAgent | Read-only Scoper | Decomposes the task; locates files, entry points, and conventions |
| TestAgent | Validator | Compiles, runs test suite, reports failures back to CodeAgent |
The reference benchmark — the domain hardest to automate correctly, and thus the strongest proof of the personalization thesis.
| Database | Language | Entry Point |
|---|---|---|
| SQLite | C | FuncDef aBuiltinFunc[] in func.c |
| PostgreSQL | C | builtins.h + .c implementation |
| DuckDB | C++ | ScalarFunctionSet / FunctionFactory |
| ClickHouse | C++ | FunctionFactory::instance().registerFunction<>() |
The same Plan → Code → Test loop applies to any codebase domain. Database engines are just the hardest kitchen to cook in.
Works alongside any coding agent
| Agent | Integration Path |
|---|---|
| Claude Code | Recipes via CLAUDE.md or recipe packages on the skills path |
| Codex | AGENTS.md context + MCP |
| OpenCode / OpenClaw | Plugin package path |
| TRAE | Project-local context |
| Any agent | Serialize recipes into the system prompt |
Supports any LLM provider
| Provider | Example Models |
|---|---|
| Anthropic | Claude Sonnet 4.6, Claude Opus 4.6 |
| OpenAI | GPT-4o, GPT-5 |
| Gemini 2.5 Pro | |
| DeepSeek | DeepSeek-V3, DeepSeek-Coder |
| Zhipu / Qwen / DouBao | GLM-5, Qwen3-Coder |
| Azure / OpenRouter | Any deployed endpoint |
| Ollama | Any local model — fully offline |
Each agent role (Plan / Code / Test) can use a different model and provider independently.
Recipe packages are currently discovered from .opencook/skills/ and use SKILL.md as the entry file:
.opencook/skills/
└── my-feature-recipe/
├── SKILL.md ← trigger · context · steps
└── references/ ← optional supporting docs
---
name: my-feature-recipe
description: Teaches agents how to implement X in codebase Y
triggers: [implement X, add X feature]
---
## Context
[Conventions, pitfalls, and patterns the agent must know]
## Steps
1. Locate the entry point by searching for ...
2. Follow the registration pattern at ...
3. Verify with ...| Step | What to implement |
|---|---|
| 1 | Template — code scaffolding for the target language/framework |
| 2 | Test harness — domain-specific build and execution runner |
| 3 | Extraction utils — symbol/schema extraction helpers |
| 4 | Recipes — domain knowledge in SKILL.md recipe packages |
Implement BaseClient in code_agent/utils/llm_clients/ and register it in LLMClient. No other changes needed.
How OpenCook stands apart on the surfaces that matter most to its personalization thesis.
| Surface | OpenCook | Claude Code | Codex | OpenCode | OpenClaw |
|---|---|---|---|---|---|
| Project-Local Personalization Path | ✦ | ✦ | ~ | ✦ | ✦ |
| Built-In Delivery Loop (Plan→Code→Test) | ✦ | ~ | ~ | ~ | ~ |
| Explicit Multi-Layer Memory | ✦ | ~ | ~ | ~ | ~ |
| Patch-Oriented Traceability | ✦ | ~ | ~ | ~ | ~ |
| In-Tree Domain Scaffolding | ✦ | ✗ | ✗ | ✗ | ✗ |
✦ Clearly present ~ Present but narrower ✗ Not observed in inspected source
Is OpenCook only for databases?
No. Database function implementation is the reference benchmark — it demands deep C/C++ internals knowledge, making it the hardest test of our personalization thesis. The Plan → Code → Test loop and recipe system are fully domain-agnostic. We are actively expanding to other codebase domains.
How is this different from just prompting Claude Code or Codex?
A generic prompt gives breadth, not depth. OpenCook's recipe system encodes the exact project conventions, registration patterns, pitfalls, and verification steps for your domain. Combined with a fixed delivery loop and multi-layer memory, the agent is far less likely to hallucinate conventions or leave the patch broken.
Which LLM gives the best results?
For complex C/C++ internals: Claude Sonnet/Opus and GPT-4o class models. For cost-effective alternatives: DeepSeek-Coder and Qwen3-Coder. Models below ~32B may struggle with deep project conventions.
How does the self-correction loop work?
TestAgent captures compiler output and test failures as structured tool results and feeds them back to CodeAgent. CodeAgent patches iteratively until all checks pass or the step budget is exhausted.
- Open Benchmark — public leaderboard of personalization tasks across databases and domains
- Broader Domain Support — kernel modules, language runtimes, compiler backends
- Parallel Cooking — concurrent PlanAgent/TestAgent pairs for batch personalization
- Web UI — browser-based session dashboard
- Fine-Tuned Models — domain-specific models trained on successful trajectories
- MCP Server — expose the recipe + memory system as an MCP endpoint for any agent
We welcome contributions of all kinds — new recipes, domain backends, LLM clients, bug reports, and ideas.
- GitHub: github.com/weAIDB/OpenCook
- Issues / PRs: open an issue or pull request
- Discussions: GitHub Discussions
@misc{opencook2026,
author = {Wei Zhou and others},
title = {OpenCook: Project-Specific Personalization for Coding Agents},
year = {2026},
howpublished = {\url{https://github.com/weAIDB/OpenCook}}
}MIT License — see LICENSE for details.
