autoresearch
Measured software improvement loop for codebases. Use when asked to improve a project through small experiments with measurable metrics, baselines, safe scope, experiment budgets, commits/reverts, logs, and a final report across frontend, backend, mobile, CLI, parser/classifier, AI/ML, library, full-stack, test reliability, performance, build reliability, developer experience, accessibility, documentation, or code simplification work.
- License 许可
- MIT
- 最近更新
- 2026-11-12
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- autoresearch
- description
- Measured software improvement loop for codebases. Use when asked to improve a project through small experiments with measurable metrics, baselines, safe scope, experiment budgets, commits/reverts, logs, and a final report across frontend, backend, mobile, CLI, parser/classifier, AI/ML, library, full-stack, test reliability, performance, build reliability, developer experience, accessibility, documentation, or code simplification work.
02 资源文件 7
- 参考文档examples/backend-latency.md1.5 KB
- 参考文档examples/frontend-build.md1.5 KB
- 参考文档examples/parser-accuracy.md1.4 KB
- 参考文档examples/test-reliability.md1.8 KB
- 参考文档README.md1.8 KB
- 参考文档templates/autoresearch-plan.md1.3 KB
- 其他templates/results.tsv113 B
03 SKILL.md 正文
Autoresearch
Purpose
Use this skill to improve a software project through a measured experiment loop. The loop must ask clarifying questions, select a safe scope, establish a baseline, run small experiments, measure results, keep improvements, revert failures, and summarize findings.
Autoresearch is for improving a project. Do not use it to merely explain code, perform a one-shot requested edit, run broad refactors without metrics, or redesign unrelated product areas.
Required order
- Inspect the repo structure and identify available package scripts, test commands, benchmark commands, and project conventions.
- Ask clarifying questions before any baseline, branch creation for experiments, edits, or experiment loop.
- Refuse to proceed if no measurable metric exists.
- Establish a clean baseline.
- Run the experiment loop.
Never run autoresearch on a repo just because this skill file is being created or edited.
Clarifying questions
Ask concise questions that lock these decisions before proceeding:
- Project type: frontend app, backend API, mobile app, CLI tool, library/package, parser/classifier, AI/ML experiment, full-stack app, or unknown/mixed project.
- Main improvement target: build reliability, TypeScript errors, test pass rate, parser accuracy, bundle size, runtime performance, API latency, memory usage, accessibility, Lighthouse score, code simplification, flaky test reduction, developer experience, documentation quality, or another target.
- Exact metric: define the number or boolean being optimized and whether lower or higher is better.
- Metric command: the command that produces or verifies the metric, such as
npm run build,npm run typecheck,npm test,npm run test:parser,npm run lint,npm run analyze,npm run bench,pytest,go test ./...,cargo test, ordotnet test. - Approved scope: directories and files safe to modify.
- Forbidden scope: files, directories, systems, or behaviors that must not be touched.
- Experiment budget: number of experiments to run. Default to 10.
- Risk level: conservative, moderate, or aggressive.
- Git behavior: create a branch only, commit kept experiments, push branch to GitHub, or open a PR if tooling is available.
- Final output format: short summary, full experiment log, PR-ready report, or next-step recommendations.
Defaults for incomplete answers
Use these defaults only after asking:
- Project type: unknown/mixed.
- Experiment budget: 10.
- Stop early after 5 consecutive failed non-improving experiments.
- Risk level: conservative.
- Final output format: PR-ready report.
- Git behavior: create a branch and commit kept experiments locally; do not push or open a PR unless approved.
- Forbidden scope:
.envfiles, secrets, auth flows, payment logic, database migrations, lockfiles unless approved, generated files, unrelated UI redesigns, and public API changes unless approved.
Do not infer the exact metric. If the user gives a target without a measurable metric, ask again. If a metric command is missing, inspect likely commands and ask the user to approve one.
Safety boundaries
- Keep every experiment within approved scope.
- Prefer the smallest useful change.
- Avoid dependency changes unless explicitly approved.
- Do not alter secrets, credentials, environment files, auth, payments, migrations, generated files, or public APIs unless explicitly approved.
- Do not run destructive commands outside the intended repo.
- Do not keep changes that pass the metric but violate scope, introduce obvious regressions, or make the project harder to review.
- Do not hide failures. Log them.
Baseline procedure
- Confirm the working tree state with
git status --short --branch. - If unrelated user changes exist, do not overwrite or revert them. Ask how to handle them if they block the baseline.
- Create a branch named
autoresearch/[metric-or-goal], using a lowercase, hyphenated metric or goal. - Create local ignored logs in the repo root:
results.tsvrun.logautoresearch-notes.md
- Add these log files to
.git/info/exclude, not.gitignore. - Run the metric command once without edits.
- Write command output to
run.log. - Extract the baseline metric.
- Record the baseline in
results.tsvwith this tab-separated header:
experiment commit metric status description
Use this baseline row format:
baseline <commit-or-working-tree> <metric> baseline <metric command>
Experiment loop
For each experiment:
- State one hypothesis before editing.
- Make the smallest useful change inside approved scope.
- Check the changed files before measuring.
- Commit the experiment before measuring.
- Run the metric command.
- Append command output to
run.log. - Extract the metric using the same interpretation as baseline.
- Run any required safety checks for the project and scope.
- Keep the commit if it improves the metric and passes safety checks.
- Revert the commit with
git reset --hard HEAD~1if it regresses, breaks checks, crashes, changes forbidden scope, or cannot be measured. - Append one result row to
results.tsv.
Result rows must use:
<experiment-number> <commit-sha-or-reverted> <metric> <kept|reverted|crashed|blocked> <hypothesis/result summary>
Revert rules
Revert the current experiment with git reset --hard HEAD~1 when:
- The metric is worse.
- The metric command crashes after a change.
- Required checks fail.
- Forbidden files or behavior changed.
- The change exceeds approved scope.
- The metric cannot be extracted reliably.
If a command is broken before any experiment, stop and report that the baseline cannot be established. If the metric command becomes broken and cannot be repaired safely within approved scope, stop.
Stop conditions
Stop when any condition is met:
- Experiment budget is reached.
- 5 consecutive experiments fail to improve the metric.
- The metric command is broken and cannot be repaired safely.
- Required scope exceeds approved boundaries.
- The user asks to stop.
Git workflow
- Use
git status --short --branchbefore branching, before each commit, and before the final report. - Branch name:
autoresearch/[metric-or-goal]. - Commit each experiment before measuring.
- Keep improving commits in history.
- Reverted experiments should not remain in history after
git reset --hard HEAD~1. - Push or open a PR only if the user approved that Git behavior.
- Never fake a push or PR. Verify remote and branch state before reporting success.
Final report format
Include:
- Baseline metric.
- Final metric.
- Percentage improvement if applicable.
- Kept experiments.
- Discarded experiments.
- Crashed experiments.
- Top winning changes.
- Files changed.
- Risks introduced.
- Suggested next human-review tasks.
- Exact commands run.
Keep the final report proportional to the requested output format. For PR-ready reports, include a concise summary, validation, risk notes, and review checklist.
Example invocations
- "Use autoresearch to reduce TypeScript errors. Ask me questions first. Use
npm run typecheckas the metric command." - "Use autoresearch on parser fixtures. Improve fixture pass rate with
npm run test:parser. Only touchsrc/parserandfixtures." - "Use autoresearch to lower API p95 latency. Use the detected benchmark command. Do not touch auth, payments, or migrations."
- "Use autoresearch to reduce flaky tests. Use
npm test. Run 10 conservative experiments and give me a PR-ready report."
04 同仓库更多 Skills
winui-app
Bootstrap, develop, and design modern WinUI 3 desktop applications with C# and the Windows App SDK using official Microsoft guidance, WinUI Gallery patterns, Windows App SDK samples, and CommunityToolkit components. Use when creating a brand new app, preparing a machine for WinUI, reviewing, refactoring, planning, troubleshooting, environment-checking, or setting up WinUI 3 XAML, controls, navigation, windowing, theming, accessibility, responsiveness, performance, deployment, or related Windows app design and development work.
vercel-deploy
Deploy applications and websites to Vercel. Use when the user requests deployment actions like "deploy my app", "deploy and give me the link", "push this live", or "create a preview deployment".
security-best-practices
Perform language and framework specific security best-practice reviews and suggest improvements. Trigger only when the user explicitly requests security best practices guidance, a security review/report, or secure-by-default coding help. Trigger only for supported languages (python, javascript/typescript, go). Do not trigger for general code review, debugging, or non-security tasks.
playwright
Use when the task requires automating a real browser from the terminal (navigation, form filling, snapshots, screenshots, data extraction, UI-flow debugging) via `playwright-cli` or the bundled wrapper script.
openai-docs
Use when the user asks how to build with OpenAI products or APIs and needs up-to-date official documentation with citations, help choosing the latest model for a use case, or model upgrade and prompt-upgrade guidance; prioritize OpenAI docs MCP tools, use bundled references only as helper context, and restrict any fallback browsing to official OpenAI domains.
netlify-deploy
Deploy web projects to Netlify using the Netlify CLI (`npx netlify`). Use when the user asks to deploy, host, publish, or link a site/repo on Netlify, including preview and production deploys.