Skip to content

whut09/Code-Agent-plusplus

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

90 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Code Agent++

中文 | English

面向 AI 编程 Agent 的外挂式增强与可靠性工程层。

Code Agent++ 不做另一个代码生成 Agent,也不替代 Codex、OpenCode、Claude Code、Cursor、MiMoCode 写代码。它是一个 bounded harness-led control loop:把仓库编译成 task-aware context,生成编辑边界,记录执行证据,运行 policy / contracts / tests / impact / verify,并输出 finalize / repair / repack / block / require-human-review 决策报告。

Code Agent 负责读代码、改代码、跑命令
Code Agent++ 负责上下文、边界、证据、门禁、影响分析和决策报告

与相关项目的关系

项目 主要职责 与 Code Agent++ 的关系
Codex / Claude Code / Cursor 读代码、改代码、跑命令 作为 executor,Code Agent++ 提供外层验证和约束
OpenCode / MiMoCode 开源 coding agent runtime / assistant 重点 executor 接入方向,Code Agent++ 补充 harness gate
CodeGraph 代码图谱 / symbol / call graph / MCP 可作为可选深度代码理解 backend
OpenHarness / Oh My OpenAgent 通用 agent harness / workflow 同属 harness 方向,Code Agent++ 更聚焦 coding agent 可靠性闭环

解决什么问题

  • Agent 不知道该读哪些文件,靠猜入口和模块。
  • Agent 改动范围失控,误改 generated、lockfile、CI、migration 或无关模块。
  • Agent 生成不存在的 API、命令、配置、环境变量或项目约定。
  • Agent 声称测试通过,但没有可信的 exit code / timestamp / working tree hash 证据。
  • Agent 改完影响范围不可见,review 风险难判断。
  • Agent 重复引入历史 bug,repair loop 不知道何时停止。

30 秒怎么用

npx code-agent-plusplus build .
npx code-agent-plusplus run "fix login timeout bug" .
npx code-agent-plusplus verify --diff .

Harness-led executor flow:

npx code-agent-plusplus orchestrate "fix login timeout bug" . \
  --executor opencode \
  --executor-command "opencode run --format json {prompt}" \
  --max-loops 3 \
  --checkpoint git-worktree \
  --fail-on required

输出会写入:

AGENTS.md
.agent-context/
  repo-summary.md
  key-files.md
  contracts/
  runs/<task-id>/
  traces/
  hallucination/
  regression/
  graphs/
  index/

通过 AI Agent 使用

你可以直接对 Codex / Claude Code / Cursor / OpenCode / MiMoCode 说:

使用 https://github.com/whut09/Code-Agent-plusplus 对 xxx 项目生成 Code Agent++ 上下文与可靠性增强包。
请先检查目标仓库结构,再按需安装或克隆该工具。
强制启用 LLM 摘要:在目标仓库创建或更新 code-agent-plusplus.local.yml,不要提交该文件。
优先使用当前 AI 工具环境可用的模型 API 配置,或我提供的 key/baseUrl/model;如果缺少配置,请先问我。
然后运行 code-agent-plusplus build <目标仓库> --target codex --llm,再运行 code-agent-plusplus validate <目标仓库>。
最后说明生成了哪些文件、哪些 Guard 能力可用,以及 LLM 摘要模式是否成功。

真实 key 只写入 code-agent-plusplus.local.yml,不要提交。

当前能力成熟度

能力 成熟度
build / AGENTS.md / .agent-context Stable
task plan / pack / run Stable
TypeScript Compiler API analyzer Stable
Python AST / optional Tree-sitter analyzer Foundation
token savings estimated + actual output tokens Stable
Context / Boundary / Evidence / Impact / Loop Guards Foundation
Hallucination Guard MVP
Regression Guard / memory candidates MVP / Foundation
bounded harness-led orchestrator / orchestrate Foundation
mock executor / generic --executor-command Stable / Foundation
OpenCode event normalizer Foundation
MiMoCode / Codex / Claude native normalizers Planned
MCP stdio server + core tools Foundation
MCP Agent Native Runtime tools Experimental
RAG export / retriever provider interface Foundation
direct LightRAG server sync Planned

完整成熟度说明见 文档首页

文档导航

开发

npm install
npm run build
npm run check
npm test

致谢

Code Agent++ 的设计受到 OpenAI CodexOpenCodeMiMo-CodeCodeGraphOh My OpenAgentOpenHarnessOpenClaw 等项目启发。

About

Code Agent++ 面向 AI 编程 Agent 的外挂式增强与可靠性工程层。 Code Agent++ 不做另一个代码生成 Agent,也不替代 Codex、OpenCode、Claude Code、Cursor、MiMoCode 写代码。它的定位是 Code Agent Enhancement Layer:围绕 Code Agent 在真实工程中的常见问题,提供上下文、边界、验证、回归防护、幻觉抑制、影响分析和修复闭环等外挂式增强能力。

Topics

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors