From 727356e88b21e911b89024681395f1a72bd56d83 Mon Sep 17 00:00:00 2001 From: GAP Promoter Date: Sat, 30 May 2026 21:56:25 +0000 Subject: [PATCH] Add he-yufeng/CoreCoder to the registry --- agents/he-yufeng__corecoder/README.md | 57 +++++++++++++++++++++++ agents/he-yufeng__corecoder/metadata.json | 14 ++++++ 2 files changed, 71 insertions(+) create mode 100644 agents/he-yufeng__corecoder/README.md create mode 100644 agents/he-yufeng__corecoder/metadata.json diff --git a/agents/he-yufeng__corecoder/README.md b/agents/he-yufeng__corecoder/README.md new file mode 100644 index 0000000..d10ad01 --- /dev/null +++ b/agents/he-yufeng__corecoder/README.md @@ -0,0 +1,57 @@ +# CoreCoder + +**CoreCoder** is a minimal, readable AI coding agent built in ~1,400 lines of Python. Think of it as the [nanoGPT](https://github.com/karpathy/nanoGPT) of coding agents — every key architectural pattern from Claude Code, distilled into a codebase you can read in one afternoon. + +## What It Does + +CoreCoder runs as an interactive REPL or one-shot CLI in your terminal, helping with: + +- **Code editing** — search-and-replace with unique-match guarantee and diff output +- **File management** — read, write, glob, and grep across your project +- **Safe shell execution** — runs commands with dangerous-command blocking +- **Context compression** — 3-layer compression (HISTORY_SNIP → Microcompact → CONTEXT_COLLAPSE) to keep sessions running long +- **Sub-agent spawning** — isolated sub-agent with its own context window for complex tasks +- **Session persistence** — save and resume sessions across restarts + +## Key Architecture Patterns + +| Pattern | CoreCoder | +|---|---| +| Search-and-replace editing | `tools/edit.py` — 70 lines | +| Parallel tool execution | `agent.py` — ThreadPool | +| 3-layer context compression | `context.py` — 145 lines | +| Sub-agent with isolated context | `tools/agent.py` — 50 lines | +| Dangerous command blocking | `tools/bash.py` — 95 lines | +| Session persistence | `session.py` — 65 lines | +| Dynamic system prompt | `prompt.py` — 35 lines | + +## Model Support + +Works with any OpenAI-compatible API endpoint — Claude (via OpenRouter), GPT-4o, DeepSeek, Qwen, Kimi, local Ollama models. Install the optional LiteLLM extra for 100+ providers including Bedrock and Vertex. + +## Install + +```bash +pip install corecoder +export OPENAI_API_KEY=your-key +corecoder -m gpt-4o +``` + +## Example Usage + +``` +$ corecoder -m kimi-k2.5 + +You > read main.py and fix the broken import + + > read_file(file_path='main.py') + > edit_file(file_path='main.py', ...) + +Fixed: halper → helper. +``` + +## Links + +- **Repository:** https://github.com/he-yufeng/CoreCoder +- **PyPI:** https://pypi.org/project/corecoder/ +- **Architecture deep-dive (7 articles):** https://github.com/he-yufeng/CoreCoder/tree/main/article diff --git a/agents/he-yufeng__corecoder/metadata.json b/agents/he-yufeng__corecoder/metadata.json new file mode 100644 index 0000000..3918641 --- /dev/null +++ b/agents/he-yufeng__corecoder/metadata.json @@ -0,0 +1,14 @@ +{ + "name": "corecoder", + "author": "he-yufeng", + "description": "Minimal AI coding agent (~1,400 lines Python) distilling Claude Code's architecture. Read in one afternoon, fork to build your own. Supports any OpenAI-compatible API.", + "repository": "https://github.com/he-yufeng/CoreCoder", + "version": "1.0.0", + "category": "developer-tools", + "tags": ["coding-agent", "claude-code", "minimal", "educational", "python", "openai-compatible", "repl", "context-compression"], + "license": "MIT", + "model": "openai:gpt-4o", + "adapters": ["openai", "system-prompt"], + "icon": false, + "banner": false +}