Localise Android performance regressions from a Perfetto trace down to a place in the code. The skills drive the echolot CLI, which is installed separately: pipx install echolot.
Find the cause of one Android performance regression with echolot. Opens an investigation, hands the loop to a subagent that starts clean, and closes the investigation with its answer. The echolot skill routes here once the config exists; use it directly when the human names a regression to hunt.
# The hunt
This is the main thread's part. `echolot guide hunt` prints it at length for
a host that does not list this skill, and the loop's guide is the subagent's.
1. `echolot doctor -q`, on its own. A non-zero exit: show what failed, and
stop. If it says a sandbox refused a port, ask to run it outside the
sandbox, as the message says, before you stop.
2. **Three facts, in the human's words**: what regressed against what ("it was
3 s, now 7 s"), which traces show it, and **after which change**. Ask for
the change even when the rest is clear. "Unknown" is an answer; not asking
is not.
3. **Open the investigation before anything is recorded**, unless you are
carrying on the one that is open:
```bash
echolot hunt "<what regressed, in their words>" --since "<the change, or unknown>"
```
Several scenarios in `echolot.yml`, as `echolot status` lists them: match
the question to one, ask when you cannot tell, and add `--scenario <name>`.
Every later `collect` and `analyze` is filed under it, and `echolot compare`
reads from it. It moves the scenario's loose traces aside, and stderr
names the directory. Those traces are this question's evidence only if the human
recorded them for it before asking; most often they are an earlier
question's last round or setup's probe capture. Exit 2 means
`echolot.yml` does not load: show the error and stop. Markers the previous
investigation left go before anything is recorded: `echolot mark --remove`,
and by hand the lines it lists. No traces recorded for this question:
`echolot collect -c echolot.yml -n 5`, or `-n 1` first after a change to
the runner config, as `echolot guide hunt` says.
4. **Hand the loop to a subagent that starts with none of this conversation**,
with this brief as its first message, filled in. `#<n>` is `opened #<n>`,
or the `→` row of `echolot hunt --list`; `Thresholds:` comes from the
`thresholds` column of `echolot report`: calibrated on the runs that hold
the regression means `--defaults`.
```text
Run `echolot guide loop` first and follow it: it is your guide to the loop.
Traces: <each trace file by name, from the directory `echolot hunt` set aside or from .echolot/traces>
Regressed: <what, against what>, after <the change, or "unknown">
Investigation #<n> is open: every `analyze` you run is filed under it, and `echolot compare` reads from it.
Thresholds: <the config's can be trusted | start with `echolot analyze --defaults`>
Doctor passed at <time>: do not run it again.
Instrumentation: <what `echolot domains --root .` found | none: start with `echolot mark`, not with reading the app>
```
**Do not run `echolot guide loop` yourself**: it is the subagent's, and here
it only fills this window. Then **wait for its conclusion**. Do not end
your turn while it runs: a turn that ends on "I will come back with its
output" may never get a next one. If your host has no subagent tool, even
among those it lists on request, the loop is yours: `echolot guide loop`,
in short passes.
5. **When the conclusion comes back, close the investigation first**, every
time and whatever it came to, and only then answer the human. Left for
after the answer, it is the step that gets skipped:
```bash
echolot hunt --done "<place> — <what happens there>; confidence <high|medium|low>"
```
Then show the conclusion as it is. If it does not say the markers are
gone, check, with the command `echolot guide hunt` gives. Say a low
confidence out loud, and a finding about the device is worth a run on
real hardware.Look back at how the last echolot session went and propose changes to the tool — its commands, its texts, its config. For whoever maintains echolot, not for the app being profiled. Use when asked how a session went or what echolot should change.
# Reflect
Run `echolot guide reflect` and follow it. The installed echolot prints it,
so it matches the report `echolot reflect` writes.
In short: `echolot reflect --last` turns the newest session that used echolot
into facts and signals, and you read its json rather than the session itself.
You return proposals grouped by where each change lands, every one with its
evidence. Nothing is edited without asking: show the list, and the human picks.Build echolot.yml for an Android project — a repository scan, a probe trace, and a few questions only the human can answer. The echolot skill routes here when the project has no config.
# Setup
Run `echolot guide setup` and follow it. The installed echolot prints it, so
it matches the commands you are about to run.
What it rests on: **the human does not open the config.** Take everything
the repository and a probe trace can give — `echolot scan`, a probe capture,
`echolot probe`, `echolot names`, `echolot domains --root .` — and ask only
what exists in neither.
Ask one question at a time. Each is a choice among options taken from the
trace, with a default, and you wait for the answer before the next. You
present candidates and the human decides; a value nobody could find is
written as `null` and said out loud, never invented.
Before calling the config done, `echolot analyze` the probe trace and read
the window, not the findings: `start_anchor.matches` and
`end_anchor.matches` above zero, a window
that looks like the scenario, and not every detector firing at once. Then
`echolot` should say `next: hunt`.
A project with a config that wants another journey measured needs no new
setup: the end of `echolot guide setup` says how to add a scenario.The door to echolot, for Android performance regressions — from a Perfetto trace down to a place in the code. Use when cold start regressed, scrolling stutters, TTI grew, a benchmark dropped, or there is a .perfetto-trace to read; also for "why is startup slow", "where does main thread time go", "what is burning CPU". Reads where the project stands and takes the next step.
# echolot
echolot turns a Perfetto trace into about twenty rows of facts. **Never open
the trace yourself**: no TraceProcessor, no SQL, no reading `.perfetto-trace`.
The report is what you read.
## The tool comes first
Run `echolot --version`. If there is no such command, echolot is not
installed: it is a Python tool this plugin does not bring. Tell the human to
install it, `pipx install echolot` or `uv tool install echolot`, and stop: the
install needs the network and writes outside the project. If a command below
says a verb, flag or topic does not exist, the installed echolot is older than
this plugin: the human upgrades it, `pipx upgrade echolot` or
`uv tool upgrade echolot`.
Run every `echolot` command on its own: never chained with `&&` or `;`, and
with the trace files named rather than globbed
(`ls .echolot/traces` lists them). A host's rule that lets echolot out of its
sandbox covers a command line that is echolot alone; `git status && echolot
doctor -q`, or a `*.perfetto-trace`, keeps the whole line inside.
## Then ask the tool where things stand
```bash
echolot # where things stand, and what is next
```
Show the output to the human as it is, then act on its `next` line
(`echolot status --next` prints the word alone):
| `next` | what you do |
|---|---|
| `init` | `echolot init --for plugin`, then `echolot` again: the .gitignore lines, and no `.claude/`. In Codex, `echolot init --for plugin,codex`: it also writes the rule that lets echolot out of the sandbox, which Codex allows only from outside it, so ask to run it there. Never plain `echolot init`, whatever else says it: that installs `.claude/`, and the skills would load twice |
| `upgrade` | show the `layer` line as it is, it names the upgrade, and stop |
| `doctor` | `echolot doctor`: show what failed, and stop. A sandbox's refusal names its own way out |
| `setup` | the `echolot-setup` skill, or `echolot guide setup` where the host does not list it |
| `fix-config` | show the error, ask the human to fix `echolot.yml`, stop |
| `resume-or-new` | show the recap `echolot` printed and ask: carry on (`echolot hunt --resume`, then the `echolot-hunt` skill), something new (the `echolot-hunt` skill with their question), or the report alone (`echolot report`) |
| `init-force` | files in `.claude/` differ from the package: ask, then `echolot init --for plugin` (`--for plugin,codex` in Codex); `.claude/` is the human's to remove; go on as for `hunt` |
| `fix-settings` | show the `layer` line; the human fixes the file; go on as for `hunt` |
| `hunt` | the `echolot-hunt` skill, or `echolot guide hunt` where the host does not list it |
## With an argument
The argument wins over the state. `setup`, `hunt <words>` and `reflect` are
the skills of those names; `hunt <words>`, or free text about slowness, starts
a hunt with those words as the question, and the open investigation is not
asked about. `init` is `echolot init --for plugin`, and `--for plugin,codex`
in Codex. Any other word is the `echolot` command of that name: run it, show
the output.
## Asking the human
Where a step says ask, ask in plain words and wait for the answer, with your
host's question tool if it has one. Never answer for the human to move on.
## Before reading a report yourself
Read `echolot guide` once: how to read the report through `echolot report`,
what a silent detector means, and how a finding leads to a file. The
installed echolot prints it, so it matches the version you are running. A
hunt skips it: the reports are the loop's, read in its subagent.