layer-autoresearch
Skill4 starsChanged 34 days agoMITView on GitHub
Contributor-only autonomous keep/discard experiment loop (after karpathy/autoresearch) that edits Flisk's L1-L4 Docker layer generators in a flisk checkout and keeps only changes that lower idle memory per service, toward 100 services on a 16 GB machine. Use when asked to run autoresearch on the Docker layers or to optimise the golden/runtime layers experimentally. To only measure a stack, use flisk-benchmark.
- Deletes or force-pushes
1 other project uses a version of this.
Adopted by
Most recently taken up by
- flisk-sh/fliskword for word, first seen Nov 15, 2026
Other versions1 project uses a version of this.
Word for word · 1
- flisk-sh/flisk★ 49100% same
Edited · 0
None found.
Wrote their own version · 0
None found.
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository37 other files it gives its agents.
- AGENTS.mdAGENTS.md
- llms.txtllms.txt
- flisk-agentsSkill
- flisk-benchmarkSkill
- flisk-build-runtimesSkill
- flisk-byoSkill
- flisk-contributingSkill
- flisk-databasesSkill
- flisk-dataSkill
- flisk-demo-bubblesSkill
- flisk-deploy-awsSkill
- flisk-deploy-azureSkill
- flisk-deploy-cloudflareSkill
- flisk-deploy-digitaloceanSkill
- flisk-deploy-flySkill
- flisk-deploy-gcpSkill
- flisk-deploy-herokuSkill
- flisk-deploy-railwaySkill
- flisk-deploy-renderSkill
- flisk-deploy-vercelSkill
- flisk-doctorSkill
- flisk-dry-runSkill
- flisk-frontendSkill
- flisk-generated-filesSkill
- flisk-helmSkill
- flisk-import-composeSkill
- flisk-import-procfileSkill
- flisk-layoutSkill
- flisk-portsSkill
- flisk-scaffoldSkill
- flisk-secretsSkill
- flisk-service-jsonSkill
- flisk-starlark-perfSkill
- flisk-troubleshootSkill
- flisk-uiSkill
- flisk-unfollowersSkill
- flisk-upgradeSkill
The file
We split this skill into the rules it gives an agent
9 rules. About 0 are common, 1 is distinctive, and 8 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
8
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 18
Ask the user whether any tool auto-commits or pushes working-tree edits in this checkout.
- Distinctive: line 19
Read the in-scope files in full:
- Very specific: line 21
Read-only ground truth: scripts/autoresearch/layer-eval.sh, scripts/benchmark/container-scale.ts, …
- Very specific: line 23
Create an untracked autoresearch-results.tsv with the header commit mem_mib image_mib status description.
- Very specific: line 28
Run scripts/autoresearch/layer-eval.sh > run.log 2>&1 (about 5-10 minutes).
- Very specific: line 31
Tie-breaker: if memory is within 0.5 MiB of the best, a lower unique_per_service_mib or service_image_mib wins, then simpler code.
- Very specific: line 47
Run the eval, redirected to run.log (don't flood context).
- Very specific: line 48
If there's no --- block, tail -n 50 run.log.
- Very specific: line 50
If the metric improved and status: ok, keep the commit.
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill 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.
Files
Layer autoresearch
Adapted from karpathy/autoresearch program.md. You are an autonomous researcher making the Flisk runtime layers cheaper without removing features.
Setup (with the user, once)
- Agree a run tag (e.g.
sep25). Creategit checkout -b autoresearch/<tag>frommain. The branch must be new. - Ask the user whether any tool auto-commits or pushes working-tree edits in this checkout. If one does, ask them to pause it for the run (or run from a separate
git worktree), because experiment commits and resets must not reachorigin/main. - Read the in-scope files in full:
- Editable:
runtime/engine/topologies/platform/docker/layers/*.star,runtime/engine/topologies/platform/docker/layers/prisma/*.star,runtime/engine/topologies/platform/docker/build/golden_image_dockerfile.star,runtime/engine/topologies/platform/docker/config/healthcheck.star. - Read-only ground truth:
scripts/autoresearch/layer-eval.sh,scripts/benchmark/container-scale.ts,tests/tilt-engine/test_runtime_container_footprint.py, and any spec for the runtime container footprint underopenspec/.
- Editable:
- The eval needs a Flisk project with at least
LAYER_EVAL_SAMPLE(default 20) services. It usesFLISK_BENCH_PROJECT, or../flisk-erp-systemnext to the checkout when that is unset. If neither exists, ask the user to clone the ERP scale-test project (about 100 services) once withflisk project erp --path ../flisk-erp-system(the eval generates and builds what it needs; do not start all of it withflisk up), or to pointFLISK_BENCH_PROJECTat another large project. - Create an untracked
autoresearch-results.tsvwith the headercommit mem_mib image_mib status description. - Confirm with the user, then start.
Experiment
Run scripts/autoresearch/layer-eval.sh > run.log 2>&1 (about 5-10 minutes). Read the results with grep -A20 '^---' run.log.
- Primary metric:
mem_per_service_mib, lower is better. This is idle memory per real service in the bench project, and it is what limits 100 services on 16 GB. - Tie-breaker: if memory is within 0.5 MiB of the best, a lower
unique_per_service_miborservice_image_mibwins, then simpler code. - Hard constraints.
status: okrequires all 20 services healthy, zero crashes, and passing feature tests. Anything else is a discard, or a crash if it didn't run. - Never edit the eval harness, benchmark, tests or spec. Never remove a user-facing feature: Prisma, Infisical entrypoint, hugo-as-feature, healthchecks, signal handling. Don't add dependencies.
Candidate ideas from earlier measurements (re-measure before relying on them):
- Duplicate
node_modulescopy in the L4 backend runtime (4.2 MB twice per service). - L1 installs
file,bashandopensslinto every runtime image (30 MB apk layer). Check what actually needs them first. - Bun runtime memory flags (e.g.
--smol) in the resolvedCMD. - Distroless or slimmer Bun base for L4.
- Per-service unique layer size.
Loop (never stop until the human interrupts)
- Note the current commit.
- Change the editable files with one idea.
git commit -m "<idea>".- Run the eval, redirected to
run.log(don't flood context). - If there's no
---block,tail -n 50 run.log. Fix trivial mistakes, otherwise logcrash. - Append a row to
autoresearch-results.tsv(untracked). - If the metric improved and
status: ok, keep the commit. Otherwisegit reset --hard HEAD~1. - An eval that runs longer than 20 minutes counts as a failure.
The first run is always the unmodified baseline.
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
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.

