代码框架 是 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"
[!WARNING] Prerequisite: CodeFRAME requires an API key matching your LLM provider — by default anANTHROPIC_API_KEYfrom console.anthropic.com, orOPENAI_API_KEYwhen using--llm-provider openai(local providers like Ollama need no key). Get your key before running anycfcommand.
---
The IDE of the future is not a better text editor with AI autocomplete. It is a project delivery system where writing code is a subprocess.
---
```bash
cf prd generate # AI-guided Socratic PRD creation cf prd generate --template lean # Use a specific template cf prd add <file.md> # Import existing PRD cf prd show # Display current PRD
export ANTHROPIC_API_KEY=sk-ant-...
THINK What are you building? How should it be broken down?
cf prd generate Socratic requirements gathering
cf prd stress-test Recursive decomposition, surface ambiguities
cf tasks generate Atomic tasks with dependency graphs
BUILD Delegate to the best coding agent for the job
cf work start --engine Claude Code, Codex, OpenCode, Kilocode, or built-in
CodeFRAME owns: verification gates, self-correction, stall detection
PROVE Is the output any good?
cf proof run 9-gate evidence-based quality system
cf proof capture Glitch becomes a permanent requirement
cf proof list All active proof obligations
cf proof status Summary across all gates
cf proof show <id> Requirement detail and evidence
cf proof waive <id> Waive a requirement with justification
SHIP Deploy with confidence
cf pr create PR with proof report attached
cf pr merge Only merges if proof passes
THE CLOSED LOOP
Glitch in production
-> cf proof capture
-> New requirement
-> Enforced on every future build
= Quality compounding interest
---
```bash
cf work replay)cf dashboard)Step 1 — Install
uv tool install codeframe-ai # installs the `cf` command globally
cf --help # smoke test — should print the command tree
No uv? pipx install codeframe-ai works too, or run without installing via uvx codeframe-ai --help. (The PyPI package is codeframe-ai; the command is cf.)
<details> <summary>Install from source (for contributors)</summary>
git clone https://github.com/frankbria/codeframe.git && cd codeframe
curl -LsSf https://astral.sh/uv/install.sh | sh
uv venv && source .venv/bin/activate && uv sync
uv run cf --help
When working from source, prefix the commands below with uv run. </details>
Step 2 — Set your API key
export ANTHROPIC_API_KEY="sk-ant-..." # get yours at https://console.anthropic.com/
Step 3 — Initialize your project
cf init /path/to/your/project --detect
Step 4 — Think: generate a PRD and tasks
cf prd generate # AI-guided Socratic requirements discovery
cf tasks generate # Decompose PRD into atomic tasks with dependencies
cf tasks list # Review what was generated
Step 5 — Promote one task
cf tasks generate creates tasks in BACKLOG so you can review them before an agent touches your code. Pick one and move it to READY — cf tasks list prints an 8-character ID for each task, and that prefix is all you need:
cf tasks list # copy the ID of the task you want
cf tasks set status <task-id> READY # note: id before status
Start with one. A generated backlog is typically 20+ tasks, and your first run should show you the loop, not build the whole project in one sitting.
Step 6 — Build: hand the task to an agent
cf work start <task-id> --execute
Step 7 — Prove: capture a requirement, then verify it
PROOF9 verifies obligations, and a new workspace has none — so verifying it first would report that nothing was checked and exit 2. That is deliberate: a run that checked nothing is not a pass. Give it something to check.
cf proof capture \
--title "add() returns the wrong sum for negative numbers" \
--description "Calculation is wrong: add(-1, -1) returned 0 instead of -2" \
--where src/calc.py --severity high --source qa
That creates a requirement, picks the gates that would have caught it, and writes a draft test stub per gate under tests/proof/<REQ-ID>/. The stubs are named draft_*.py so pytest does not collect them yet, and each one is a placeholder assert False. Turn them into real tests — drop the draft_ prefix from each filename, and replace the placeholder with an assertion that actually proves the bug is fixed:
```bash ls tests/proof/REQ-0001/ # draft_test_..._unit.py, draft_test_..._contract.py
```bash
export CODEFRAME_LLM_PROVIDER=openai # anthropic | openai (OpenAI-compatible) export CODEFRAME_LLM_MODEL=gpt-4o # model name for the chosen provider export OPENAI_API_KEY=sk-... # required when provider=openai export OPENAI_BASE_URL=http://localhost:11434/v1 # for Ollama, vLLM, LM Studio, etc.
export DATABASE_PATH=./codeframe.db # Default: ./.codeframe/state.db export RATE_LIMIT_ENABLED=true # API rate limiting export RATE_LIMIT_DEFAULT=100/minute # Default limit ```
For server configuration, rate limiting options, and API key setup, see docs/PHASE_2_DEVELOPER_GUIDE.md.
All commands below assume the virtual environment is active (source .venv/bin/activate). If it is not active, prefix everycfcommand withuv run— e.g.,uv run cf init ..
cf prd stress-test -- Recursive decomposition that surfaces ambiguities before executionCodeFRAME 是一个旨在实现“思考、构建、验证、交付”全流程闭环的 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 类型,复制安装指令后粘贴到对应客户端