GitRead 中文社区
首页趋势排行榜原创文章严选周刊
更多资源
新手训练营
精选专题热门话题GitHub 文档资源精选实战指南

opencode-plusplus

OpenCode++:一个用于OpenCode的编码代理可靠性工具,增加了上下文、编辑边界、命令证据、验证门、影响分析和修复循环。OpenCode++:面向 OpenCode 的 AI 编程可靠性增强框架,为其增加上下文管理、编辑边界、命令证据、验证门禁、影响分析与修复闭环能力。

  • 语言TypeScript
  • 默认分支main
  • 大小9.6 MB
  • 更新9月9日
在 GitHub 打开
avatarwhut09

技术解读

以下内容由 GitRead 中文社区 编辑团队基于项目 README 与官方资料整理, 结合中文开发者的常见使用场景补充技术选型建议。具体以项目官方文档为准。

OpenCode++:AI 编程的可靠性增强框架

项目背景与痛点

在现代软件开发中,AI 助手已经成为了提升开发效率的重要工具。然而,AI 生成的代码依赖于对上下文的理解以及命令的正确执行。在实际应用中,很多情况下 AI 代码助手存在两难境地:一方面,代码生成速度极快,但另一方面,其准确性和可靠性则时常不尽如人意。OpenCode++ 项目正是针对这一问题而生,通过为 OpenCode 增强框架,加入上下文管理、编辑边界、命令证据、验证门禁、影响分析和修复闭环等一系列机制,提升 AI 编程产出的可靠性和稳定性。

核心技术揭秘

技术架构

OpenCode++ 的技术架构可以视为一个多层次、多管道的框架,它在核心代码生成之余,增加了多个反馈和校验环节,以确保生成代码的质量。其核心数据流如下:

graph TD A[开发者输入] --> B("代码解析") B --> C{"代码验证"} C -->|"通过"| D[代码生成] C -->|"不通过"| E[错误修正] D --> F{"影响分析"} F -->|"高风险"| G[人工审查] F -->|"低风险"| H[修复闭环] G -->|反馈| C H -->|反馈| C

数据流与执行流

通过上图可以看到,OpenCode++ 架构在接收到用户的代码请求后,先进行代码解析,形成初步的代码数据流。解析后的代码数据流会进入代码验证环节,这一步用于防止错误和潜在的漏洞进入代码生成阶段。一旦发现不通过的验证结果,系统会返回至错误修正模块,进行针对性的调整,以确保后续生成的代码质量。

核心算法与设计模式

核心算法的关键在于误差校正和影响分析,通过引入 Transformer 模型,它可以理解代码片断的环境,并进行精准修复。设计模式上,OpenCode++ 采用了可插拔的模块化设计,每个模块都可以独立运行,独立故障恢复,这样在保证系统健壮性的同时,也为维护和扩展提供了极高的灵活性。

功能亮点与差异

相比于同类竞品,OpenCode++ 的竞争力主要在于它所提供的封闭循环控制系统,这种机制可以保证生成代码的可靠性以及可修复性。更进一步地说,它不仅仅是一个生成代码的框架,更像一个帮助开发者修复错误的智能助手。其他竞品可能仅提供代码生成,但缺乏对代码质量和影响的深入分析,OpenCode++ 则在此基础上加入了一系列监控和修复机制。

应用场景与落地建议

OpenCode++ 适合各类需要频繁修补和调整代码的场景,特别是在需要高度可靠性的生产环境中,例如金融风控系统的开发、大型交易平台的代码监控等。开发团队在使用过程中,需要确保输入代码的质量,并且适度介入人工审查,以确保生成代码与实际业务逻辑一致性。

综合评价

优点

  • 对于代码质量的严格把控,通过多层次的验证提高了可靠性的产出。
  • 可插拔模块设计,使其易于维护和二次开发。
  • 提供了代码生成和修复机制,相较同类工具功能更强大。

缺点

  • 高度依赖 Transformer 模型,确定其在复杂代码逻辑中的表现稳定性如何仍需进一步验证。
  • 重度依赖人工介入,当业务场景复杂时,人为审查仍然难以避免。

总体而言,OpenCode++ 是一个极具创新性的项目,通过增强现有 AI 编程工具的功能,实现了更高层次的代码质量和生产效率提升。

内容更新时间:6月20日。 编辑团队负责选题与抽样审核,详见 编辑准则。

相关仓库

freeCodeCamp/freeCodeCamp avatar
freeCodeCampfreeCodeCamp
5 小时前
458.8k
46.8k
91

freeCodeCamp.org 的开源代码库和课程体系。免费学习数学、编程和计算机科学。

learn-to-codenonprofitsprogramming+7
TypeScript
572.2 MB
9
详情
morluto/rea avatar
reamorluto
5 小时前
446.6k
110.2k
1.6k

借助智能体逆向分析任何内容,从应用行为直至原生二进制文件。

agent-skillsaiandroid+17
TypeScript
145.6 MB
0
详情
openclaw/openclaw avatar
openclawopenclaw
6 分钟前
394.2k
81.6k
4.8k

真正做实事的 AI。任何 OS。任何平台。龙虾之道。🦞

aiassistantcrustacean+4
TypeScript
13.0 GB
18
详情
nilbuild/developer-roadmap avatar
developer-roadmapnilbuild
13 小时前
371.6k
42.9k
5

交互式路线图、指南及其他教育内容,帮助开发者在职业生涯中成长。

computer-scienceroadmapdeveloper-roadmap+7
TypeScript
356.1 MB
2
详情
deepseek-ai/deepseek-harness avatar
deepseek-harnessdeepseek-ai
5 天前
277.3k
34.0k
0

DeepSeek Harness:一切皆插件。

ai-agentscordisdsh+1
TypeScript
351.8 MB
3
详情
anomalyco/opencode avatar
opencodeanomalyco
23 分钟前
225.7k
30.5k
4.2k

开源编码代理。

TypeScript
672.0 MB
0
详情
vuejs/vue avatar
vuevuejs
2024年10月10日
212.6k
34.0k
645

这是 Vue 2 的仓库。如需 Vue 3,请前往 https://github.com/vuejs/core

frameworkfrontendjavascript+1
TypeScript
31.4 MB
0
详情
n8n-io/n8n avatar
n8nn8n-io
6 小时前
209.9k
61.4k
1.3k

具备原生 AI 能力的公平代码工作流自动化平台。将可视化构建与自定义代码相结合,支持自托管或云端部署,提供 400+ 种集成。

automationipaasn8n+7
TypeScript
781.5 MB
3
详情

关于

agentcode-agentcode-agent-clicode-agent-harnesscode-agentshallucination-guardharnessharness-aiharness-engineeringloop-engineeringmcpmcp-toolsmimo-codemimocodeopencodeopencode-aiopencode-pluginregression-guardverification
  • 113 Stars
  • 11 Forks
  • 10 Watching

简要分析

热度分
145
价值分
72
活跃状态
活跃
GitHub

语言占比

C#
JavaScript
Mermaid
Python
TypeScript

Release

  • OpenCode++ v0.2.12 — Mode isolation / 模式隔离9月1日
  • OpenCode++ v0.2.118月28日
  • OpenCode++ v0.2.108月28日
  • OpenCode++ v0.2.98月28日
  • OpenCode++ v0.2.8 / Desktop Harness Status8月27日

贡献者

whut09whut09

OpenCode++

中文说明

A Windows-first Harness plugin for the official OpenCode Desktop application.

OpenCode++ makes the work around an AI-generated diff visible and reviewable: what it inspected, what it blocked, what it asked to run, and what current evidence actually verified.

What Problem It Solves

An AI coding session can produce a plausible diff while reading the wrong files, editing outside the intended scope, running an unrelated command, or declaring success without fresh test evidence. OpenCode++ adds a verification control plane around OpenCode Desktop so the model has to work from repository context, explicit edit boundaries, traceable evidence, and a final decision.

OpenCode++ is not another chat application and it is not a replacement model. It is a user-level Desktop plugin that observes the tools OpenCode already exposes and provides Harness tools for:

  • selecting relevant files and symbols before blind search;
  • preparing task boundaries and required checks;
  • guarding commands and protected paths;
  • recording sanitized execution evidence against the current working tree;
  • evaluating policy, freshness, regression, hallucination, and convergence gates;
  • explaining whether the next action is repair, repack, human review, or finalize.

System Architecture

OpenCode++ system architecture

The important boundary is simple: OpenCode still reads files, edits code, and runs commands. OpenCode++ supplies deterministic context, boundaries, evidence checks, and decisions around that work.

Layer What OpenCode++ does What it does not claim
Context Registry + Retrieval Finds relevant packs, files, symbols, versions, and dependencies; explains selected and rejected files. Context is guidance, not permission or proof.
Guard + Policy Checks commands, protected paths, contracts, freshness, regression, and required actions. It is not an operating-system sandbox.
Evidence Matches command or CI results to the current working-tree hash and active evidence policy. A passing command alone does not prove business correctness.
Intervention Ledger Records observed, prevented, requested, repaired, verified, unresolved, and human-review states. Prevention or suggestion is not a verified fix.
Decision + Dashboard Returns the next allowed action and shows the recorded facts in the Desktop result and local artifacts. It does not expose hidden model chain-of-thought or call another model.

The normal Desktop path uses one current OpenCode model and one in-process plugin. CLI and MCP remain developer/compatibility surfaces; they are not required for installation or daily use.

What It Can Do Now

The Windows installer adds one selectable OpenCode primary mode named OpenCode++. Select it from the mode picker shown at the bottom of the prompt box, then describe the coding task normally. There are no OpenCode++ Slash Commands to remember.

Select the OpenCode++ mode

When the mode is selected, its prompt instructs the current OpenCode model to use the in-process plugin tools. The plugin does not start a second model or a CLI process. It runs inside OpenCode Desktop and writes auditable runtime artifacts into the repository’s .agent-context/ directory.

The EXE installer is per-user, works on Windows x64, and does not require Administrator permission.

By default the plugin works offline: it does not fetch remote Context sources and does not call a second model. A configured remote source or feedback transport must be explicitly enabled. The active OpenCode model remains responsible for reading, editing, and running commands; OpenCode++ supplies deterministic tools and gates around that work.

Install And Use

  1. Download opencode-plusplus-setup-win-x64.exe from GitHub Releases.
  2. Fully exit OpenCode Desktop.
  3. Double-click the EXE and accept the installation message.

Installer confirmation

  1. Restart OpenCode Desktop and open a repository.
  2. Select OpenCode++ in the mode picker.
  3. Enter a normal request, such as Fix the login timeout and add a regression test.
  4. Let the selected mode call prepare, retrieve, evaluate, and next while it works. Do not switch back to Build for a task that needs the Harness gates.
  5. Read the compact status after evaluate or next. Call opencode_plusplus_dashboard when you want stage progress, selected and rejected files, decision basis, evidence freshness, interventions, and the final summary.
  6. Inspect .agent-context/ when you need the trace, findings, required commands, or final report.

The installer writes only these OpenCode configuration files:

<OpenCode config>\plugins\opencode-plusplus.js
<OpenCode config>\agents\opencode-plusplus.md
<OpenCode config>\opencode-plusplus\state.json
<OpenCode config>\opencode-plusplus\installation.json

It removes files from older releases that created Slash Commands or patched app.asar. It no longer changes the OpenCode Desktop bundle. The default configuration directory is %USERPROFILE%\.config\opencode; OPENCODE_CONFIG_DIR takes precedence.

Reports And Boundaries

Runtime evidence is local to each repository:

  • .agent-context/traces/ contains execution and test evidence;
  • .agent-context/runs/ contains task context and edit boundaries;
  • .agent-context/loops/ contains decisions and convergence state;
  • .agent-context/sidecar/latest.md contains the latest verification summary.
  • .agent-context/sidecar/visualization.json contains the latest structured Harness Dashboard snapshot.

The plugin is not an operating-system sandbox. It cannot stop another application from editing a file, prove business semantics from an exit code, or guarantee that an opaque tool argument is correctly classified. A passing command is evidence, not a complete correctness proof. Blocking results require the selected mode to repair or request human review.

What The User Sees

The Desktop tool result defaults to a compact OpenCode++ ✓ Verified, ✗ Repair required, or ⚠ Human review status. The structured JSON still contains actionSummary with observed, prevented, requested, repaired, verified, and unresolved items. Call opencode_plusplus_dashboard for the full Plan -> Prepare -> Retrieve -> Execute -> Collect -> Evaluate -> Decide -> Persist -> Finalize view with decision basis, evidence freshness, intervention counts, and selected/rejected files. See Harness Output.

The dashboard exposes recorded system facts and decision inputs. It does not expose hidden model chain-of-thought. This keeps the view useful for debugging and review without presenting private internal reasoning as an auditable fact.

The Desktop result and .agent-context/sidecar/latest.md distinguish these questions:

  • Intervened files: files selected for inspection, edited within the boundary, or rejected with a reason;
  • Blocked risks: unsafe commands, protected paths, stale Context, missing tests, policy violations, or unresolved regressions;
  • Suggested fixes: requested actions or executor-reported edits that still need evidence;
  • Verified fixes: repairs followed by fresh command or CI evidence for the current working tree;
  • Human work: unresolved findings, repeated no-progress states, or semantic decisions the Harness cannot prove.

verified fix is therefore narrower than suggested fix. An annotation, Context document, manual claim, successful earlier test, source edit, commit list, or model-generated summary cannot become verified merely because it looks plausible. External Context is untrusted guidance, and annotation is local knowledge, not policy. When the result says human-review, read the exact missing evidence in actionSummary.evidence; it is not a request to repeat the task.

Context cache and registry usage are stored under .agent-context/cache/ and .agent-context/context-registry/usage/. Local feedback is stored under .agent-context/context-registry/feedback/, annotations under .agent-context/knowledge/annotations/, and intervention records under .agent-context/interventions/. These are local runtime artifacts and should normally remain uncommitted.

On Windows, paths with spaces and non-ASCII characters are supported, but the plugin still depends on the active user’s permissions, the repository being writable, and OpenCode Desktop loading the configured plugin directory. Antivirus locks, read-only folders, unavailable network sources, invalid registry content, and permission failures are reported as diagnostics or human-review states; they are not converted into successful verification.

Customize Your Own Harness

OpenCode++ is intentionally an extension point. If OpenCode feels too permissive, too strict, or simply does not match your team’s workflow, fork or extend the plugin and define your own Harness policy instead of hiding the problem in a prompt.

Useful customization points include:

  • the primary agent prompt in src/installer/opencode-plusplus-prompts.ts;
  • command and protected-path rules in src/integrations/opencode/plugin-runtime/;
  • retrieval ranking in src/retrievers/ and src/core/ranker.ts;
  • evidence trust and freshness in src/outputs/evidence.ts and src/harness/verification-plane/;
  • loop stopping and decision arbitration in src/harness/control-plane/;
  • Desktop-specific tool behavior in src/integrations/opencode/plugin-runtime/harness/.

The safe customization pattern is: add a test for the desired policy, change the plugin or agent mode, run the full checks, and distribute a new checksummed Windows installer. Keep the Harness explicit about what it can observe and what remains a human decision.

Contributing

  1. Fork the repository and create a focused branch.
  2. Read AGENTS.md, the relevant source files, and the matching English and Chinese documentation.
  3. Add or update deterministic tests before changing behavior.
  4. Keep Desktop runtime artifacts, dist/, installer staging, secrets, and local .agent-context/ files out of commits.
  5. Run npm run check, npm run lint, npm run format:check, npm run docs:bilingual:check, and npm test.
  6. For installer changes, also run npm run build:installer:windows, npm run test:installer:windows, and npm run release:verify on Windows.
  7. Update both language versions of user-facing documentation and explain compatibility boundaries in the pull request.

See the documentation index, Windows architecture, and the contribution guide.

Developer Compatibility Surface

The repository retains CLI and MCP entry points for source development, CI, diagnostics, and compatibility integrations. They are not the normal Desktop installation path and are not required by ordinary users.

License

MIT

评论

登录 后发表评论
暂无评论
GitRead 中文社区
深度解读 · 趋势洞察 · 价值精选

关于

关于我们联系我们编辑准则收录标准赞赏人员

发现

技术趋势新手训练营资源精选实战指南精选专题热门话题GitHub 文档

条款

隐私政策服务条款网站地图
26.9万收录项目
5.3万中文话题
155精选专题
发现技术价值,连接开源智慧
© 2026 GitRead · GitHub 中文社区 本站与 GitHub, Inc. 无隶属关系;GitHub 是 GitHub, Inc. 的商标。