agentleFS
uditgoenkauditgoenka/autoresearch/AGENTS.md

autoresearch

AGENTS.md6.5k starsChanged 7 months agoMITView on GitHub

Drop this file into your project root. Any AI agent (Claude Code, Codex, OpenCode, Gemini CLI, etc.) can then use Autoresearch immediately. Autonomous goal-directed iteration based on Karpathy's autoresearch. One metric, constrained scope, fast verification, automatic rollback, git as memory. Works on ANY domain — code, content, marketing, sales, DevOps — anything with a measurable metric. Core loop: Modify → Verify → Keep/Discard → Repeat. Restart session after install. All 14 commands become available as /autoresearch and /autoresearch:<subcommand>. Invoke via…

Trending

More talk lately.about the whole repository

Dec 2025: 0 mentionsJan 2026: 0 mentionsFeb 2026: 0 mentionsMar 2026: 2 mentionsApr 2026: 3 mentionsMay 2026: 9 mentionsJun 2026: 1 mentionJul 2026: 1 mentionAug 2026: 0 mentionsSep 2026: 1 mentionOct 2026: 5 mentionsNov 2026: 0 mentions
Dec 2025Jun 2026Nov 2026
Mentions a month of the uditgoenka/autoresearch repository that our weekly crawl found. There is no adoption data for this file yet.

Who's talking about uditgoenka/autoresearch

The biggest 5 of 22 mentions linking to the repository that our crawl found. Each line is their own headline.

See all 22

Talked about on GitHub and Bluesky (22 times).

On GitHub · 21

16 more on GitHub
  • Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.

    Of the AGENTS.md files we read, the 11,773 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.

  • In this repository2 other files it gives its agents.

The file

We split this AGENTS.md into the rules it gives an agent

3 rules. About 0 are common, 3 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Every iteration is logged in TSV format:

    line 274
  2. Distinctive:

    Read this file for the command surface and configuration contract

    line 303
  3. Distinctive:

    Use the core loop protocol: review → change → commit → verify → keep/revert → log

    line 304

≈ “Common” is an estimate: at least 1 in 5 of the 16,595 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
AGENTS.md

AGENTS.md — Autoresearch

Drop this file into your project root. Any AI agent (Claude Code, Codex, OpenCode, Gemini CLI, etc.) can then use Autoresearch immediately.

What is Autoresearch?

Autonomous goal-directed iteration based on Karpathy's autoresearch. One metric, constrained scope, fast verification, automatic rollback, git as memory. Works on ANY domain — code, content, marketing, sales, DevOps — anything with a measurable metric.

Core loop: Modify → Verify → Keep/Discard → Repeat.


Installation

Claude Code (plugin)

/plugin marketplace add uditgoenka/autoresearch
/plugin install autoresearch@autoresearch

Restart session after install. All 14 commands become available as /autoresearch and /autoresearch:<subcommand>.

Codex (plugin)

git clone https://github.com/uditgoenka/autoresearch.git
cd autoresearch
./scripts/install.sh --codex --global

Invoke via the $autoresearch mention syntax: $autoresearch <subcommand> [flags].

Manual (any agent)

Copy the skill files into your agent's skill directory:

git clone https://github.com/uditgoenka/autoresearch.git

# Claude Code
cp -r autoresearch/claude-plugin/skills/autoresearch .claude/skills/autoresearch
cp -r autoresearch/claude-plugin/commands/autoresearch .claude/commands/autoresearch
cp autoresearch/claude-plugin/commands/autoresearch.md .claude/commands/autoresearch.md

# Codex
cp -r autoresearch/plugins/autoresearch ~/.agents/plugins/autoresearch

Commands

CommandPurpose
autoresearchAutonomous iteration loop (unlimited or bounded with Iterations: N)
autoresearch:planInteractive wizard: Goal → Scope, Metric, Direction, Verify config
autoresearch:debugAutonomous bug-hunting — scientific method + iterative investigation
autoresearch:fixAutonomous error repair — one fix per iteration until zero errors
autoresearch:securitySTRIDE + OWASP + red-team security audit (read-only unless --fix)
autoresearch:shipUniversal shipping workflow — 8 phases, 9 shipment types
autoresearch:scenarioScenario exploration — 12 dimensions, edge cases, derivative scenarios
autoresearch:predictMulti-persona swarm — 5 expert perspectives before acting
autoresearch:learnAutonomous documentation engine — scout, generate, validate, fix
autoresearch:reasonAdversarial refinement — blind judge panel for subjective domains
autoresearch:probeAdversarial requirement / assumption interrogation — 8 personas probe to mechanical saturation, emits ready-to-run autoresearch config

Quick Start

Basic autonomous loop

autoresearch
Goal: Increase test coverage from 72% to 90%
Scope: src/**/*.test.ts, src/**/*.ts
Metric: coverage % (higher is better)
Verify: npm test -- --coverage | grep "All files"
Iterations: 50

Don't know what metric to use?

autoresearch:plan
Goal: Make the API respond faster

The wizard walks you through scope, metric, direction, and verify — with dry-run validation.

Hunt all bugs

autoresearch:debug
Scope: src/api/**/*.ts
Symptom: API returns 500 on POST /users
Iterations: 20

Fix all errors

autoresearch:fix

Auto-detects broken tests/types/lint/build, fixes one at a time, stops at zero errors.

Security audit

autoresearch:security
Scope: src/**/*.ts
Iterations: 10

Ship a PR

autoresearch:ship --auto

Explore edge cases

autoresearch:scenario
Scenario: User attempts checkout with expired card
Iterations: 25

Get expert opinions before acting

autoresearch:predict --chain debug
Scope: src/auth/**/*.ts

Refine a subjective decision

autoresearch:reason
Task: Should we use event sourcing for order management?
Domain: software
Iterations: 8

Configuration Fields

FieldRequiredDescription
GoalYesWhat you want to achieve (plain language)
ScopeYesGlob patterns for files the agent can modify
MetricYesWhat number to optimize (higher/lower + unit)
VerifyYesShell command that outputs the metric value
GuardNoSafety command that must always pass (prevents regressions)
IterationsNoBounded run — stop after N iterations (default: unlimited)
DirectionNohigher or lower — which direction is better

Flags

Core loop (autoresearch)

FlagPurpose
--scope <glob>Override scope
--iterations <N>Bounded iteration count

Security (autoresearch:security)

FlagPurpose
--diffOnly audit changed files
--fixAuto-fix Critical/High findings
--fail-on <severity>Non-zero exit for CI/CD gating

Ship (autoresearch:ship)

FlagPurpose
--autoAuto-approve if checklist passes
--dry-runValidate without shipping
--checklist-onlyJust check readiness
--rollbackUndo last ship
--monitor <N>Post-ship monitoring (minutes)

Debug (autoresearch:debug)

FlagPurpose
--fixAfter hunting, auto-switch to fix mode
--scope <glob>Limit investigation scope
--symptom "<text>"Pre-fill symptom

Fix (autoresearch:fix)

FlagPurpose
--target <command>Explicit verify command
--guard <command>Safety command
--category <type>Only fix: test, type, lint, or build
--from-debugRead findings from latest debug session

Predict (autoresearch:predict)

FlagPurpose
--chain <commands>Chain output to other commands

Reason (autoresearch:reason)

FlagPurpose
--iterations <N>Bounded rounds
--judges <N>Judge count (3-7, odd preferred)
--convergence <N>Consecutive wins to converge (default: 3)
--mode <mode>convergent, creative, debate
--domain <type>software, product, business, security, research, content
--chain <targets>Chain converged output to other commands

Learn (autoresearch:learn)

FlagPurpose
--mode <mode>init, update, check, summarize
--depth <level>shallow, standard, deep
--file <path>Update single doc

Scenario (autoresearch:scenario)

FlagPurpose
--domain <type>software, product, business, security, marketing
--depth <level>shallow, standard, deep
--format <type>use-cases, user-stories, test-scenarios, threat-scenarios
--focus <area>edge-cases, failures, security, scale

Chaining Commands

Commands can be chained with --chain:

autoresearch:debug --fix                      # debug → auto-fix
autoresearch:predict --chain debug            # predict → debug
autoresearch:predict --chain scenario,debug,fix  # full quality pipeline
autoresearch:reason --chain predict           # converge → stress-test
autoresearch:reason --chain plan,fix          # converge → implement
autoresearch:probe --chain plan,autoresearch  # interrogate → config → loop
autoresearch:probe --chain reason             # interrogate → debate → converge

8 Critical Rules

  1. Loop until done — unbounded: forever. Bounded: N times then summarize.
  2. Read before write — understand full context before modifying.
  3. One change per iteration — atomic changes. If it breaks, you know why.
  4. Mechanical verification only — no subjective "looks good." Use metrics.
  5. Automatic rollback — failed changes revert instantly via git revert.
  6. Simplicity wins — equal results + less code = KEEP.
  7. Git is memory — experiments committed with experiment: prefix, agent reads git log + git diff before each iteration.
  8. When stuck, think harder — re-read, combine near-misses, try radical changes.

Results Tracking

Every iteration is logged in TSV format:

iteration  commit   metric  delta   status    description
0          a1b2c3d  85.2    0.0     baseline  initial state
1          b2c3d4e  87.1    +1.9    keep      add tests for auth edge cases
2          -        86.5    -0.6    discard   refactor test helpers (broke 2 tests)
3          c3d4e5f  88.3    +1.2    keep      add error handling tests

Agent-Specific Notes

Claude Code

  • Commands are invoked as /autoresearch and /autoresearch:<subcommand>
  • Interactive setup uses AskUserQuestion when context is missing
  • Skill files: .claude/skills/autoresearch/SKILL.md + references/*.md

Codex

  • Commands are invoked as plain text: autoresearch and autoresearch:<subcommand>
  • Interactive setup uses request_user_input or direct question batches
  • Plugin files: plugins/autoresearch/ with skills/
  • Command contracts live in each command file under plugins/autoresearch/skills/autoresearch/

Other Agents (OpenCode, Gemini CLI, etc.)

  • Read this file for the command surface and configuration contract
  • Use the core loop protocol: review → change → commit → verify → keep/revert → log
  • Git is required — the loop uses git commit, git revert, git log, git diff
  • Each iteration must be atomic (one change, one commit, one verification)
  • For detailed workflow references, see: claude-plugin/skills/autoresearch/references/*.md

Repository Structure

autoresearch/
├── AGENTS.md                          ← You are here
├── README.md                          ← Full documentation
├── COMPARISON.md                      ← Karpathy's vs Claude Autoresearch
├── guide/                             ← Comprehensive guides per command
├── claude-plugin/                     ← Claude Code distribution package
│   ├── skills/autoresearch/SKILL.md   ← Main skill + references/
│   └── commands/autoresearch/         ← Subcommand registrations
└── plugins/autoresearch/              ← Codex distribution package
    └── skills/autoresearch/SKILL.md   ← Codex skill router + references/

License

MIT — see LICENSE.

Credits

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.