opencode-autoresearch 3.6.0 → 3.8.0

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.
Files changed (66) hide show
  1. package/.opencode-plugin/plugin.json +1 -1
  2. package/CHANGELOG.md +166 -0
  3. package/INSTALL.md +2 -2
  4. package/README.md +83 -39
  5. package/VERSION +1 -1
  6. package/dist/badge.d.ts +9 -0
  7. package/dist/badge.d.ts.map +1 -0
  8. package/dist/badge.js +86 -0
  9. package/dist/badge.js.map +1 -0
  10. package/dist/cli.js +578 -26
  11. package/dist/cli.js.map +1 -1
  12. package/dist/constants.d.ts +7 -1
  13. package/dist/constants.d.ts.map +1 -1
  14. package/dist/constants.js +7 -1
  15. package/dist/constants.js.map +1 -1
  16. package/dist/goal-init.d.ts +30 -0
  17. package/dist/goal-init.d.ts.map +1 -0
  18. package/dist/goal-init.js +109 -0
  19. package/dist/goal-init.js.map +1 -0
  20. package/dist/helpers.d.ts +13 -2
  21. package/dist/helpers.d.ts.map +1 -1
  22. package/dist/helpers.js +152 -9
  23. package/dist/helpers.js.map +1 -1
  24. package/dist/index.d.ts +12 -4
  25. package/dist/index.d.ts.map +1 -1
  26. package/dist/index.js +7 -2
  27. package/dist/index.js.map +1 -1
  28. package/dist/memory-manager.d.ts +24 -0
  29. package/dist/memory-manager.d.ts.map +1 -0
  30. package/dist/memory-manager.js +336 -0
  31. package/dist/memory-manager.js.map +1 -0
  32. package/dist/run-manager.d.ts +27 -2
  33. package/dist/run-manager.d.ts.map +1 -1
  34. package/dist/run-manager.js +210 -15
  35. package/dist/run-manager.js.map +1 -1
  36. package/dist/score-parser.d.ts +56 -0
  37. package/dist/score-parser.d.ts.map +1 -0
  38. package/dist/score-parser.js +109 -0
  39. package/dist/score-parser.js.map +1 -0
  40. package/dist/subagent-pool.d.ts +11 -0
  41. package/dist/subagent-pool.d.ts.map +1 -1
  42. package/dist/subagent-pool.js +95 -0
  43. package/dist/subagent-pool.js.map +1 -1
  44. package/dist/task-schema.d.ts +62 -0
  45. package/dist/task-schema.d.ts.map +1 -0
  46. package/dist/task-schema.js +95 -0
  47. package/dist/task-schema.js.map +1 -0
  48. package/dist/translators/cli.d.ts +5 -0
  49. package/dist/translators/cli.d.ts.map +1 -0
  50. package/dist/translators/cli.js +85 -0
  51. package/dist/translators/cli.js.map +1 -0
  52. package/dist/translators/hermes.d.ts +28 -0
  53. package/dist/translators/hermes.d.ts.map +1 -0
  54. package/dist/translators/hermes.js +102 -0
  55. package/dist/translators/hermes.js.map +1 -0
  56. package/dist/types.d.ts +113 -0
  57. package/dist/types.d.ts.map +1 -1
  58. package/dist/verifier-parser.d.ts +19 -0
  59. package/dist/verifier-parser.d.ts.map +1 -0
  60. package/dist/verifier-parser.js +161 -0
  61. package/dist/verifier-parser.js.map +1 -0
  62. package/docs/ARCHITECTURE.md +3 -0
  63. package/docs/RELEASE.md +15 -36
  64. package/docs/index.html +5 -0
  65. package/hooks/verify-package.sh +5 -1
  66. package/package.json +6 -6
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "autoresearch",
3
- "version": "3.6.0",
3
+ "version": "3.8.0",
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",
package/CHANGELOG.md ADDED
@@ -0,0 +1,166 @@
1
+ # [3.6.1](https://github.com/Maleick/AutoResearch/compare/v3.6.0...v3.6.1) (2026-05-09)
2
+
3
+ ### Bug Fixes
4
+
5
+ * sync version files and documentation for v3.6.1 release
6
+
7
+ # [3.6.0](https://github.com/Maleick/AutoResearch/compare/v3.5.0...v3.6.0) (2026-05-07)
8
+
9
+
10
+ ### Features
11
+
12
+ * add doctor source diagnostics ([#73](https://github.com/Maleick/AutoResearch/issues/73)) ([#122](https://github.com/Maleick/AutoResearch/issues/122)) ([add511a](https://github.com/Maleick/AutoResearch/commit/add511a2c741894a5ca66089235bbaa815331680))
13
+
14
+ # [3.5.0](https://github.com/Maleick/AutoResearch/compare/v3.4.1...v3.5.0) (2026-05-07)
15
+
16
+
17
+ ### Bug Fixes
18
+
19
+ * bound status results file reads ([#116](https://github.com/Maleick/AutoResearch/issues/116)) ([628b203](https://github.com/Maleick/AutoResearch/commit/628b203e736d564a4858d992a212e4a63fdb0980))
20
+ * escape Markdown export fields to prevent injection ([#115](https://github.com/Maleick/AutoResearch/issues/115)) ([76cb6de](https://github.com/Maleick/AutoResearch/commit/76cb6de5fa27c30cd7131a02532bb36609f10f79))
21
+ * honor dry-run for mutating cli commands ([#118](https://github.com/Maleick/AutoResearch/issues/118)) ([4b879f6](https://github.com/Maleick/AutoResearch/commit/4b879f6683c57a27cfb9b6ff229c587f82d18d19))
22
+ * **install:** avoid cron prompt command substitution ([#111](https://github.com/Maleick/AutoResearch/issues/111)) ([927edac](https://github.com/Maleick/AutoResearch/commit/927edacf0bb0ccb7f6b3f10a539d223837ecb954))
23
+ * require explicit verify in validate ([#117](https://github.com/Maleick/AutoResearch/issues/117)) ([fd71f54](https://github.com/Maleick/AutoResearch/commit/fd71f54b812b6bb98442c892a9f1e7c52007d0f4))
24
+ * run semantic-release on supported node ([#120](https://github.com/Maleick/AutoResearch/issues/120)) ([f457d9b](https://github.com/Maleick/AutoResearch/commit/f457d9be213351c414165e009dee3df916def407))
25
+ * sanitize report markdown fields ([#114](https://github.com/Maleick/AutoResearch/issues/114)) ([6d67814](https://github.com/Maleick/AutoResearch/commit/6d67814666ab27a7f7066313d293d7fccecd9e72))
26
+
27
+
28
+ ### Features
29
+
30
+ * add workflow issue templates ([#84](https://github.com/Maleick/AutoResearch/issues/84)) ([#121](https://github.com/Maleick/AutoResearch/issues/121)) ([aca0468](https://github.com/Maleick/AutoResearch/commit/aca04684648b1107d83a424948abe6ae1b128153))
31
+
32
+ ## [3.4.1](https://github.com/Maleick/AutoResearch/compare/v3.4.0...v3.4.1) (2026-05-07)
33
+
34
+
35
+ ### Bug Fixes
36
+
37
+ * **install:** avoid cron prompt command substitution ([#110](https://github.com/Maleick/AutoResearch/issues/110)) ([72c3816](https://github.com/Maleick/AutoResearch/commit/72c3816105eaf1e069ed0347d8d320ce96707d06))
38
+
39
+ # [3.4.0](https://github.com/Maleick/AutoResearch/compare/v3.3.3...v3.4.0) (2026-05-07)
40
+
41
+
42
+ ### Bug Fixes
43
+
44
+ * anchor OpenCode command skill references ([#27](https://github.com/Maleick/AutoResearch/issues/27)) ([05552ac](https://github.com/Maleick/AutoResearch/commit/05552ac615e69e0cc246e929fdd8de5384dbdba0))
45
+ * avoid Hermes init shell interpolation ([#28](https://github.com/Maleick/AutoResearch/issues/28)) ([5c3511d](https://github.com/Maleick/AutoResearch/commit/5c3511da03032a895791eac5322779f6428d4441))
46
+ * expose OpenCode plugin entry ([3fbf3a6](https://github.com/Maleick/AutoResearch/commit/3fbf3a6a664d446f37a2b3c4efa2483a5762fbb9))
47
+ * **hermes:** require trusted cron commands ([#29](https://github.com/Maleick/AutoResearch/issues/29)) ([75df509](https://github.com/Maleick/AutoResearch/commit/75df509fbb36f1fca7b8e2d95cb166aa5efcfe07))
48
+ * pass model router args safely ([#31](https://github.com/Maleick/AutoResearch/issues/31)) ([de0e9e8](https://github.com/Maleick/AutoResearch/commit/de0e9e852f958e453f3e81bc0e6618bba2e4282e))
49
+ * register OpenCode plugin surfaces ([3faadf1](https://github.com/Maleick/AutoResearch/commit/3faadf128793758b00671341bd7e1636c5bcf66c))
50
+ * run releases on Node 22 ([#33](https://github.com/Maleick/AutoResearch/issues/33)) ([029678d](https://github.com/Maleick/AutoResearch/commit/029678d362488b0b74a86713ab590d372a5e6c5b))
51
+
52
+
53
+ ### Features
54
+
55
+ * **hermes:** add full Hermes Agent runtime support ([190f133](https://github.com/Maleick/AutoResearch/commit/190f13355ab85b09391d959125e532cae16042e2)), closes [#hermes-support](https://github.com/Maleick/AutoResearch/issues/hermes-support) [#multi-runtime](https://github.com/Maleick/AutoResearch/issues/multi-runtime)
56
+ * **routing:** add intelligent model routing for free-tier priority ([3f7ecba](https://github.com/Maleick/AutoResearch/commit/3f7ecba7a52e3059bc9fba071eaa65db0f4c5bd4))
57
+
58
+ # Auto Research Changelog
59
+
60
+ ## [3.3.4] - 2026-05-04
61
+
62
+ ### Fixed
63
+ - **OpenCode plugin export**: Added the v1 default plugin object required by OpenCode's npm/local plugin loader.
64
+ - **OpenCode surface registration**: Registered packaged AutoResearch commands and skill paths from the plugin config hook so `/autoresearch` and the `autoresearch` skill are available after plugin load.
65
+
66
+ ## [3.3.3] - 2026-05-03
67
+
68
+ ### Added
69
+ - **Root install handoff**: Added `INSTALL.md` with a raw OpenCode handoff URL, plugin install instructions, npm CLI alternatives, verification, updating, troubleshooting, and safety notes.
70
+
71
+ ### Changed
72
+ - **Installation docs**: Updated README, OpenCode install docs, and wiki installation guidance to mirror the Code Archaeology install handoff pattern.
73
+ - **Package verification**: Required root `INSTALL.md`, narrowed docs/plugin package allowlists to explicit public files, and kept internal planning files out of package dry-run validation.
74
+
75
+ ## [3.3.2] - 2026-05-03
76
+
77
+ ### Added
78
+ - **OpenCode install guide**: Added `.opencode/INSTALL.md` with native `opencode.json` plugin installation, CLI alternative, update notes, and troubleshooting.
79
+ - **Agent guide**: Added tracked `AGENTS.md` with repository-specific development, security, and verification rules.
80
+
81
+ ### Changed
82
+ - **Installation docs**: Updated README, docs, and wiki install instructions to recommend OpenCode's native npm plugin flow first.
83
+ - **Release pipeline**: Added the missing `npm test` gate to the release workflow and aligned release docs with trusted npm publishing.
84
+ - **Package verification**: Required `.opencode/INSTALL.md` and `AGENTS.md` in package dry-run validation.
85
+
86
+ ### Fixed
87
+ - **Hook hardening**: Passed `AUTORESEARCH_STATE` into inline Node scripts through environment variables instead of interpolating it into JavaScript source.
88
+ - **Version references**: Aligned architecture and release docs for v3.3.2.
89
+
90
+ ## [3.3.1] - 2026-04-29
91
+
92
+ ### Fixed
93
+ - **README typo**: `opencode-autoship` → `opencode-autoresearch`
94
+ - **Package verification**: Added `plugins/` directory to allowlist in `verify-package.sh`
95
+ - **Git hygiene**: Removed accidentally committed `.autoresearch-test-tmp/` test artifacts
96
+ - **Git hygiene**: Added `.autoresearch-test-tmp/` to `.gitignore`
97
+
98
+ ### Changed
99
+ - **Version references**: Updated all docs from v3.2.0 to v3.3.1 (ARCHITECTURE.md, wiki/Home.md, banner SVG)
100
+ - **Documentation**: Added `plugins/` directory to package layout docs (ARCHITECTURE.md, wiki/Contributing.md)
101
+
102
+ ## [3.3.0] - 2026-04-28
103
+
104
+ ### Added
105
+ - **9 new CLI commands**: explain, history, config, report, summary, suggest, export, completion, validate
106
+ - **New flags**: --version/-v, --json, --verbose, --dry-run
107
+ - **Enhanced doctor command**: 6 checks with detailed output
108
+ - **Shell completion support**: bash, zsh, fish
109
+ - **Export functionality**: JSON and Markdown formats
110
+ - **Pre-flight validation**: validate command for config checking
111
+ - **Performance benchmarks**: 3 performance tests
112
+ - **Quickstart guide**: docs/QUICKSTART.md
113
+
114
+ ### Changed
115
+ - **Type system overhaul**: 6 new interfaces, eliminated Record<string, unknown> casts
116
+ - **Code quality cleanup**: 8 specialist subagents, 242 deletions, 175 insertions
117
+ - **Subagent pool**: 10 roles including meta_orchestrator for self-improvement
118
+ - **Word-boundary trigger matching**: Prevents false positives
119
+ - **TSV utilities**: Centralized parsing helpers
120
+
121
+ ### Fixed
122
+ - **normalizeLabels**: Handles null, undefined, numbers, nested arrays
123
+ - **readJsonFile**: Proper error messages for missing vs invalid JSON
124
+ - **Wizard scope resolution**: Uses path.basename() instead of split/pop
125
+ - **Trigger matching**: Word boundaries prevent partial matches
126
+
127
+ ## [3.2.0] - 2026-04-27
128
+
129
+ ### Added
130
+ - Recursive self-improvement loop support
131
+ - Mermaid diagrams in documentation
132
+ - Enhanced subagent pool with meta-orchestrator role
133
+ - AGENTS.md guide
134
+ - verify-package.sh script
135
+
136
+ ### Changed
137
+ - README overhaul with banner and diagrams
138
+ - Wiki pages with architecture charts
139
+ - GitHub Actions for automated releases
140
+ - Package.json alignment with AutoShip
141
+
142
+ ## [3.1.0] - 2026-04-13
143
+
144
+ ### Added
145
+ - OpenCode-only runtime
146
+ - ESM module support
147
+ - TypeScript strict mode
148
+
149
+ ## [2.2.1] - 2026-04-13
150
+
151
+ ### Fixed
152
+ - Documentation fixes
153
+ - Type definitions
154
+
155
+ ## [2.2.0] - 2026-04-13
156
+
157
+ ### Added
158
+ - Initial release
159
+ - Core iteration loop
160
+ - Subagent-first orchestration
161
+
162
+ ## [2.1.0] - 2026-04-01
163
+
164
+ ### Added
165
+ - Full documentation
166
+ - New flags and protocol improvements
package/INSTALL.md CHANGED
@@ -15,10 +15,10 @@ Both runtimes share the same state format (`.autoresearch/state.json`) and CLI (
15
15
 
16
16
  ### One-Line OpenCode Install
17
17
 
18
- Paste this one line into OpenCode to install and verify Auto Research. This URL is pinned to the immutable `v3.5.0` release tag:
18
+ Paste this one line into OpenCode to install and verify Auto Research. This URL is pinned to the immutable `v3.6.1` release tag:
19
19
 
20
20
  ```text
21
- Fetch and follow instructions from https://raw.githubusercontent.com/Maleick/AutoResearch/refs/tags/v3.5.0/INSTALL.md
21
+ Fetch and follow instructions from https://raw.githubusercontent.com/Maleick/AutoResearch/refs/tags/v3.6.1/INSTALL.md
22
22
  ```
23
23
 
24
24
  ### Prerequisites
package/README.md CHANGED
@@ -5,7 +5,7 @@
5
5
  </p>
6
6
 
7
7
  <p align="center">
8
- <img src="https://img.shields.io/badge/version-v3.6.0-58a6ff?style=flat" alt="v3.6.0">
8
+ <img src="https://img.shields.io/badge/version-v3.8.0-58a6ff?style=flat" alt="v3.8.0">
9
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>
10
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>
11
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>
@@ -48,30 +48,30 @@ Auto Research is a **subagent-first autonomous iteration engine** that runs stru
48
48
 
49
49
  ```mermaid
50
50
  flowchart LR
51
- A[Plan] --> B[Modify]
52
- B --> C[Verify]
53
- C --> D{Keep?}
54
- D -->|yes| E[Learn]
51
+ A["Plan"] --> B["Modify"]
52
+ B --> C["Verify"]
53
+ C --> D{"Keep?"}
54
+ D -->|yes| E["Learn"]
55
55
  D -->|no| B
56
- E --> F[Memory]
56
+ E --> F["Memory"]
57
57
  F --> A
58
58
  ```
59
59
 
60
60
  ```mermaid
61
61
  flowchart TD
62
- A[Goal + Metric + Verify] --> B[Baseline]
63
- B --> C[Pool Init]
64
- C --> D[Iteration N]
65
- D --> E[Subagent Context]
66
- E --> F[Focused Change]
67
- F --> G[Mechanical Verify]
68
- G --> H{Strict Improvement?}
69
- H -->|yes| I[Keep + Record]
70
- H -->|no| J[Discard + Reset]
71
- I --> K{Stop Condition?}
62
+ A["Goal + Metric + Verify"] --> B["Baseline"]
63
+ B --> C["Pool Init"]
64
+ C --> D["Iteration N"]
65
+ D --> E["Subagent Context"]
66
+ E --> F["Focused Change"]
67
+ F --> G["Mechanical Verify"]
68
+ G --> H{"Strict Improvement?"}
69
+ H -->|yes| I["Keep + Record"]
70
+ H -->|no| J["Discard + Reset"]
71
+ I --> K{"Stop Condition?"}
72
72
  J --> K
73
73
  K -->|no| D
74
- K -->|yes| L[Report + Memory]
74
+ K -->|yes| L["Report + Memory"]
75
75
  ```
76
76
 
77
77
  ## The Self-Improvement Loop
@@ -80,17 +80,17 @@ Auto Research can run on itself. The recursive loop adds a meta-orchestrator tha
80
80
 
81
81
  ```mermaid
82
82
  flowchart TD
83
- A[Meta-Goal: Improve AutoResearch] --> B[Run Child Loop]
84
- B --> C[Measure: Tests pass? Docs improved?]
85
- C --> D{Child Success?}
86
- D -->|yes| E[Update Memory + Strategy]
87
- D -->|no| F[Adapt Approach]
88
- E --> G[Persist Learnings]
83
+ A["Meta-Goal: Improve AutoResearch"] --> B["Run Child Loop"]
84
+ B --> C["Measure: Tests pass? Docs improved?"]
85
+ C --> D{"Child Success?"}
86
+ D -->|yes| E["Update Memory + Strategy"]
87
+ D -->|no| F["Adapt Approach"]
88
+ E --> G["Persist Learnings"]
89
89
  F --> B
90
- G --> H[Meta-Report]
91
- H --> I{Meta-Stop?}
90
+ G --> H["Meta-Report"]
91
+ H --> I{"Meta-Stop?"}
92
92
  I -->|no| B
93
- I -->|yes| J[Archive Run]
93
+ I -->|yes| J["Archive Run"]
94
94
  ```
95
95
 
96
96
  See [`skills/autoresearch/references/self-improve-loop.md`](skills/autoresearch/references/self-improve-loop.md) for the full recursive loop specification.
@@ -99,10 +99,10 @@ See [`skills/autoresearch/references/self-improve-loop.md`](skills/autoresearch/
99
99
 
100
100
  ### OpenCode
101
101
 
102
- For OpenCode, paste this one-line install prompt into your agent. This URL is pinned to the immutable `v3.5.0` release instructions:
102
+ For OpenCode, paste this one-line install prompt into your agent. This URL is pinned to the immutable `v3.6.1` release instructions:
103
103
 
104
104
  ```text
105
- Fetch and follow instructions from https://raw.githubusercontent.com/Maleick/AutoResearch/refs/tags/v3.5.0/INSTALL.md
105
+ Fetch and follow instructions from https://raw.githubusercontent.com/Maleick/AutoResearch/refs/tags/v3.6.1/INSTALL.md
106
106
  ```
107
107
 
108
108
  Recommended plugin install in `opencode.json`:
@@ -226,10 +226,13 @@ cat .autoresearch/state.json | jq .
226
226
  | Command | Purpose |
227
227
  | --- | --- |
228
228
  | `autoresearch init` | Initialize a run |
229
+ | `autoresearch goal init` | Create a `GOAL.md` goal definition file (interactive or from flags) |
229
230
  | `autoresearch wizard` | Generate setup summary |
230
231
  | `autoresearch status` | Print run status |
231
232
  | `autoresearch explain` | Human-readable run state |
232
233
  | `autoresearch history` | Show recent iteration log |
234
+ | `autoresearch scores` | Show score trend history |
235
+ | `autoresearch badge` | Generate score/component badge markdown + SVG |
233
236
  | `autoresearch config` | Show runtime configuration |
234
237
  | `autoresearch report` | Generate markdown report |
235
238
  | `autoresearch summary` | Aggregate stats across runs |
@@ -244,21 +247,58 @@ cat .autoresearch/state.json | jq .
244
247
  | `autoresearch doctor` | Verify installation |
245
248
  | `autoresearch help` | Show usage |
246
249
 
250
+ ### `autoresearch goal init`
251
+
252
+ Create a `GOAL.md` goal definition file. Supports interactive wizard, CLI flags, and stdin JSON.
253
+
254
+ **Interactive (TTY):**
255
+ ```bash
256
+ autoresearch goal init
257
+ ```
258
+
259
+ **From flags (non-interactive):**
260
+ ```bash
261
+ autoresearch goal init \
262
+ --goal "Reduce test failures" \
263
+ --metric failures \
264
+ --direction lower \
265
+ --verify "npm test" \
266
+ --guard "npm run lint"
267
+ ```
268
+
269
+ **From a preset template:**
270
+ ```bash
271
+ autoresearch goal init --template performance # benchmark_ms / lower / npm run bench
272
+ autoresearch goal init --template quality # test_failures / lower / npm test
273
+ autoresearch goal init --template coverage # coverage_pct / higher / npm run coverage
274
+ ```
275
+
276
+ **From stdin JSON (CI / scripted use):**
277
+ ```bash
278
+ echo '{"goal":"reduce latency","metric":"p99_ms","direction":"lower","verify":"npm run bench"}' \
279
+ | autoresearch goal init
280
+ ```
281
+
282
+ **Dry-run preview:**
283
+ ```bash
284
+ autoresearch goal init --template performance --dry-run
285
+ ```
286
+
247
287
  ## Architecture
248
288
 
249
289
  ```mermaid
250
290
  flowchart LR
251
- A[OpenCode /autoresearch] --> B[CLI]
252
- H[Hermes Cronjob] --> B
253
- B --> C[Run Manager]
254
- C --> D[State JSON]
255
- C --> E[Results TSV]
256
- C --> F[Subagent Pool]
257
- F --> G[Orchestrator]
258
- F --> I[Scout]
259
- F --> J[Analyst]
260
- F --> K[Verifier]
261
- F --> L[Synthesizer]
291
+ A["OpenCode /autoresearch"] --> B["CLI"]
292
+ H["Hermes Cronjob"] --> B
293
+ B --> C["Run Manager"]
294
+ C --> D["State JSON"]
295
+ C --> E["Results TSV"]
296
+ C --> F["Subagent Pool"]
297
+ F --> G["Orchestrator"]
298
+ F --> I["Scout"]
299
+ F --> J["Analyst"]
300
+ F --> K["Verifier"]
301
+ F --> L["Synthesizer"]
262
302
  ```
263
303
 
264
304
  ## Runtime Artifacts
@@ -271,6 +311,10 @@ flowchart LR
271
311
  | `autoresearch-memory.md` | Reusable memory for later runs |
272
312
  | `.autoresearch/launch.json` | Background launch manifest |
273
313
 
314
+ ## Examples
315
+
316
+ See [docs/examples/README.md](docs/examples/README.md) for reproducible run examples with complete state, results, and report artifacts.
317
+
274
318
  ## Self-Improvement Mode
275
319
 
276
320
  Run Auto Research on its own codebase:
package/VERSION CHANGED
@@ -1 +1 @@
1
- 3.6.0
1
+ 3.8.0
@@ -0,0 +1,9 @@
1
+ export declare function slugifyBadgeToken(value: string): string;
2
+ /**
3
+ * Maps normalized score quality to common badge colors.
4
+ * Returns blue when no normalized ratio is available (for unknown/indeterminate score quality).
5
+ */
6
+ export declare function pickBadgeColor(ratio: number | null): string;
7
+ export declare function renderBadgeSvg(label: string, value: string, color: string): string;
8
+ export declare function renderBadgeMarkdown(label: string, value: string, svgPath: string, markdownPath: string): string;
9
+ //# sourceMappingURL=badge.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"badge.d.ts","sourceRoot":"","sources":["../src/badge.ts"],"names":[],"mappings":"AAoCA,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAGvD;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,MAAM,CAM3D;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CA8BlF;AAED,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,MAAM,CAG/G"}
package/dist/badge.js ADDED
@@ -0,0 +1,86 @@
1
+ import { basename, dirname, relative, sep } from "path";
2
+ const xmlEscapes = {
3
+ "&": "&amp;",
4
+ "<": "&lt;",
5
+ ">": "&gt;",
6
+ '"': "&quot;",
7
+ "'": "&apos;",
8
+ };
9
+ const escapeXml = (value) => value.replace(/[&<>"']/g, (char) => xmlEscapes[char]);
10
+ const MIN_SEGMENT_WIDTH = 40;
11
+ const SEGMENT_PADDING = 10;
12
+ const CHAR_WIDTH_ESTIMATE = 7;
13
+ const markdownEscapes = {
14
+ "\\": "\\\\",
15
+ "`": "\\`",
16
+ "*": "\\*",
17
+ "_": "\\_",
18
+ "{": "\\{",
19
+ "}": "\\}",
20
+ "[": "\\[",
21
+ "]": "\\]",
22
+ "(": "\\(",
23
+ ")": "\\)",
24
+ "#": "\\#",
25
+ "+": "\\+",
26
+ "-": "\\-",
27
+ ".": "\\.",
28
+ "!": "\\!",
29
+ "|": "\\|",
30
+ };
31
+ const escapeMarkdown = (value) => value.replace(/[\\`*_{}\[\]()#+\-.!|]/g, (char) => markdownEscapes[char]);
32
+ export function slugifyBadgeToken(value) {
33
+ const slug = value.trim().toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "");
34
+ return slug.length > 0 ? slug : "component";
35
+ }
36
+ /**
37
+ * Maps normalized score quality to common badge colors.
38
+ * Returns blue when no normalized ratio is available (for unknown/indeterminate score quality).
39
+ */
40
+ export function pickBadgeColor(ratio) {
41
+ if (ratio === null || !Number.isFinite(ratio))
42
+ return "#007ec6";
43
+ if (ratio >= 0.9)
44
+ return "#44cc11";
45
+ if (ratio >= 0.75)
46
+ return "#97ca00";
47
+ if (ratio >= 0.5)
48
+ return "#dfb317";
49
+ return "#e05d44";
50
+ }
51
+ export function renderBadgeSvg(label, value, color) {
52
+ const safeLabel = String(label).trim() || "score";
53
+ const safeValue = String(value).trim() || "—";
54
+ const labelWidth = Math.max(MIN_SEGMENT_WIDTH, SEGMENT_PADDING + safeLabel.length * CHAR_WIDTH_ESTIMATE);
55
+ const valueWidth = Math.max(MIN_SEGMENT_WIDTH, SEGMENT_PADDING + safeValue.length * CHAR_WIDTH_ESTIMATE);
56
+ const totalWidth = labelWidth + valueWidth;
57
+ const centerLabel = Math.floor(labelWidth / 2);
58
+ const centerValue = labelWidth + Math.floor(valueWidth / 2);
59
+ return [
60
+ `<svg xmlns="http://www.w3.org/2000/svg" width="${totalWidth}" height="20" role="img" aria-label="${escapeXml(safeLabel)}: ${escapeXml(safeValue)}">`,
61
+ `<linearGradient id="s" x2="0" y2="100%">`,
62
+ `<stop offset="0" stop-color="#fff" stop-opacity=".7"/>`,
63
+ `<stop offset=".1" stop-color="#aaa" stop-opacity=".1"/>`,
64
+ `<stop offset=".9" stop-color="#000" stop-opacity=".3"/>`,
65
+ `<stop offset="1" stop-color="#000" stop-opacity=".5"/>`,
66
+ `</linearGradient>`,
67
+ `<clipPath id="r"><rect width="${totalWidth}" height="20" rx="3" fill="#fff"/></clipPath>`,
68
+ `<g clip-path="url(#r)">`,
69
+ `<rect width="${labelWidth}" height="20" fill="#555"/>`,
70
+ `<rect x="${labelWidth}" width="${valueWidth}" height="20" fill="${escapeXml(color)}"/>`,
71
+ `<rect width="${totalWidth}" height="20" fill="url(#s)"/>`,
72
+ `</g>`,
73
+ `<g fill="#fff" text-anchor="middle" font-family="Verdana,Geneva,DejaVu Sans,sans-serif" font-size="11">`,
74
+ `<text x="${centerLabel}" y="15" fill="#010101" fill-opacity=".3">${escapeXml(safeLabel)}</text>`,
75
+ `<text x="${centerLabel}" y="14">${escapeXml(safeLabel)}</text>`,
76
+ `<text x="${centerValue}" y="15" fill="#010101" fill-opacity=".3">${escapeXml(safeValue)}</text>`,
77
+ `<text x="${centerValue}" y="14">${escapeXml(safeValue)}</text>`,
78
+ `</g>`,
79
+ `</svg>`,
80
+ ].join("");
81
+ }
82
+ export function renderBadgeMarkdown(label, value, svgPath, markdownPath) {
83
+ const relativeSvgPath = relative(dirname(markdownPath), svgPath).split(sep).join("/") || basename(svgPath);
84
+ return `![${escapeMarkdown(`${label}: ${value}`)}](${escapeMarkdown(relativeSvgPath)})`;
85
+ }
86
+ //# sourceMappingURL=badge.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"badge.js","sourceRoot":"","sources":["../src/badge.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,GAAG,EAAE,MAAM,MAAM,CAAC;AAExD,MAAM,UAAU,GAA2B;IACzC,GAAG,EAAE,OAAO;IACZ,GAAG,EAAE,MAAM;IACX,GAAG,EAAE,MAAM;IACX,GAAG,EAAE,QAAQ;IACb,GAAG,EAAE,QAAQ;CACd,CAAC;AAEF,MAAM,SAAS,GAAG,CAAC,KAAa,EAAU,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,UAAU,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,UAAU,CAAC,IAAI,CAAE,CAAC,CAAC;AACpG,MAAM,iBAAiB,GAAG,EAAE,CAAC;AAC7B,MAAM,eAAe,GAAG,EAAE,CAAC;AAC3B,MAAM,mBAAmB,GAAG,CAAC,CAAC;AAE9B,MAAM,eAAe,GAA2B;IAC9C,IAAI,EAAE,MAAM;IACZ,GAAG,EAAE,KAAK;IACV,GAAG,EAAE,KAAK;IACV,GAAG,EAAE,KAAK;IACV,GAAG,EAAE,KAAK;IACV,GAAG,EAAE,KAAK;IACV,GAAG,EAAE,KAAK;IACV,GAAG,EAAE,KAAK;IACV,GAAG,EAAE,KAAK;IACV,GAAG,EAAE,KAAK;IACV,GAAG,EAAE,KAAK;IACV,GAAG,EAAE,KAAK;IACV,GAAG,EAAE,KAAK;IACV,GAAG,EAAE,KAAK;IACV,GAAG,EAAE,KAAK;IACV,GAAG,EAAE,KAAK;CACX,CAAC;AAEF,MAAM,cAAc,GAAG,CAAC,KAAa,EAAU,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,yBAAyB,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,eAAe,CAAC,IAAI,CAAE,C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