自动研究最终确定
- 作者仓库星标 3
- 作者仓库 FFT_nano
- 领域
- 工程开发
- 作者声明的智能体
- 未找到明确声明;不据此推断已兼容或已测试
- 静态检查
- 88 / 100 · 启发式扫描,不代表运行安全
- 运行环境证据
- 未执行;当前没有隔离运行测试证据
- 作者 / 版本 / 许可证
- @0-CYBERDYNE-SYSTEMS-0 · 未声明许可证
- 上下文用量评级
- 低消耗
- 接入复杂程度
- 即装即用
- 是否需要外部接口密钥
- 不需要
- 兼容的系统
- 未声明(默认跨平台)
- 运行环境要求
- 未检出明确要求
- 检测到的文件与系统行为
-
- 只读
- 允许写入 / 修改
- 网络行为
- 仅限本地
- 安装命令数
- 无(仅作为资料)
需要注意: 未声明工具权限范围;实际权限由运行环境决定。
第 1 步 — 分析并提出分组建议
阅读`autoresearch.jsonl`。仅过滤保留的实验。阅读`autoresearch.md`了解上下文。将所有短提交哈希扩展为完整哈希:`git rev-parse <short_hash>`获取合并基础:`git merge-base HEAD main`对于每个保留的提交,获取差异统计信息(第一个使用`$BASE..<commit>`,后续使用`<prev_kept>..<commit>`)。
第 2 步 — 编写 groups.json 并运行
写入`groups.json`:关键规则:`last_commit`必须是完整哈希。使用 `git rev-parse` 从 jsonl 短哈希扩展。两个组不能共享一个文件。该脚本会验证这一点,如果违反则失败。然后运行:
第 3 步 — 报告
脚本完成后,向用户报告: 创建的分支以及每个分支包含的内容 总体指标改进(基线 → 最佳) 显示脚本摘要输出中的清理命令
# Finalize Autoresearch
Turn a noisy autoresearch branch into clean, independent branches — one per logical change, each starting from the merge-base.
## Step 1 — Analyze and Propose Groups
1. Read `autoresearch.jsonl`. Filter to **kept** experiments only.
2. Read `autoresearch.md` for context.
3. Expand all short commit hashes to full hashes: `git rev-parse <short_hash>`
4. Get the merge-base: `git merge-base HEAD main`
5. For each kept commit, get the diff stat (use `$BASE..<commit>` for the first, `<prev_kept>..<commit>` for subsequent).
6. Group kept commits into logical changesets:
- **Preserve application order.** Group N comes before Group N+1.
- **No two groups may touch the same file.** Each branch is applied to merge-base independently — overlapping files would conflict. If two groups touch the same file, merge them into one group.
- **Watch for cross-file dependencies.** Each branch is independent, so if group 1 adds an API in `api.js` and group 2 calls it in `parser.js`, group 2's branch won't work in isolation. When proposing groups, flag dependencies: "group 2 depends on group 1 — review together." If the dependency is tight, merge the groups.
- **Keep each group small and focused.** One idea, one theme per group.
- **Don't hardcode a count.** Could be 2, could be 15.
Present the proposed grouping to the user:
```
Proposed branches (each from merge-base, independent):
1. **Switch test runner to forks pool** (commits abc1234, def5678)
Files: vitest.config.ts, package.json
Metric: 42.3s → 38.1s (-9.9%)
2. **Tune worker count and timeouts** (commits ghi9012, jkl3456)
Files: test/setup.ts
Metric: 38.1s → 31.7s (-16.8%)
```
**Wait for approval before proceeding.**
## Step 2 — Write groups.json and Run
Write `groups.json`:
```json
{
"base": "<full merge-base hash>",
"trunk": "main",
"final_tree": "<full hash of current HEAD>",
"goal": "short-slug",
"groups": [
{
"title": "Switch to forks pool",
"body": "Why + what changed.\n\nExperiments: #3, #5\nMetric: total_time 42.3s → 38.1s (-9.9%)",
"last_commit": "<full hash of last kept commit in this group>",
"slug": "forks-pool"
}
]
}
```
Key rules:
- **`last_commit` must be a full hash.** Expand from jsonl short hashes with `git rev-parse`.
- **No two groups may share a file.** The script validates this and fails if violated.
Then run:
```bash
bash <SKILL_DIR>/finalize.sh /tmp/groups.json
```
The script creates one branch per group from the merge-base, verifies the union matches the original branch, and prints a summary with all branches, cleanup commands, and any ideas from `autoresearch.ideas.md`.
On creation failure: rolls back (deletes branches, restores original branch, pops stash).
On verification failure: exits non-zero but leaves branches intact for inspection.
## Step 3 — Report
After the script finishes, report to the user:
- Branches created and what each contains
- Overall metric improvement (baseline → best)
- Show the cleanup commands from the script's summary output
## Edge Cases
- **Only 1 kept experiment**: One branch is fine — don't force splits.
- **Overlapping files between groups**: The script fails with an error naming the file. Merge the overlapping groups and retry.
- **Non-experiment commits** on the branch: Skip them — only process kept experiments from the jsonl.
章节与文件索引
按说明文件中的顺序排列。
第 1 步 — 分析并提出分组建议
第 2 步 — 编写 groups.json 并运行
第 3 步 — 报告
边缘情况
文件/命令 -> autoresearch.jsonl · autoresearch.md · git rev-parse <short_hash> · git merge-base HEAD main · $BASE..<commit> · <prev_kept>..<commit> · api.js · parser.js
内容校验值 -> 637e36d8d57a
当前原文的自动摘译,尚未人工审校。
第 1 步 — 分析并提出分组建议
阅读
autoresearch.jsonl。仅过滤保留的实验。阅读autoresearch.md了解上下文。将所有短提交哈希扩展为完整哈希:git rev-parse <short_hash>获取合并基础:git merge-base HEAD main对于每个保留的提交,获取差异统计信息(第一个使用$BASE..<commit>,后续使用<prev_kept>..<commit>)。边缘情况
只有 1 个实验:一根分支就可以了——不要强行分裂。组之间的文件重叠:脚本失败并出现命名文件错误。合并重叠的组并重试。分支上的非实验提交:跳过它们 - 只有进程保留来自 jsonl 的实验。