/sage:sage-autoresearchfrom sage
Autonomous iteration workflow for optimizing codebases toward measurable outcomes. Invokes /sage-autoresearch to start a review-modify-verify loop with independent reviews, metrics tracking, and logging.
Ships in sage. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Load this skill when the user runs /sage-autoresearch or asks to autoresearch something (the Sage autoresearch workflow).
Hermes does NOT interpolate an in-body argument token. The user's arguments/flags arrive as a SEPARATE instruction line appended to this skill invocation. Wherever the steps below refer to "the user's arguments", use the text of that appended instruction line.
When a step calls for an independent review, invoke delegate_task against the sage-reviewer skill. Hermes delegate_task has NO toolset-restriction parameter — read-only is prompt-enforced, and you MUST verify afterward that the reviewer made no edits (e.g. git status unchanged) before accepting its verdict.
RULES (apply to every step — non-negotiable):
Autonomous iteration toward a measurable outcome. Read the full skill
at skills/autoresearch/SKILL.md before proceeding.
Scan .sage/work/ for directories containing autoresearch.jsonl.
If found, this is a resume — skip to Step 3.
If the user provided inline flags or a complete description, extract the fields. Otherwise, elicit:
Search sage-memory for priors on this repo + metric domain:
Save to .sage/work/YYYYMMDD-<slug>/brief.md using the frontmatter
format from skills/autoresearch/SKILL.md.
🔒 CHECKPOINT:
Sage: Autoresearch session configured.
Goal: [goal] Metric: [name] ([direction]), target: [target or "none"] Verify: [command] Scope: writable [globs], frozen [globs] Budget: [seconds]s per run, [max iterations or "unlimited"]
[A] Start — begin autonomous iteration [R] Revise — change configuration
Pick A/R, or tell me what to change.
Read skills/autoresearch/SKILL.md for the 8-phase loop protocol.
Read skills/autoresearch/references/loop-protocol.md for per-phase
detail.
Before each IDEATE: If sage-memory priors were found in Step 1,
use them. If stuck (5+ consecutive discard/crash), read
skills/autoresearch/references/stuck-recovery.md.
Agent phases (REVIEW, IDEATE, MODIFY):
Runtime phases (COMMIT, VERIFY, DECIDE, LOG, REPEAT):
The autoresearch runtime is an optional package (extracted from core in Phase 3, like sage-memory). Probe for it first, and degrade LOUDLY if absent (never silently fall through):
if python3 -c 'import autoresearch' 2>/dev/null; then
python3 -m autoresearch run --brief .sage/work/<slug>/brief.md --project .
else
echo "Sage: autoresearch runtime not installed — the optimization loop will"
echo "run in degraded (manual) mode. Install it for the deterministic runtime:"
echo " sage add xoai/sage-autoresearch"
# …and log one line to the initiative's decisions.md (R29 loud degradation).
fi
When the package is absent, handle the phases inline (below) and announce the degradation so the user knows the deterministic runtime isn't active.
Or handle phases inline:
git add -A && git commit -m "autoresearch #N: <desc>"After each iteration: Update autoresearch.md living doc with
what was tried and the result.
When the loop exits (target hit, budget exhausted, or interrupted):
Sage: Autoresearch complete.
Iterations: [N total], [K kept] Best: [metric_name]=[value] (started at [baseline]) Branch: autoresearch/[slug]
Top improvements:
[M] Merge — review and merge the branch [C] Continue — resume iterating [R] Results — show full results.tsv
Store to sage-memory (if available):
Prepend to decisions.md:
### YYYY-MM-DD — Autoresearch: [goal]
Result: [best value] from [baseline], [N] iterations, [K] kept.
Branch: autoresearch/[slug]. Top change: [best iteration description].
autoresearch/<slug> branch. The loop never commits to the default branch.[M] choice merges the branch. The
loop never merges, pushes, or opens a PR on its own.skills/autoresearch/references/stuck-recovery.md before the next IDEATE.the arguments the user provided alongside this skill invocation (delivered as a separate instruction line, NOT a literal token)
What SKILL.md sets; muted values are Claude Code's defaults
Generated from the plugin's indexed repository (xoai/sage) — no native marketplace selected
npx claudepluginhub p/xoai-sage33 skills in this plugin
/apiUse when designing, reviewing, or changing an HTTP, REST, or GraphQL API — endpoints, resource naming, error responses, pagination, versioning, idempotency, or API contracts between services./autoresearchAutonomous iteration toward a measurable outcome. Use when the user wants to optimize a numeric metric through repeated modify-verify cycles — reduce bundle size, increase test coverage, improve query time, lower readability score. Not for exploratory research, subjective judgment, or tasks without a verification command.
/baasUse when building on Firebase, Supabase, or a similar Backend-as-a-Service — writing security rules, modeling data for client queries, deciding whether logic needs a serverless function, or wiring real-time and client-direct access.Other plugins' skills for the same job