Skip to content

feat(autoresearch): 注册 autoresearch v0.1.0 自主实验循环插件 - #1

Open
luochang212 wants to merge 9 commits into
zai-org:mainfrom
luochang212:feat-autoresearch
Open

luochang212 wants to merge 9 commits into
zai-org:mainfrom
luochang212:feat-autoresearch

Conversation

@luochang212

Copy link
Copy Markdown

注册 autoresearch v0.1.0 — ZCode 自主实验循环插件

解决的用户问题

ZCode 缺少「自主实验循环」能力:让 coding agent 在固定机械度量上自主迭代优化(改代码 → 跑基准 → keep / discard → 循环),并内置防作弊护栏。本插件基于 karpathy/autoresearch 与 pi-autoresearch 的调研(见插件 README 与研究记录)做了 ZCode 原生实现。

用户可见行为与测试方式

  • 提供 5 个 MCP 工具(init_experiment / run_experiment / log_experiment / export_dashboard / clear_experiments)、5 个命令、5 个 hooks 与 autoresearch skill
  • 测试:插件自带 node --test 单测(60 个用例全过);本仓库 CI 的 validate.py + build_dist.py + unittest 套件均已通过

版本与市场注册

  • autoresearch v0.1.0,.zcode-plugin/plugin.json 与根 marketplace.json 条目(name / version / description)一致
  • category: developer-tools;author: luochang212

依赖、网络、权限与副作用

  • 零第三方 npm 依赖:MCP server 与 hooks 均为 Node 标准库脚本(Node ≥ 22)
  • 副作用(插件 README 已声明):执行用户编写的基准脚本(.auto/measure.sh)与正确性门禁(.auto/checks.sh);自动 git 操作(keep 提交、非 keep 回滚,.auto/ 豁免);安装 5 个 ZCode hooks(Stop 续跑、PreToolUse 写保护、PermissionRequest 门禁、UserPromptSubmit/SessionStart 记忆注入);export_dashboard 起本地 127.0.0.1 HTTP 服务;写入项目目录下的 .auto/ 会话状态

第三方来源与许可证

  • 机制参考 karpathy/autoresearch 与 pi-autoresearch,插件 README 已注明;本项目 MIT 许可
  • 插件图标为原创 SVG(源文件在贡献者仓库 assets/icon.svg),已登记于 assets/icon-sources.json(附 sha256)

- plugins/autoresearch/: 完整插件(MCP server + hooks + skills + commands,Node 标准库零依赖)
- marketplace.json: 注册条目(category developer-tools,author luochang212)
- assets/autoresearch/icon.png + icon-sources.json: 原创图标(源 SVG 见贡献者仓库 assets/icon.svg)
- 全部 .mjs → .ts:MCP server、lib(含新增 types.ts 领域类型)、hooks、测试
- 运行时零依赖不变:Node 原生剥离类型,无构建步骤
- README 同步更新(Node ≥24、目录结构、测试命令)
@luochang212

Copy link
Copy Markdown
Author

写给 zcode 的 autoresearch 插件

调研了市面上比较流行的 autoresearch 插件(主要是 pi、codex、claude code),分析它们的原理和生效机制,并让 AI(主要是 glm-5.3 和 deepseek-v4-flash)通过 spec-driven 的方式,开发新功能。为了保证开发出的能力适配 zcode,在开发之前还对 zcode 提供的能力做了调研,并实际调用 zcode 进行验证。目前 zcode-autoresearch 的版本是 v0.1.0。对于这一版,我用多个 AI 验核,确认已经实现主流 autoresearch 提供的功能。后续版本会根据在真实的环境中使用获得的反馈,持续提升 autoresearch 的效率和稳定性。

开源方式:MIT

GitHub: https://github.com/luochang212/zcode-autoresearch
Zread: https://zread.ai/luochang212/zcode-autoresearch

@panda920

Copy link
Copy Markdown
Collaborator

❌ Internal validation failed:

FAIL: 1 problem(s)
  - marketplace.json plugins[5] (autoresearch): plugin.json description_i18n does not match marketplace entry

Please fix it and push again; the check re-runs automatically.

🤖 Copy this prompt into Claude Code / Codex to fix it
You are updating my pull request #1 to github.com/zai-org/zcode-plugins (the ZCode plugin marketplace).
The maintainers' automated intake reported: `python scripts/validate.py` failed

Validator output:
FAIL: 1 problem(s)
  - marketplace.json plugins[5] (autoresearch): plugin.json description_i18n does not match marketplace entry

Fix it in this repository:
- Only change files under plugins/<my-plugin>/ and my plugin's entry in marketplace.json;
  never modify .github/, scripts/, tests/, .gitignore, .gitattributes or AGENTS.md.
- Follow CONTRIBUTING.md and AGENTS.md: the manifest lives at plugins/<name>/.zcode-plugin/plugin.json,
  its name/version must match marketplace.json, names are kebab-case, keep the required i18n fields.
- Fetch the latest main of zai-org/zcode-plugins and rebase onto it; if marketplace.json conflicts,
  keep every existing entry and re-add mine.
- Run `python scripts/validate.py` until it passes, then force-push my PR branch.

d8fc9db 的去 AI 味文案同步修改了 plugin.json 的 description 与
description_i18n,但遗漏了 marketplace.json 中的 autoresearch 条目。
内部校验(scripts/validate.py)要求两者 description_i18n 完全相等,
故校验失败。本提交将 marketplace 条目的 description 与
description_i18n 一并同步为 plugin.json 当前文案。

不涉及插件包内文件,版本保持 0.1.0。
@panda920

Copy link
Copy Markdown
Collaborator

✅ Internal validation passed. A ZCode maintainer will review the change next; once merged it is published to the marketplace and this PR is closed automatically.

与上游 luochang212/zcode-autoresearch main 同步(96/96 测试绿):
- log_experiment 新增 revisit_nudge 与 asi.revisits_run 透传,
  dashboard 行渲染 ↻ Revisiting #N(有依据的重访可辨识)
- confidence 单源快照入账本 run 行(记录时刻可回溯)
- 记忆注入新增「弃用方向与理由」聚合行(旧 discard 的假设可复核)
- 无人值守有界续跑:unattended 规程、Stop hook 提示句、
  off/clear/finalize 清理步骤、README 边界改双层描述
  (无限 auto-resume 仍平台不可行;需用户明确授权)
- 测试 96/96;本地已跑 scripts/validate.py 通过(17 plugins)
@luochang212

Copy link
Copy Markdown
Author

已同步实现更新(1 commit,18 files):

  • discard 重访机制:log_experiment 新增 revisit_nudge 提示与 asi.revisits_run 透传;dashboard 对有依据的重访渲染 ↻ Revisiting #N 标注
  • confidence 快照:单源计算写入账本 run 行,记录时刻的置信度可事后回溯
  • 记忆注入增强:新增「弃用方向与理由」聚合行,旧 discard 的假设可被后续结果复核
  • 无人值守有界续跑:新增 unattended 规程(用户明确授权才创建、CronCreate interval+maxRuns 双参数有界、唤醒提示自包含)、Stop hook 提示句、off/clear/finalize 清理步骤;README 无人值守边界改为「Stop 3 次窗口 + 有界 cron 自唤醒」双层描述(无限 auto-resume 仍为平台不可行)
  • 测试:96/96 通过;本地 scripts/validate.py 已跑通(17 plugins validated)

版本号保持 0.1.0(首次上架,无已发布的旧版本需要区分)。

@panda920

Copy link
Copy Markdown
Collaborator

✅ Internal validation passed. A ZCode maintainer will review the change next; once merged it is published to the marketplace and this PR is closed automatically.

@panda920

Copy link
Copy Markdown
Collaborator

✅ Internal validation passed. A ZCode maintainer will review the change next; once merged it is published to the marketplace and this PR is closed automatically.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants