代码框架 是 AI Skill Hub 本期精选Agent工作流之一。综合评分 8.0 分,整体质量较高。我们强烈推荐将其纳入你的 AI 工具库,帮助提升工作效率。
代码框架 是一套完整的 AI Agent 自动化工作流方案。通过可视化的节点编排,将复杂的多步骤任务拆解为清晰的自动化流程,实现全程无人值守的智能处理。支持与数百种外部服务和 API 无缝集成,适合构建数据处理管线、业务自动化和 AI 辅助决策系统。
代码框架 是一套完整的 AI Agent 自动化工作流方案。通过可视化的节点编排,将复杂的多步骤任务拆解为清晰的自动化流程,实现全程无人值守的智能处理。支持与数百种外部服务和 API 无缝集成,适合构建数据处理管线、业务自动化和 AI 辅助决策系统。
# 方式一:pip 安装(推荐)
pip install codeframe
# 方式二:虚拟环境安装(推荐生产环境)
python -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install codeframe
# 方式三:从源码安装(获取最新功能)
git clone https://github.com/frankbria/codeframe
cd codeframe
pip install -e .
# 验证安装
python -c "import codeframe; print('安装成功')"
# 命令行使用
codeframe --help
# 基本用法
codeframe input_file -o output_file
# Python 代码中调用
import codeframe
# 示例
result = codeframe.process("input")
print(result)
# codeframe 配置文件示例(config.yml) app: name: "codeframe" debug: false log_level: "INFO" # 运行时指定配置文件 codeframe --config config.yml # 或通过环境变量配置 export CODEFRAME_API_KEY="your-key" export CODEFRAME_OUTPUT_DIR="./output"
<p align="center"> <strong>Your coding agent can’t quietly undo what you already decided.</strong><br> Every bug you fix once, fixed forever: recorded as a requirement, locked to the code it affects,<br> and checked before every commit. Regression memory for coding agents. </p>
<p align="center"> <img src="https://img.shields.io/badge/status-beta-orange" alt="Status: beta"> <a href="https://pypi.org/project/codeframe-ai/"><img src="https://img.shields.io/pypi/v/codeframe-ai" alt="PyPI"></a> <img src="https://img.shields.io/badge/license-Apache--2.0-blue" alt="License: Apache-2.0"> <img src="https://img.shields.io/badge/python-3.11%2B-blue" alt="Python 3.11+"> <a href="https://github.com/frankbria/codeframe/actions/workflows/test.yml"><img src="https://github.com/frankbria/codeframe/actions/workflows/test.yml/badge.svg" alt="CI"></a> <img src="https://img.shields.io/badge/coverage-80%25-brightgreen" alt="Coverage"> <a href="https://x.com/FrankBria18044"><img src="https://img.shields.io/twitter/follow/FrankBria18044?style=social" alt="Follow on X"></a> </p>
<p align="center"> <a href="#quick-start">Quick start</a> · <a href="#see-it-in-action">Demos</a> · <a href="docs/CLI_GUIDE.md">CLI guide</a> · <a href="proof9/README.md">proof9 plugin</a> · <a href="#documentation">Docs</a> · <a href="CHANGELOG.md">Changelog</a> </p>
<p align="center"> <code>/plugin install proof9 --marketplace frankbria/codeframe</code><br> <sub>At a Claude Code prompt. Needs the <code>cf</code> CLI: <code>uv tool install codeframe-ai</code>.</sub> </p>
---
Coding agents have become very good at writing code. What they have no memory of is what already went wrong. A bug you found, fixed and moved on from is, to the agent, just more code it is free to change next week.
CodeFRAME gives it that memory. A defect is recorded as a requirement, scoped to the code it affects, with a named test that proves it stays fixed. Every later change to that code is checked against it — before the commit in a Claude Code session, and again before the merge. Nothing is dropped silently: a requirement is released only by a recorded waiver.
The same CLI also handles the work before the code — requirements discovery, task decomposition, and delegating each task to Claude Code, Codex, OpenCode, Kilocode or its built-in agent.
| Stage | What CodeFRAME does | Commands |
|---|---|---|
| **Think** | Socratic requirements discovery, ambiguity stress-testing, task decomposition with dependencies | cf prd generate · cf prd stress-test · cf tasks generate |
| **Build** | Runs each task on the engine you choose, with verification gates, self-correction, stall detection and human-in-the-loop blockers | cf work start --engine … · cf work batch run |
| **Prove** | **PROOF9™**: every glitch becomes a permanent requirement, verified across nine gates with checksummed evidence | cf proof capture · cf proof run |
| **Ship** | Pull requests carry the proof report; merge is blocked while an in-scope requirement is open | cf pr create · cf pr merge |
The result is a closed loop: a bug found in production becomes a requirement, and that requirement is checked on every build that follows.
Other tools remember what your reviewers prefer. CodeFRAME remembers what actually broke, and proves it stays fixed: evidence is checksummed and bound to the run and gate that produced it, a run that verified nothing is reported as vacuous rather than green, and every waiver records who approved it, why, and (when set) when it expires. Where each of those lives in the code is listed in VISION.md.
[!NOTE] CodeFRAME is in public beta (0.9.8). The Golden Path CLI (cf init/prd/tasks/work/proof/pr) is stable enough to build on. Anything marked in progress in the roadmap is still moving, and on-disk.codeframe/formats may change between betas. Report rough edges.
---
export ANTHROPIC_API_KEY=sk-ant-...
**3. Think: requirements and tasks**
bash cd /path/to/your/project cf init . --detect # create the workspace, detect the tech stack cf prd generate # Socratic discovery (or: cf prd add PRD.md) cf tasks generate # dependency-ordered tasks, created in BACKLOG cf tasks list
**4. Build: run one task**
bash cf tasks set status <task-id> READY cf work start <task-id> --execute # built-in agent cf work start <task-id> --execute --engine claude-code # or codex, opencode, kilocode
If the agent needs a decision it cannot make, it stops and files a blocker.
`cf blocker list` shows it and `cf blocker answer <id> "..."` unblocks the task.
**5. Prove: capture a requirement, then verify it**
bash cf proof capture --title "add() is wrong for negatives" \ --description "add(-1, -1) returned 0" --where src/calc.py --severity high --source qa
- Agent-agnostic execution: Claude Code, Codex, OpenCode, Kilocode, or the built-in ReAct agent, selected per run with --engine. - Verification gates (ruff, pytest, build) with a self-correction loop and loop prevention. - Stall detection with configurable recovery: retry, raise a blocker, or fail. - Batch execution: serial, parallel, or auto (LLM-inferred dependencies), with retries and git worktree isolation for parallel agents. - Human-in-the-loop blockers, checkpoints, replay of past runs, and a TUI dashboard. - Multi-provider LLM: Anthropic by default, or any OpenAI-compatible endpoint (OpenAI, Ollama, vLLM, LM Studio).
Prerequisites: Python 3.11+, git, and an API key for your LLM provider. By default that is ANTHROPIC_API_KEY from console.anthropic.com. OPENAI_API_KEY works with --llm-provider openai, and local providers such as Ollama need no key.
1. Install
uv tool install codeframe-ai # installs the `cf` command
cf --help
pipx install codeframe-ai works too, or run it without installing via uvx --from codeframe-ai cf --help. The package is codeframe-ai; the command is cf.
2. Set your API key
```bash export ANTHROPIC_API_KEY="sk-ant-..."
```bash
export CODEFRAME_LLM_PROVIDER=openai # anthropic | openai | ollama | vllm | compatible export CODEFRAME_LLM_MODEL=gpt-4o export OPENAI_API_KEY=sk-... # not needed for local providers export OPENAI_BASE_URL=http://localhost:11434/v1 # Ollama, vLLM, LM Studio, ... ```
Per-workspace settings live in .codeframe/config.yaml (an llm: block, and discovery_max_questions). For the LLM provider and model, precedence is CLI flag, then environment, then workspace config, then default.
CodeFRAME 是一个旨在实现“思考、构建、验证、交付”全流程闭环的 AI 驱动开发框架。它不仅是一个工具集,更是一套完整的开发方法论,通过将需求规划与代码执行深度结合,帮助开发者从模糊的想法快速转化为高质量的工程实现。
在使用 CodeFRAME 进行需求规划(THINK 阶段)时,系统默认使用 Anthropic 作为 AI 提供商。开发者需要配置相应的 ANTHROPIC_API_KEY。此外,项目基于 Python 3.11+ 构建,建议使用 uv 进行环境管理以确保依赖的一致性。
可以通过克隆源码并使用 uv 进行安装。首先克隆仓库并进入目录,随后通过 curl 安装 uv,创建虚拟环境并执行 uv sync 同步依赖。最后使用 `uv run cf --help` 进行冒烟测试,确保命令树能够正常打印。
快速上手流程分为三步:首先通过 git 克隆并使用 uv 完成环境安装;其次配置必要的 API Key(如 ANTHROPIC_API_KEY);最后通过初始化配置文件开始您的开发工作流。建议在执行任何 cf 命令前确保虚拟环境已激活。
CodeFRAME 支持多供应商 LLM 配置。默认使用 Anthropic,但您可以通过设置 CODEFRAME_LLM_PROVIDER 环境变量切换至 openai(兼容 OpenAI 格式)。此外,您可以通过 OPENAI_BASE_URL 支持 Ollama、vLLM 或 LM Studio 等本地服务。项目也支持在每个工作区的 .codeframe/config.yaml 中进行精细化配置。
所有的 CLI 命令均需在激活的虚拟环境中执行。如果未激活虚拟环境,请在每个 cf 命令前添加 `uv run` 前缀(例如 `uv run cf init .`),以确保命令能够正确调用项目内的依赖环境。
CodeFRAME 采用模块化工作流。THINK 模块负责上游流水线,通过 `cf prd generate` 进行苏格拉底式需求采集,并利用 `cf prd stress-test` 进行递归分解,在执行前识别并消除需求中的歧义。BUILD 模块则通过 Agent Adapter 架构,将任务委派给 Claude Code、Codex 等不同的 Coding Agent 进行执行,并具备 Worktree 隔离与多智能体结果调和能力。
高质量的开源AI工作流项目,值得关注
该工具使用 AGPL-3.0 协议,商用场景请仔细阅读协议条款,必要时咨询法律意见。
AI Skill Hub 为第三方内容聚合平台,本页面信息基于公开数据整理,不对工具功能和质量作任何法律背书。
建议在沙箱或测试环境中充分验证后,再部署至生产环境,并做好必要的安全评估。
⚠️ AGPL 3.0 — 最严格的 Copyleft,网络服务端使用也需开源,SaaS 使用受限。
经综合评估,代码框架 在Agent工作流赛道中表现稳健,质量优秀。如果你已有明确的使用需求,可以直接上手体验;如果还在评估阶段,建议对比同类工具后再做决策。
| 原始名称 | codeframe |
| 原始描述 | 开源AI工作流:Think → Build → Prove → Ship. The project delivery system that turns ideas into 。⭐14 · Python |
| Topics | AI工作流自动化 |
| GitHub | https://github.com/frankbria/codeframe |
| License | AGPL-3.0 |
| 语言 | Python |
收录时间:2026-06-12 · 更新时间:2026-06-13 · License:AGPL-3.0 · AI Skill Hub 不对第三方内容的准确性作法律背书。
选择 Agent 类型,复制安装指令后粘贴到对应客户端