opencode-autoresearch 3.3.1 → 3.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.opencode/INSTALL.md +85 -0
- package/.opencode-plugin/plugin.json +2 -2
- package/AGENTS.md +44 -0
- package/INSTALL.md +275 -0
- package/README.md +122 -34
- package/VERSION +1 -1
- package/dist/constants.d.ts +1 -1
- package/dist/constants.js +1 -1
- package/dist/index.d.ts +18 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +46 -1
- package/dist/index.js.map +1 -1
- package/dist/wizard.d.ts.map +1 -1
- package/dist/wizard.js +4 -3
- package/dist/wizard.js.map +1 -1
- package/docs/ARCHITECTURE.md +53 -9
- package/docs/OPENCODE_INSTALL.md +80 -19
- package/docs/QUICKSTART.md +42 -0
- package/docs/RELEASE.md +16 -15
- package/hooks/status.sh +14 -12
- package/hooks/stop.sh +47 -13
- package/hooks/verify-package.sh +36 -3
- package/package.json +24 -5
- package/plugins/autoresearch.ts +2 -8
- package/skills/hermes/INTEGRATION.md +156 -0
- package/skills/hermes/README.md +159 -0
- package/skills/hermes/autoresearch-prompt.md +270 -0
- package/docs/superpowers/plans/2026-05-03-install-release-security.md +0 -855
- package/docs/superpowers/specs/2026-05-03-install-release-security-design.md +0 -80
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
# Installing Auto Research for OpenCode
|
|
2
|
+
|
|
3
|
+
For the public raw install handoff, see [`../INSTALL.md`](../INSTALL.md).
|
|
4
|
+
|
|
5
|
+
## Prerequisites
|
|
6
|
+
|
|
7
|
+
- [OpenCode.ai](https://opencode.ai) installed
|
|
8
|
+
|
|
9
|
+
## Recommended: OpenCode Plugin Install
|
|
10
|
+
|
|
11
|
+
Add Auto Research to the `plugin` array in your global or project-level `opencode.json`:
|
|
12
|
+
|
|
13
|
+
```json
|
|
14
|
+
{
|
|
15
|
+
"plugin": ["opencode-autoresearch@latest"]
|
|
16
|
+
}
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
Restart OpenCode. OpenCode installs npm plugins automatically and registers the Auto Research commands.
|
|
20
|
+
|
|
21
|
+
Verify inside OpenCode by running:
|
|
22
|
+
|
|
23
|
+
```text
|
|
24
|
+
/autoresearch
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Optional: Global CLI Install
|
|
28
|
+
|
|
29
|
+
Install the CLI globally if you also want `autoresearch` and `opencode-autoresearch` on your shell `PATH`:
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
npm install -g opencode-autoresearch
|
|
33
|
+
opencode-autoresearch doctor
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
For one-time use without a global install:
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
npx opencode-autoresearch doctor
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## Commands
|
|
43
|
+
|
|
44
|
+
After installation, these commands are available in OpenCode:
|
|
45
|
+
|
|
46
|
+
- `/autoresearch`
|
|
47
|
+
- `/autoresearch:plan`
|
|
48
|
+
- `/autoresearch:debug`
|
|
49
|
+
- `/autoresearch:fix`
|
|
50
|
+
- `/autoresearch:learn`
|
|
51
|
+
- `/autoresearch:predict`
|
|
52
|
+
- `/autoresearch:scenario`
|
|
53
|
+
- `/autoresearch:security`
|
|
54
|
+
- `/autoresearch:ship`
|
|
55
|
+
|
|
56
|
+
## Updating
|
|
57
|
+
|
|
58
|
+
OpenCode refreshes npm plugins when it starts. The `opencode-autoresearch@latest` plugin entry follows the current npm `latest` release. Restart OpenCode after changing `opencode.json` or after a new Auto Research package release is published.
|
|
59
|
+
|
|
60
|
+
To pin a version:
|
|
61
|
+
|
|
62
|
+
```json
|
|
63
|
+
{
|
|
64
|
+
"plugin": ["opencode-autoresearch@3.3.3"]
|
|
65
|
+
}
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
## Troubleshooting
|
|
69
|
+
|
|
70
|
+
### Plugin not loading
|
|
71
|
+
|
|
72
|
+
1. Verify the package name in `opencode.json` is `opencode-autoresearch`.
|
|
73
|
+
2. Restart OpenCode after editing config.
|
|
74
|
+
3. Check OpenCode logs with `opencode run --print-logs "hello"`.
|
|
75
|
+
|
|
76
|
+
### CLI not found
|
|
77
|
+
|
|
78
|
+
1. Run `npm install -g opencode-autoresearch`.
|
|
79
|
+
2. Verify your npm global bin directory is on `PATH`.
|
|
80
|
+
3. Run `opencode-autoresearch doctor`.
|
|
81
|
+
|
|
82
|
+
## Getting Help
|
|
83
|
+
|
|
84
|
+
- Issues: https://github.com/Maleick/AutoResearch/issues
|
|
85
|
+
- Documentation: https://github.com/Maleick/AutoResearch#readme
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "autoresearch",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.4.1",
|
|
4
4
|
"description": "Auto Research for OpenCode. Run a structured autonomous iteration loop with a standing subagent pool.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Maleick",
|
|
@@ -34,4 +34,4 @@
|
|
|
34
34
|
"termsOfServiceURL": "https://github.com/Maleick/AutoResearch/blob/main/LICENSE",
|
|
35
35
|
"brandColor": "#0F766E"
|
|
36
36
|
}
|
|
37
|
-
}
|
|
37
|
+
}
|
package/AGENTS.md
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# Auto Research Agent Guide
|
|
2
|
+
|
|
3
|
+
## Project Purpose
|
|
4
|
+
|
|
5
|
+
Auto Research is an OpenCode and Hermes Agent workflow bundle plus npm package for structured autonomous improve-verify loops.
|
|
6
|
+
|
|
7
|
+
## Source of Truth
|
|
8
|
+
|
|
9
|
+
- Runtime source lives in `src/`.
|
|
10
|
+
- OpenCode commands live in `commands/`.
|
|
11
|
+
- The Auto Research skill bundle lives in `skills/autoresearch/`.
|
|
12
|
+
- The Hermes Agent skill bundle and integration docs live in `skills/hermes/`.
|
|
13
|
+
- Shell hooks live in `hooks/`.
|
|
14
|
+
- OpenCode package metadata lives in `.opencode-plugin/plugin.json`.
|
|
15
|
+
- Installation, architecture, and release docs live in `docs/` and `wiki/`.
|
|
16
|
+
|
|
17
|
+
## Development Rules
|
|
18
|
+
|
|
19
|
+
- Build context from existing files before changing behavior.
|
|
20
|
+
- Prefer the smallest correct change.
|
|
21
|
+
- Do not commit, tag, push, create releases, or publish packages unless the user explicitly asks.
|
|
22
|
+
- Do not commit runtime artifacts from `.autoresearch/` or generated result files.
|
|
23
|
+
- Keep `VERSION`, `package.json`, `package-lock.json`, `src/constants.ts`, and `.opencode-plugin/plugin.json` aligned for releases.
|
|
24
|
+
- When Hermes cron, `delegate_task`, model routing, or install behavior changes, keep `README.md`, `INSTALL.md`, `docs/`, `wiki/`, and `skills/hermes/` aligned.
|
|
25
|
+
|
|
26
|
+
## Security Rules
|
|
27
|
+
|
|
28
|
+
- Do not add install flows that pipe remote scripts into a shell.
|
|
29
|
+
- Keep package contents guarded by `hooks/verify-package.sh`.
|
|
30
|
+
- Do not hardcode secrets, tokens, credentials, or private paths.
|
|
31
|
+
- Pass shell variables into inline scripts through environment variables or argv, not by interpolating into source code.
|
|
32
|
+
|
|
33
|
+
## Verification
|
|
34
|
+
|
|
35
|
+
Run the focused relevant checks before claiming work is complete. Release-prep changes should run:
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
npm audit --audit-level=moderate
|
|
39
|
+
npm run typecheck
|
|
40
|
+
npm run build
|
|
41
|
+
npm run verify:pack
|
|
42
|
+
npm test
|
|
43
|
+
npm pack --dry-run
|
|
44
|
+
```
|
package/INSTALL.md
ADDED
|
@@ -0,0 +1,275 @@
|
|
|
1
|
+
# Install Auto Research
|
|
2
|
+
|
|
3
|
+
Auto Research is a multi-runtime plugin and npm package for structured autonomous improve-verify loops. It keeps runtime state local to the target repository and gates changes with mechanical verification.
|
|
4
|
+
|
|
5
|
+
## Supported Runtimes
|
|
6
|
+
|
|
7
|
+
- **OpenCode** — Slash commands (`/autoresearch`) with standing subagent pool
|
|
8
|
+
- **Hermes Agent** — Cron-based iteration loop with `delegate_task` subagents (max 3)
|
|
9
|
+
|
|
10
|
+
Both runtimes share the same state format (`.autoresearch/state.json`) and CLI (`opencode-autoresearch`).
|
|
11
|
+
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
## OpenCode Install
|
|
15
|
+
|
|
16
|
+
### One-Line OpenCode Install
|
|
17
|
+
|
|
18
|
+
Paste this one line into OpenCode to install and verify Auto Research. This URL follows the latest `main` instructions:
|
|
19
|
+
|
|
20
|
+
```text
|
|
21
|
+
Fetch and follow instructions from https://raw.githubusercontent.com/Maleick/AutoResearch/refs/heads/main/INSTALL.md
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
### Prerequisites
|
|
25
|
+
|
|
26
|
+
- OpenCode installed and available in your shell.
|
|
27
|
+
- Node.js with npm available for the optional CLI path.
|
|
28
|
+
- Git installed and available in your shell.
|
|
29
|
+
- A target repository with a verification command such as `npm test`, `pytest`, or `go test ./...`.
|
|
30
|
+
|
|
31
|
+
### Recommended OpenCode Plugin Install
|
|
32
|
+
|
|
33
|
+
Add Auto Research to your global or project-level `opencode.json` plugin array:
|
|
34
|
+
|
|
35
|
+
```json
|
|
36
|
+
{
|
|
37
|
+
"plugin": ["opencode-autoresearch@latest"]
|
|
38
|
+
}
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Restart OpenCode after editing the configuration. The command family should then be available inside your target repository:
|
|
42
|
+
|
|
43
|
+
```text
|
|
44
|
+
/autoresearch
|
|
45
|
+
/autoresearch:plan
|
|
46
|
+
/autoresearch:debug
|
|
47
|
+
/autoresearch:fix
|
|
48
|
+
/autoresearch:learn
|
|
49
|
+
/autoresearch:predict
|
|
50
|
+
/autoresearch:scenario
|
|
51
|
+
/autoresearch:security
|
|
52
|
+
/autoresearch:ship
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
### npm Global Install
|
|
56
|
+
|
|
57
|
+
If you also want the CLI available on your shell `PATH`:
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
npm install -g opencode-autoresearch
|
|
61
|
+
opencode-autoresearch doctor
|
|
62
|
+
opencode-autoresearch --version
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
Then restart OpenCode and run:
|
|
66
|
+
|
|
67
|
+
```text
|
|
68
|
+
/autoresearch
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
### One-Time CLI Path
|
|
72
|
+
|
|
73
|
+
For one-time CLI use without a global install:
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
npx opencode-autoresearch doctor
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
Use the plugin-array install for normal OpenCode usage.
|
|
80
|
+
|
|
81
|
+
---
|
|
82
|
+
|
|
83
|
+
## Hermes Agent Install
|
|
84
|
+
|
|
85
|
+
### Prerequisites
|
|
86
|
+
|
|
87
|
+
- Hermes Agent installed and configured.
|
|
88
|
+
- Node.js with npm available for the CLI path.
|
|
89
|
+
- Git installed and available in your shell.
|
|
90
|
+
|
|
91
|
+
### Install the Hermes Skill
|
|
92
|
+
|
|
93
|
+
```bash
|
|
94
|
+
# 1. Clone AutoResearch (or use an existing checkout)
|
|
95
|
+
git clone https://github.com/Maleick/AutoResearch.git
|
|
96
|
+
cd AutoResearch
|
|
97
|
+
npm install
|
|
98
|
+
|
|
99
|
+
# 2. Copy skill files to your Hermes skills directory
|
|
100
|
+
mkdir -p ~/.hermes/skills/software-development/autoresearch
|
|
101
|
+
cp skills/hermes/autoresearch-prompt.md ~/.hermes/skills/software-development/autoresearch/SKILL.md
|
|
102
|
+
cp skills/hermes/INTEGRATION.md ~/.hermes/skills/software-development/autoresearch/REFERENCES.md
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
### Create the Cronjob
|
|
106
|
+
|
|
107
|
+
```bash
|
|
108
|
+
hermes cron create \
|
|
109
|
+
--name "autoresearch-loop" \
|
|
110
|
+
--workdir ~/projects/AutoResearch \
|
|
111
|
+
--skill autoresearch-hermes \
|
|
112
|
+
"every 15m" \
|
|
113
|
+
"Run AutoResearch iteration loop. Detect phase from .autoresearch/state.json and execute one phase. Approved verify command: 'npm run test:coverage'. Approved guard command: 'npm run typecheck'."
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
### Initialize a Run
|
|
117
|
+
|
|
118
|
+
Initialize state from a trusted shell before enabling unattended cron:
|
|
119
|
+
|
|
120
|
+
```bash
|
|
121
|
+
autoresearch init \
|
|
122
|
+
--goal "Improve test coverage" \
|
|
123
|
+
--metric "coverage_pct" \
|
|
124
|
+
--direction "higher" \
|
|
125
|
+
--verify "npm run test:coverage" \
|
|
126
|
+
--guard "npm run typecheck" \
|
|
127
|
+
--iterations 20 \
|
|
128
|
+
--mode background
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
Do not rely on cron to auto-init from repository config; the Hermes skill treats repository commands as untrusted unless they match operator-approved cron commands.
|
|
132
|
+
|
|
133
|
+
### Start, Check, and Stop
|
|
134
|
+
|
|
135
|
+
```bash
|
|
136
|
+
# Start
|
|
137
|
+
hermes cron resume autoresearch-loop
|
|
138
|
+
|
|
139
|
+
# Check status
|
|
140
|
+
cat .autoresearch/state.json | jq .
|
|
141
|
+
|
|
142
|
+
# Stop
|
|
143
|
+
hermes cron pause autoresearch-loop
|
|
144
|
+
# Or set stop flag:
|
|
145
|
+
jq '.flags.stop_requested = true' .autoresearch/state.json > tmp.json && mv tmp.json .autoresearch/state.json
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
See [`skills/hermes/README.md`](skills/hermes/README.md) for full Hermes setup, troubleshooting, and command mapping.
|
|
149
|
+
|
|
150
|
+
---
|
|
151
|
+
|
|
152
|
+
## Verification
|
|
153
|
+
|
|
154
|
+
These checks do not require secrets:
|
|
155
|
+
|
|
156
|
+
```bash
|
|
157
|
+
npm view opencode-autoresearch version
|
|
158
|
+
npm view opencode-autoresearch dist-tags
|
|
159
|
+
opencode-autoresearch doctor
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
For a local clone:
|
|
163
|
+
|
|
164
|
+
```bash
|
|
165
|
+
npm install
|
|
166
|
+
npm run build
|
|
167
|
+
npm run typecheck
|
|
168
|
+
npm run verify:pack
|
|
169
|
+
npm test
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
To verify command availability:
|
|
173
|
+
|
|
174
|
+
- **OpenCode**: restart OpenCode in a Git repository and run `/autoresearch`.
|
|
175
|
+
- **Hermes**: run `hermes cron list` and confirm `autoresearch-loop` is present.
|
|
176
|
+
|
|
177
|
+
---
|
|
178
|
+
|
|
179
|
+
## Updating
|
|
180
|
+
|
|
181
|
+
### OpenCode
|
|
182
|
+
|
|
183
|
+
For plugin-array installs, `opencode-autoresearch@latest` follows the current npm `latest` release. Restart OpenCode after a new Auto Research package release is available. To pin a fixed version instead:
|
|
184
|
+
|
|
185
|
+
```json
|
|
186
|
+
{
|
|
187
|
+
"plugin": ["opencode-autoresearch@3.3.3"]
|
|
188
|
+
}
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
For npm global installs:
|
|
192
|
+
|
|
193
|
+
```bash
|
|
194
|
+
npm install -g opencode-autoresearch@latest
|
|
195
|
+
npm list -g opencode-autoresearch --depth=0
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
### Hermes
|
|
199
|
+
|
|
200
|
+
Update the skill files from the latest repo checkout:
|
|
201
|
+
|
|
202
|
+
```bash
|
|
203
|
+
cd AutoResearch
|
|
204
|
+
git pull origin main
|
|
205
|
+
cp skills/hermes/autoresearch-prompt.md ~/.hermes/skills/software-development/autoresearch/SKILL.md
|
|
206
|
+
cp skills/hermes/INTEGRATION.md ~/.hermes/skills/software-development/autoresearch/REFERENCES.md
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
Restart the cronjob if needed:
|
|
210
|
+
|
|
211
|
+
```bash
|
|
212
|
+
hermes cron resume autoresearch-loop
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
---
|
|
216
|
+
|
|
217
|
+
## Troubleshooting
|
|
218
|
+
|
|
219
|
+
### Plugin Not Loading (OpenCode)
|
|
220
|
+
|
|
221
|
+
- Confirm `opencode.json` is valid JSON.
|
|
222
|
+
- Confirm the plugin entry is in the top-level `plugin` array.
|
|
223
|
+
- Restart OpenCode after changing the config.
|
|
224
|
+
- Check OpenCode logs with `opencode run --print-logs "hello"`.
|
|
225
|
+
|
|
226
|
+
### Commands Not Found (OpenCode)
|
|
227
|
+
|
|
228
|
+
- Restart OpenCode so it reloads plugin commands.
|
|
229
|
+
- Confirm the package installed successfully with `npm list -g opencode-autoresearch --depth=0` if using the global path.
|
|
230
|
+
- Run `/autoresearch` from inside a Git repository, not from an empty directory.
|
|
231
|
+
|
|
232
|
+
### Cron Not Running (Hermes)
|
|
233
|
+
|
|
234
|
+
```bash
|
|
235
|
+
hermes cron list
|
|
236
|
+
hermes logs --component cron
|
|
237
|
+
```
|
|
238
|
+
|
|
239
|
+
### State File Corrupted (any runtime)
|
|
240
|
+
|
|
241
|
+
```bash
|
|
242
|
+
# Reset to baseline
|
|
243
|
+
rm .autoresearch/state.json
|
|
244
|
+
# Next run will re-init from config
|
|
245
|
+
```
|
|
246
|
+
|
|
247
|
+
### Subagent Failures (Hermes)
|
|
248
|
+
|
|
249
|
+
Check `.autoresearch/state.json` for:
|
|
250
|
+
- `flags.needs_human` — requires manual intervention
|
|
251
|
+
- Last iteration's `error` field
|
|
252
|
+
|
|
253
|
+
### Runtime Artifacts
|
|
254
|
+
|
|
255
|
+
- Auto Research writes runtime state to `.autoresearch/` in the target repository.
|
|
256
|
+
- Do not commit `.autoresearch/`, `autoresearch-results.tsv`, `autoresearch-report.md`, or `autoresearch-memory.md` unless you intentionally want to share run outputs.
|
|
257
|
+
|
|
258
|
+
---
|
|
259
|
+
|
|
260
|
+
## Safety Notes
|
|
261
|
+
|
|
262
|
+
- Start with a measurable goal, metric, and verification command.
|
|
263
|
+
- Review generated reports before relying on unattended background runs.
|
|
264
|
+
- Keep verification mechanical; do not accept improvements based on intuition alone.
|
|
265
|
+
- Do not pipe remote install scripts into a shell.
|
|
266
|
+
|
|
267
|
+
---
|
|
268
|
+
|
|
269
|
+
## Links
|
|
270
|
+
|
|
271
|
+
- Documentation: https://github.com/Maleick/AutoResearch/tree/main/docs
|
|
272
|
+
- Wiki: https://github.com/Maleick/AutoResearch/wiki
|
|
273
|
+
- Releases: https://github.com/Maleick/AutoResearch/releases
|
|
274
|
+
- Issues: https://github.com/Maleick/AutoResearch/issues
|
|
275
|
+
- Hermes docs: https://hermes-agent.nousresearch.com/docs
|
package/README.md
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
# Auto Research
|
|
2
2
|
|
|
3
3
|
<p align="center">
|
|
4
|
-
<img src="assets/autoresearch-banner.svg" width="900" alt="Auto Research —
|
|
4
|
+
<img src="assets/autoresearch-banner.svg" width="900" alt="Auto Research — Multi-runtime autonomous recursive self-improvement engine" />
|
|
5
5
|
</p>
|
|
6
6
|
|
|
7
7
|
<p align="center">
|
|
8
|
+
<img src="https://img.shields.io/badge/version-v3.4.1-58a6ff?style=flat" alt="v3.4.1">
|
|
8
9
|
<a href="https://github.com/Maleick/AutoResearch/stargazers"><img src="https://img.shields.io/github/stars/Maleick/AutoResearch?style=flat&color=58a6ff" alt="Stars"></a>
|
|
9
10
|
<a href="https://github.com/Maleick/AutoResearch/commits/main"><img src="https://img.shields.io/github/last-commit/Maleick/AutoResearch?style=flat" alt="Last Commit"></a>
|
|
10
11
|
<a href="https://github.com/Maleick/AutoResearch/releases"><img src="https://img.shields.io/github/v/release/Maleick/AutoResearch?style=flat" alt="Version"></a>
|
|
@@ -20,7 +21,7 @@
|
|
|
20
21
|
<a href="#self-improvement-loop">Self-Improvement</a>
|
|
21
22
|
</p>
|
|
22
23
|
|
|
23
|
-
<p align="center"><strong>
|
|
24
|
+
<p align="center"><strong>Multi-runtime autonomous recursive self-improvement engine.</strong></p>
|
|
24
25
|
|
|
25
26
|
```text
|
|
26
27
|
┌──────────────────────────────────────────────┐
|
|
@@ -34,7 +35,7 @@
|
|
|
34
35
|
|
|
35
36
|
## What It Does
|
|
36
37
|
|
|
37
|
-
Auto Research is a **subagent-first autonomous iteration engine** that runs structured improve-verify loops inside OpenCode
|
|
38
|
+
Auto Research is a **subagent-first autonomous iteration engine** that runs structured improve-verify loops inside **OpenCode** or **Hermes Agent**. Unlike simple task runners, it maintains a pool of specialized subagents, persists learnings across iterations, and can run recursive self-improvement loops on its own codebase.
|
|
38
39
|
|
|
39
40
|
- **Plans** experiments from a measurable goal
|
|
40
41
|
- **Modifies** one focused change per iteration
|
|
@@ -59,7 +60,7 @@ flowchart LR
|
|
|
59
60
|
```mermaid
|
|
60
61
|
flowchart TD
|
|
61
62
|
A[Goal + Metric + Verify] --> B[Baseline]
|
|
62
|
-
B --> C[
|
|
63
|
+
B --> C[Pool Init]
|
|
63
64
|
C --> D[Iteration N]
|
|
64
65
|
D --> E[Subagent Context]
|
|
65
66
|
E --> F[Focused Change]
|
|
@@ -96,34 +97,79 @@ See [`skills/autoresearch/references/self-improve-loop.md`](skills/autoresearch/
|
|
|
96
97
|
|
|
97
98
|
## Installation
|
|
98
99
|
|
|
99
|
-
|
|
100
|
+
### OpenCode
|
|
100
101
|
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
102
|
+
For OpenCode, paste this one-line install prompt into your agent. This URL follows the latest `main` instructions:
|
|
103
|
+
|
|
104
|
+
```text
|
|
105
|
+
Fetch and follow instructions from https://raw.githubusercontent.com/Maleick/AutoResearch/refs/heads/main/INSTALL.md
|
|
104
106
|
```
|
|
105
107
|
|
|
106
|
-
|
|
108
|
+
Recommended plugin install in `opencode.json`:
|
|
107
109
|
|
|
108
|
-
```
|
|
109
|
-
|
|
110
|
-
|
|
110
|
+
```json
|
|
111
|
+
{
|
|
112
|
+
"plugin": ["opencode-autoresearch@latest"]
|
|
113
|
+
}
|
|
111
114
|
```
|
|
112
115
|
|
|
113
|
-
|
|
116
|
+
Restart OpenCode, then run the setup wizard:
|
|
114
117
|
|
|
115
118
|
```text
|
|
116
119
|
/autoresearch
|
|
117
120
|
```
|
|
118
121
|
|
|
119
|
-
|
|
122
|
+
### Hermes Agent
|
|
123
|
+
|
|
124
|
+
```bash
|
|
125
|
+
# 1. Clone AutoResearch
|
|
126
|
+
git clone https://github.com/Maleick/AutoResearch.git
|
|
127
|
+
cd AutoResearch
|
|
128
|
+
npm install
|
|
129
|
+
|
|
130
|
+
# 2. Install the Hermes skill
|
|
131
|
+
mkdir -p ~/.hermes/skills/software-development/autoresearch
|
|
132
|
+
cp skills/hermes/autoresearch-prompt.md ~/.hermes/skills/software-development/autoresearch/SKILL.md
|
|
133
|
+
cp skills/hermes/INTEGRATION.md ~/.hermes/skills/software-development/autoresearch/REFERENCES.md
|
|
134
|
+
|
|
135
|
+
# 3. Create a cronjob
|
|
136
|
+
hermes cron create \
|
|
137
|
+
--name "autoresearch-loop" \
|
|
138
|
+
--workdir ~/projects/AutoResearch \
|
|
139
|
+
--skill autoresearch-hermes \
|
|
140
|
+
"every 15m" \
|
|
141
|
+
"Run AutoResearch iteration loop. Detect phase from .autoresearch/state.json and execute one phase. Approved verify command: \"npm run test:coverage\". Approved guard command: \"npm run typecheck\"."
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
See [`skills/hermes/README.md`](skills/hermes/README.md) for full Hermes setup, troubleshooting, and command mapping.
|
|
145
|
+
|
|
146
|
+
### npm CLI (both runtimes)
|
|
147
|
+
|
|
148
|
+
Global install path:
|
|
120
149
|
|
|
121
150
|
```bash
|
|
122
|
-
# 1. Install the CLI globally
|
|
123
151
|
npm install -g opencode-autoresearch
|
|
152
|
+
autoresearch doctor
|
|
153
|
+
autoresearch --version
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
One-time package runner path:
|
|
157
|
+
|
|
158
|
+
```bash
|
|
159
|
+
npx opencode-autoresearch doctor
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
See [`INSTALL.md`](INSTALL.md) for prerequisites, verification, updating, and troubleshooting.
|
|
163
|
+
|
|
164
|
+
## Quick Start
|
|
124
165
|
|
|
125
|
-
|
|
126
|
-
|
|
166
|
+
### OpenCode
|
|
167
|
+
|
|
168
|
+
```bash
|
|
169
|
+
# 1. Add the plugin to opencode.json
|
|
170
|
+
# { "plugin": ["opencode-autoresearch@latest"] }
|
|
171
|
+
|
|
172
|
+
# 2. Restart OpenCode
|
|
127
173
|
|
|
128
174
|
# 3. Navigate to your project
|
|
129
175
|
cd ~/Projects/my-project
|
|
@@ -132,25 +178,48 @@ cd ~/Projects/my-project
|
|
|
132
178
|
/autoresearch
|
|
133
179
|
```
|
|
134
180
|
|
|
181
|
+
### Hermes Agent
|
|
182
|
+
|
|
183
|
+
```bash
|
|
184
|
+
# 1. Ensure the skill is installed (see Installation above)
|
|
185
|
+
|
|
186
|
+
# 2. Initialize state from a trusted shell before enabling unattended cron
|
|
187
|
+
autoresearch init \
|
|
188
|
+
--goal "Improve test coverage" \
|
|
189
|
+
--metric "coverage_pct" \
|
|
190
|
+
--direction "higher" \
|
|
191
|
+
--verify "npm run test:coverage" \
|
|
192
|
+
--guard "npm run typecheck" \
|
|
193
|
+
--iterations 20 \
|
|
194
|
+
--mode background
|
|
195
|
+
|
|
196
|
+
# 3. Start the cronjob
|
|
197
|
+
hermes cron resume autoresearch-loop
|
|
198
|
+
|
|
199
|
+
# 4. Check progress
|
|
200
|
+
cat .autoresearch/state.json | jq .
|
|
201
|
+
```
|
|
202
|
+
|
|
135
203
|
## Runtime Surfaces
|
|
136
204
|
|
|
137
205
|
| Surface | Entry point |
|
|
138
206
|
| --- | --- |
|
|
139
207
|
| OpenCode | `/autoresearch`, `/autoresearch:plan`, `/autoresearch:debug`, `/autoresearch:fix`, `/autoresearch:learn`, `/autoresearch:predict`, `/autoresearch:scenario`, `/autoresearch:security`, `/autoresearch:ship` |
|
|
208
|
+
| Hermes | Cronjob `autoresearch-loop` (see `skills/hermes/README.md`) |
|
|
140
209
|
|
|
141
210
|
## Commands
|
|
142
211
|
|
|
143
|
-
| Command | Purpose |
|
|
144
|
-
| --- | --- |
|
|
145
|
-
| `/autoresearch` | Default improve-verify loop |
|
|
146
|
-
| `/autoresearch:plan` | Planning workflow |
|
|
147
|
-
| `/autoresearch:debug` | Debugging workflow |
|
|
148
|
-
| `/autoresearch:fix` | Fix workflow |
|
|
149
|
-
| `/autoresearch:learn` | Learning workflow |
|
|
150
|
-
| `/autoresearch:predict` | Prediction workflow |
|
|
151
|
-
| `/autoresearch:scenario` | Scenario expansion |
|
|
152
|
-
| `/autoresearch:security` | Security review |
|
|
153
|
-
| `/autoresearch:ship` | Ship-readiness workflow |
|
|
212
|
+
| Command | Purpose | Hermes Equivalent |
|
|
213
|
+
| --- | --- | --- |
|
|
214
|
+
| `/autoresearch` | Default improve-verify loop | Cron runs iteration loop |
|
|
215
|
+
| `/autoresearch:plan` | Planning workflow | Subagent task: plan experiments |
|
|
216
|
+
| `/autoresearch:debug` | Debugging workflow | Subagent task: debug failures |
|
|
217
|
+
| `/autoresearch:fix` | Fix workflow | Subagent task: fix issues |
|
|
218
|
+
| `/autoresearch:learn` | Learning workflow | Memory tool + pattern analysis |
|
|
219
|
+
| `/autoresearch:predict` | Prediction workflow | Subagent task: predict outcomes |
|
|
220
|
+
| `/autoresearch:scenario` | Scenario expansion | Subagent task: expand scenarios |
|
|
221
|
+
| `/autoresearch:security` | Security review | Subagent task: security audit |
|
|
222
|
+
| `/autoresearch:ship` | Ship-readiness workflow | Subagent task: ship checks |
|
|
154
223
|
|
|
155
224
|
## CLI Commands
|
|
156
225
|
|
|
@@ -180,15 +249,16 @@ cd ~/Projects/my-project
|
|
|
180
249
|
```mermaid
|
|
181
250
|
flowchart LR
|
|
182
251
|
A[OpenCode /autoresearch] --> B[CLI]
|
|
252
|
+
H[Hermes Cronjob] --> B
|
|
183
253
|
B --> C[Run Manager]
|
|
184
254
|
C --> D[State JSON]
|
|
185
255
|
C --> E[Results TSV]
|
|
186
256
|
C --> F[Subagent Pool]
|
|
187
257
|
F --> G[Orchestrator]
|
|
188
|
-
F -->
|
|
189
|
-
F -->
|
|
190
|
-
F -->
|
|
191
|
-
F -->
|
|
258
|
+
F --> I[Scout]
|
|
259
|
+
F --> J[Analyst]
|
|
260
|
+
F --> K[Verifier]
|
|
261
|
+
F --> L[Synthesizer]
|
|
192
262
|
```
|
|
193
263
|
|
|
194
264
|
## Runtime Artifacts
|
|
@@ -249,6 +319,19 @@ The standing pool provides specialized roles reused across iterations:
|
|
|
249
319
|
| `release_guard` | Ship-readiness verification |
|
|
250
320
|
| `research_tracker` | Pattern tracking across iterations |
|
|
251
321
|
|
|
322
|
+
## Runtime Comparison
|
|
323
|
+
|
|
324
|
+
| Feature | OpenCode | Hermes |
|
|
325
|
+
|---------|----------|--------|
|
|
326
|
+
| Entry | `/autoresearch` slash command | Cronjob or `delegate_task` |
|
|
327
|
+
| Subagents | Standing pool (unlimited) | Batch via `delegate_task` (max 3) |
|
|
328
|
+
| Real-time | Yes | 15-minute cron intervals |
|
|
329
|
+
| Slash commands | 8 variants | Separate cron jobs or tasks |
|
|
330
|
+
| State | `.autoresearch/state.json` | Same file format |
|
|
331
|
+
| Memory | File-based (`autoresearch-memory.md`) | `memory` tool + file |
|
|
332
|
+
| Background | `autoresearch launch` | Native cron |
|
|
333
|
+
| Resume | `autoresearch resume` | Cron continues automatically |
|
|
334
|
+
|
|
252
335
|
## Development
|
|
253
336
|
|
|
254
337
|
```bash
|
|
@@ -264,13 +347,17 @@ npm pack --dry-run # Preview shipped package contents
|
|
|
264
347
|
src/ # TypeScript source (runtime helpers, CLI, subagent pool)
|
|
265
348
|
dist/ # Compiled JavaScript output
|
|
266
349
|
commands/ # OpenCode command surfaces
|
|
267
|
-
skills/autoresearch/ #
|
|
350
|
+
skills/autoresearch/ # OpenCode skill bundle with references
|
|
268
351
|
references/ # Workflow and runtime references
|
|
269
352
|
core-principles.md # Loop discipline
|
|
270
353
|
loop-workflow.md # Main iteration workflow
|
|
271
354
|
subagent-orchestration.md # Pool management
|
|
272
355
|
state-management.md # State semantics
|
|
273
356
|
self-improve-loop.md # Recursive self-improvement
|
|
357
|
+
skills/hermes/ # Hermes Agent skill bundle
|
|
358
|
+
README.md # Hermes setup and usage
|
|
359
|
+
INTEGRATION.md # Architecture and command mapping
|
|
360
|
+
autoresearch-prompt.md # Cron prompt template
|
|
274
361
|
hooks/ # Shell hooks for session lifecycle
|
|
275
362
|
docs/ # Install and architecture docs
|
|
276
363
|
wiki/ # GitHub wiki pages
|
|
@@ -280,7 +367,8 @@ wiki/ # GitHub wiki pages
|
|
|
280
367
|
|
|
281
368
|
## Notes
|
|
282
369
|
|
|
283
|
-
-
|
|
370
|
+
- **OpenCode** users: install via `opencode.json` plugin array or `npm install -g opencode-autoresearch`.
|
|
371
|
+
- **Hermes Agent** users: install via skill files in `skills/hermes/` and create a cronjob.
|
|
284
372
|
- The CLI uses Node.js ESM modules.
|
|
285
373
|
- Self-improvement loops require `--mode background` for long-running unattended operation.
|
|
286
374
|
- Memory files (`autoresearch-memory.md`) are portable across runs and repositories.
|
package/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
3.
|
|
1
|
+
3.4.1
|
package/dist/constants.d.ts
CHANGED
package/dist/constants.js
CHANGED