$ show moedesux/autoresearch-opencode
Autoresearch-opencode is an OpenCode plugin and skill that enables autonomous code optimization experiments. It provides a slash command (`/autoresearch`) and a TypeScript plugin that injects context into the AI agent's system prompt to guide it through an iterative experiment loop. The system defines a protocol for the agent: it reads/writes a JSONL state file (`autoresearch.jsonl`), generates experiment scripts (`autoresearch.sh`), and maintains a worklog (`experiments/worklog.md`). The core logic is documented in markdown files (SKILL.md, commands/autoresearch.md) rather than executable code, making it a hybrid of documentation and configuration. The repository includes a well-crafted bash backup utility (`scripts/backup-state.sh`) and example optimization targets (bogo_sort.py). The system is designed to be used within the OpenCode environment and does not function as a standalone application.
The LLM identified 1 files worth highlighting for reuse:
A robust, idempotent backup and restore utility for experiment state files. It supports timestamped backups, configurable retention (max 5 backups), interactive and non-interactive restore, and chaining of commands (backup, cleanup, restore). The script is isolated, well-structured, and can be extracted into any project needing state file backup with minimal modification. It demonstrates advanced shell scripting patterns including safe file handling, array usage, idempotent operations, and comprehensive error handling.