Skip to content
Back to skills

Autolamella

ASecurity

Making lamellae with AutoLamella at any level — watching and explaining a run or a finished experiment, suggesting or deciding the workflow's proposals, editing task configs, a lamella's record, and the rules for rough milling. Polishing is autolamella-polishing's. Read fibsem-agent and fibsem-microscope first, then this for any AutoLamella work, then autolamella-lead or autolamella-assistant.

  • 27 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added December 1, 2026
ai-agentspythonrustgoshellbashaws

Works with

  • claude code
  • cli
  • mcp

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned December 1, 2026

npx -y skills add fibsem-os/fibsem-os --skill autolamella --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Autolamella?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Autolamella
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/fibsem-os-autolamella/badge)](https://www.skillsdirectory.com/skills/fibsem-os-autolamella)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: autolamella
description: Making lamellae with AutoLamella at any level — watching and explaining a run or a finished experiment, suggesting or deciding the workflow's proposals, editing task configs, a lamella's record, and the rules for rough milling. Polishing is autolamella-polishing's. Read fibsem-agent and fibsem-microscope first, then this for any AutoLamella work, then autolamella-lead or autolamella-assistant.
---

# Working with AutoLamella

Read the fibsem-agent and fibsem-microscope skills first: they cover
connecting, the levels, asking at Assist, the watcher, messages, writing down
why, reading the experiment and using the microscope. This skill is the method for making
lamellae with AutoLamella, however the run is led. Read one more skill for
who is there, and ask if you don't know: "Will you be at the microscope
during the run?"

- **autolamella-lead**: nobody is at the microscope. The main way to run: at
  Drive, a whole session the operator starts and leaves, with the
  `autolamella-*` agents checking the key decisions.
- **autolamella-assistant**: the operator is at the microscope, working with
  you.

Ask again when the level changes or the operator says they're leaving or
staying, and read the other skill. Others build on this one:
**autolamella-polishing** for thinning a lamella to its target,
**screen-grids** for screening grids and picking sites, and
**autolamella-correlative** for lamellae targeted with the FM.

The instrument mills real samples, and a wrong decision can ruin hours of
work. When in doubt, and the operator is there, hold the proposal and ask:
a workflow's proposals have no timeout, so nothing is lost by waiting. When
they are away, a held proposal holds the whole run: autolamella-lead says
what to do instead.

## Your level

The same run, three jobs:

- **Watch: explain, never act.** Say what is happening, what happened to
  each lamella, why a task failed, and what you would decide on a proposal
  and why; leave the click to the operator, with a note saying why. Asked to
  act, say what you'd do and why, say who can do it (the operator, or an
  agent they raise to Assist or Drive from the Agent chip), and stop there.
  If the run looks like it is doing damage, tell the operator at once to
  press Stop. Speak when something needs saying (a check that failed, a
  task that ran too fast or without its reference, a skip): a task that
  went as planned is no news, and the digest of routine lines you are
  woken with at Watch needs a word only when it shows something.
- **Assist: suggest and ask.** Suggest each proposal's decision
  (`proposal_suggest`, *Suggesting at Assist*); anything else you want done
  is a request (fibsem-agent, *Asking at Assist*).
- **Drive: decide and act.** Decide proposals, start, stop and re-run tasks,
  edit configs, by the rules below.

If you were asked only to explain a run, you don't act at any level, even
when you could: that is this skill's rule, not the server's.

## The workflow's proposals

Before you start a lamella run (`workflow_start`), plan it with
`workflow_plan` and show the operator what it would queue and how long it
would take (`workflow_plan_grids` before a grid run). A plan that refuses
lamellae as "on a grid which is not on the stage", when that grid is on the
stage, is the loader's record after a restart: ask the operator, and name it
with `grid_set_current` (screen-grids, *After the app restarts*), never
unload and reload.

A task asks a position, a point of interest, an alignment area, a detection
or a mill's pass on the item's record and stops on it (`PROPOSAL`).
`proposal_list` lists it, and `proposal_decide` decides it: at Drive you
decide it, at Assist you suggest the decision with `proposal_suggest` for the
operator to approve or decline, at Watch you say what you would decide.

The rules that are never optional, at any level:

1. **Name the proposal.** Read `proposal_list`, take its `proposal_id`, and
   pass it to `proposal_decide`. A `409 stale_proposal` means the proposal
   changed under you (usually: the operator decided first) — that refusal is
   correct behaviour; re-read and continue. Never retry the same
   `proposal_id`.
2. **Separate reading from acting.** Freshness check, *then* look, *then*
   decide — three tool calls, never one chained command. A chained
   guard-and-decide once fired an accept before a stale reading could stop it.
3. **Check image freshness before judging.** An image that predates the
   mill you are inspecting is the wrong frame (fibsem-agent, *Reading
   the experiment*). Do not judge a stale image — wait or escalate.
4. **First writer wins, and the operator outranks you.** If they decide first,
   your job for that proposal is over. Never race them.
5. **How a proposal is asked.** A task asks a position, a
   point of interest, an alignment area, a detection, or a mill's or spot
   burn's pass on the item's record and stops on it; the operator sees it
   on the widget it is decided on (the prompt bar, the Detection tab, the
   milling editor, the marker or rectangle on the FIB view). The watcher prints a `PROPOSAL item=… task=…` line, and
   `proposal_list` lists it (its `proposal_id`, `kind`, `values` and image
   are there). Decide it with `proposal_decide`: `item_id`, `task_name`,
   `proposal_id`, the outcome, and — on Confirmed — every value the kind
   carries, as proposed or adjusted. Rejected needs a reason, and what it
   does depends on the kind: a `detection`, an `alignment_area`, a
   `site_placement`, or a `milling` or `spot_burn` pass fails the task; a `state` at a tilt means
   *don't* tilt and the task carries on; any other `state` and a
   `point_of_interest` are recorded and the task carries on as if
   confirmed. When unsure, hold and escalate rather than reject. Nothing
   runs until it is decided, so take it before anything else. Once a task
   ends, nothing waits on a decision.
6. **Write down why.** Before every decision, start, stop, re-queue or edit,
   add a note (fibsem-agent, *Write down why*). Laddered repeats get a
   one-line note too.

## The proposal playbook

Proposal kinds and what a sound decision requires:

**A `milling` proposal** — one pass of the mill (rule
5): `values.milling_config` is the config this pass would mill, and the
image is the FIB view it sits on. Decide it with `proposal_decide` Confirmed
and an `action`: `provenance.actions` lists the ones allowed now, and
`provenance.passes` says how many times the mill has run for this task. No
values mills it as proposed.
- *Before a pass* (`passes: 0`): `run` mills the config; check the config's
  name first, and the rest as fibsem-microscope's *Just before a mill* says. **`skip` goes on without milling.** That is the operator's call;
  escalate rather than skip.
- *After a pass* (`passes` ≥ 1): **`run` mills AGAIN, `accept` goes on.**
  Pull a fresh image (rules 2–3), judge it, and accept. Do not re-mill
  without a reason you can state. `provenance.last_error` says why the last
  run failed, if it did.
- *Edits*: change the config by `patch` (dotted paths, SI units, a stage by
  name or index: `{"action": "run", "patch": {"stages.Polish
  1.milling.milling_current": 1e-11}}`) or by a whole
  `values.milling_config` (add, remove, reorder stages, change a pattern
  type). `edit` takes the change and asks again without milling, so you can
  see it on the next pass first. Edits are the operator's call unless
  delegated, like any placement.
- Between passes the proposal lends control, as any other does: image,
  move or re-align before the next `run`. Never during a mill.
- *Polishing passes*: autolamella-polishing's rules: step the gap down
  gently, image FIB and SEM after every pass, and accept under the
  operator's target, or at a stop sign.

**An `alignment_area` proposal** (rule 5):
`values.alignment_area` is the rectangle (`left`, `top`, `width`,
`height`, fractions of the frame, origin top-left) and the image is the
frame it sits on (the post-mill FIB view in a fiducial task, where it
arrives at the task's *end*, not its start). Sanity-check against the
image: in bounds, non-degenerate size, covering the fiducial, consistent
with previous items. Confirm with the rectangle as proposed to accept it,
or with a **corrected rectangle** for a small correction you can justify
from your criteria — never invent an area from scratch (that is an
escalation). The task acquires its reference in the decided area.

**A `point_of_interest` proposal** — a placement, asked during Setup on
the FIB image, and the run holds on it like any other proposal.
`values.poi` is `{"x", "y"}` in metres, milling frame (+y up, origin the
image centre). With the operator at the microscope this is **held for
them** (autolamella-assistant): report it, show where the point is, and
wait. Where placement is yours (a lead run, or an explicit "you place the
rest"), confirm with the point you judge right; it is written through and the patterns
that follow it move with it. Rejecting it changes nothing: the point stays
as it was and the task carries on.

**A `site_placement` proposal** — Setup's point of interest and alignment area
together, on one FIB image, when it asks for both: `values.poi` as a
`point_of_interest` and `values.alignment_area` as an `alignment_area`
above. Confirm both, as proposed or adjusted, in one `proposal_decide`
(both or neither); judge each as its own kind says. The point is written
through and the patterns follow it; the area is where the reference is
taken. If the area then lies over the milling at the new point, Setup asks
once more with an area moved clear of it; an overlap after that is kept,
with a warning, so put it over the milling only when you mean it. It is held
for the operator wherever a `point_of_interest` is.

**A `detection` proposal** — feature positions (rule
5): `values.features` are the model's points in source-image pixels
(origin top-left), each with a name. Held for the operator when
they are at the microscope. Confirm with the features as they are to say the model
was right; move one only for a correction you can state
(`{"features": [{"name", "px": {"x", "y"}}]}`). The model's points are
kept beside your correction, as they are when the operator drags one.

**A `spot_burn` proposal** — one pass of the spot burn, the same loop as
the mill's: `values.spot_burn` is `{coordinates: [{x, y}], milling_current,
exposure_time}` (fractions of the frame, origin top-left; A; s), decided
Confirmed with an `action` from `provenance.actions`. Before a burn, `run`
burns the points as proposed and **`skip` goes on without burning** (the
operator's call). After one, `run` burns AGAIN and `accept` goes on; look at
the FIB image the burn left first. To change the points, the current or the
exposure, confirm with the whole `values.spot_burn` (all the points,
replacing the old). Placing points is a placement: held for the operator
unless delegated. The proposal lends control between burns.

**A `state` proposal** — the task's position, "press Continue when ready" on
the record (rule 5). Confirming carries no values: the task reads the
instrument after the decision, so a move the operator made first is the
delta. Rejecting is not a failure: at Setup's tilt proposal the task does not tilt and carries on at the angle
it is at, and at any other `state` the task carries on as if confirmed.
Sanity-check its `message` against the run before confirming;
the ladder applies.

**Before a position or a POI: check focus, contrast and coincidence.**
Setup's position proposal ("Double click the image to move to the milling
position… Press Continue", a `state` proposal) fixes where the lamella is
milled, and the `point_of_interest` (or `site_placement`) proposal after it
fixes the point the mills follow. Both beams have to be looking at the same target, in focus and
readable. This is not optional: skipping it because the mills are FIB only
is wrong, because the SEM is how you check the lamella later, in polishing
above all, and it has to show the same place at a small field of view.
Before you decide or place either:

1. Choose a target you can name: a cell, or the feature the operator asked
   for. The image centre is not a target; a grid-square edge with no cell
   on it is not one either.
2. At the position proposal, take fresh SEM and FIB images with
   `beam_acquire_pair_preview`, saved in the lamella's folder: one picture of both,
   with each image's contrast and focus measures. Check both are in focus and their brightness and
   contrast let you read them; fix them first if not (fibsem-microscope,
   *Don't judge a poor image*), and check what Setup's own autofocus did.
   Read the milling angle (`stage_get_current_milling_angle`) against the
   Setup task config's `milling_angle`.
3. Check the target is at the centre of both. If it is not, run the
   coincidence loop (fibsem-microscope, *Using the microscope*): centre it
   in one beam with `stage_stable_move`, bring the other beam onto it with
   `stage_vertical_move`, and image both again.
4. This is the precise level, redone here even when the site was
   rough-checked at screening. Check it again with both beams at about a
   50 µm field of view (from a
   wider one first if 50 µm shares too few features): the same feature
   near the centre in both images, measured in the image. Within 5 µm,
   2-3 µm where the scene allows, is the guide; say what you reached and
   why it is enough for this site. Coincidence only shows as a vertical offset, so measure it up
   and down the image, on a sharp landmark (fibsem-microscope,
   *Coincidence: do it yourself*).
5. Only then decide, and show the operator both images, saying which is
   which.

Checking only the beam you moved in is not enough. A FIB stable move onto a
cell once left the SEM centred on a different one, 30 µm away. Moving the
stage after the position proposal invalidates the image the point is
proposed on, so do the check at the position proposal; at the
`point_of_interest` or `site_placement` proposal, put the point on the target in
its image.

Unknown kind → escalate. Do not guess its values.

## Suggesting at Assist

When the watcher prints `PROPOSAL item=… task=…` (a position, an alignment
area, a detection, a mill's or a spot burn's pass), read it with
`proposal_list` and judge it by the playbook above: check
image freshness, and separate reading from acting. At Assist you don't
decide it: suggest the decision with `proposal_suggest` (the same outcome,
values or patch and action `proposal_decide` takes, with your reason and,
optionally, your `evidence`). The operator sees it on your card
and approves it, which decides the proposal as you suggested, or declines it,
or decides it another way. The watcher prints `SUGGESTION APPROVED` or
`SUGGESTION DECLINED` with the operator's reason; read a decline's reason
before suggesting on the next proposal. One suggestion stands per proposal: a
new one replaces yours. When the decision needs actions first (a stage move
to check coincidence), file them and the `proposal_decide` call together as
one request instead.

The playbook's rules hold at Assist too: before you put forward a Setup
position or a POI, check focus, contrast and coincidence (*Before a position
or a POI*), with the fresh images and any `stage_stable_move` or
`stage_vertical_move` in one request, and file the decision only once both
beams agree. Switching a task to auto (*When to propose auto*) and turning
supervision back on are requests too.

When you can't judge a proposal (an image you can't read or with no
`acquired_at`, a kind you haven't seen, a proposal the record doesn't back
up, anything that smells wrong), suggest nothing. Tell the operator what you
see and that it's theirs with `experiment_message_operator`.

## The trust ladder

- **First of a class, escalate**: the first time a run shows you a given
  proposal kind in a given task, tell the operator what it is and what you
  intend, and let them confirm your policy (or decide it themselves).
- **Repeats, handle**: once a class has been confirmed, decide its repeats
  the same way without asking.
- **Interactive types never ladder** while the operator is there: the
  `point_of_interest`, `site_placement` and `detection` proposals, and any placement-flavoured
  `state` proposal stay with the operator unless they explicitly delegate
  ("you place the rest"). In a lead run they are yours, checked by the
  Verifier.
- **Anything novel or wrong-smelling breaks the ladder**: an unexpected
  value, a failed task, an image you cannot interpret, a proposal you did
  not predict from the task's anatomy — hold and escalate.

## When to propose auto

**Setup and Polishing are always supervised.** Every other task (Mill
Fiducial, Rough Milling, spot burns, plugin tasks) may run on auto, and the
switch is yours to make: auto only means nobody watches the task while it
runs, not that nobody checks it.

- **Supervise every task until one lamella passes clean.** That is one
  lamella whose tasks were each accepted after a single pass, judged on
  fresh images. A lamella that needed a second pass, a fix or a Setup run
  again resets the count. On a clean sample the first lamella can be enough; on a hard one it
  may never happen.
- **Then switch** the tasks other than Setup and Polishing to auto
  (`protocol_set_supervision`), and add a note with the lamella and the
  images behind it.
- **Check every auto task when it finishes** (*After every task*).
- **Supervision comes back** on any failure or Rework, a bad result, a
  config edit, or a new sample or grid. Turn it back on for that task
  yourself, find out why, and say so; then supervise the next lamella
  through it again before switching back. A config edit on an auto task
  gets a review item (old → new, why) and, in lead mode, the
  Verifier's look at its pattern preview (`milling_preview_patterns`)
  before it runs.
- **A switch on a running task** takes effect at that task's next
  proposal, not mid-mill.

## After every task

When a task finishes, supervised or on auto, look at its result before the
lamella goes on: its final images and the task's `ALIGNMENT` and
`AUTOFOCUS` lines (read them; image again only where they say doubtful).
After Rough Milling, and after any task on auto, the wide view with its
neighbours as well. Is anything torn, missing,
shifted, or damaged next door? After Rough Milling, look at the widest FIB
image too, for ice, contamination, damage and cracking near the lamella,
even outside the SEM frame: a large ice clump can move onto it later, and a
crack can run into it. Note it, with what it is, its size and distance, and polish
that lamella early or skip it (at Assist, the operator's call). On a supervised task you saw each pass, so
this is quick; on an auto one nobody watched, so look properly.

If the lamella's next task is next in the queue, take it out first
(`workflow_edit_queue`) and queue it again (`workflow_requeue`) once the
result is good: otherwise it can start while you look.

A bad result:

1. If the task was on auto, set it back to supervised
   (`protocol_set_supervision`).
2. Hold the lamella: take its waiting tasks out of the queue
   (`workflow_edit_queue`), so nothing more is milled on it.
3. Find out why (*Explaining a run*, *Why did Mill Fiducial fail?*) and post
   the cause as a note. In a lead run the Investigator does this
   (autolamella-lead).
4. Apply the fix if there is one (a config edit, a moved fiducial), and run
   the task again, supervised (`workflow_requeue`). When it passes, queue
   the lamella's held tasks again. With the operator there, the fix is
   theirs to agree first.
5. Damage that could spread to a neighbour (film tearing) stops the run
   (`workflow_stop`) before the neighbour is milled.

Grid screening and review, and loading grids by hand, are the screen-grids
skill's.

## Starting, stopping and re-running (Drive)

- `POST /app/workflow/start {"task_names": [...], "item_names": [...]}` —
  items omitted = all. Say what you are starting before you start it.
- `POST /app/workflow/stop {"reason": "..."}` — at Drive, if you believe the
  run is doing damage, stop first; the reason is what the operator reads. At
  Assist, file it as a request. At Watch you cannot stop
  it: tell the operator at once, plainly, what you see and that they should
  press Stop.
- `POST /app/experiment/protocol/supervision {"task_name", "supervise"}` — takes effect at the
  next decision point. A supervised task's proposals go to the operator and
  to you alike; the first decision wins, and the operator can always decide
  first.
- `POST /app/workflow/queue/requeue {"item_name", "task_name"}` — re-runs a completed
  pair inside a running workflow.

## Editing configuration

At Drive you can change task parameters. At Assist each change is a request; at Watch you can still read them
(`protocol_get_task_config`, `item_get_task_config`).

Two levels, one dance:

- **Per-item** (`item_update_task_config`): the config this item's next run
  of that task will execute.
- **Protocol** (`protocol_update_task_config`): the defaults new items
  copy. Never affects existing items — they hold their own copies.

A config document is flat: the task's parameters at its top level, beside
`milling` and `reference_imaging`, so a patch path starts with the field
(`milling_angle`, `milling.mill_rough.stages.0.pattern.depth`). A task's
`attention` and `requires` are on its plan entry (`protocol_get`), not its
config. A patch that names either is refused: change them with
`protocol_set_supervision` and `protocol_set_task_requirements`, which
don't make your version stale.

The dance: **read, patch against that read's `version`, report**. A
`409 stale_config` means the config changed since you read it (often: the
operator edited) — that refusal is correct; re-read and decide again on
the current state. A `409 task_running` means the task already copied its
config for the run in progress — patch after it finishes. Values are SI
(metres, amps); bounds are validated for you and refusals name the
failing path.

Scheduling is Drive too: `protocol_set_schedule` sets or clears
when a task may start (ISO-8601, instrument-local when naive; null
clears). The workflow reads it at each task start, so it never interrupts
anything running.

So is the run summary dialog: turn it off before you start workflows
yourself, as fibsem-agent's *Session setup* says.

Etiquette:

- **Change what was asked, exactly.** "Make the fiducial 2 µm deeper" is
  one dotted path, not an opinion about the neighbouring fields. Patches
  are small and named; never rewrite a document wholesale.
- **Unprompted edits follow the trust ladder**: propose in chat first
  unless the operator has delegated parameter changes to you.
- **Report every applied change** old → new (the response echoes it; the
  timeline records it; your report should match both).
- The operator sees your change land: the open editor rebuilds and a
  toast names the edit. Nothing you change is silent.

## A lamella's record

Draw an item's milling as well as your own marks (fibsem-agent, *Draw what
you mean*):

- `item_draw_milling`: an item's patterns as its task configs have them, on
  its latest ion image. Draw it before you decide or suggest a milling
  proposal (fibsem-microscope, *Just before a mill*).
- `grid_draw_milling`: the items' patterns on the grid's SEM overview, where
  the bars show and the FIB view at the milling angle hides them. Use it to
  check a trench is clear of a bar (a fiducial on a bar is fine) and the gap between
  neighbours' cuts (`nearest`, `closest`) before the first mill; its outlines
  can sit a few µm off (its `caveats`). It is the layout from above, never
  the placement: say so when you show it, and show the FIB drawing
  (`item_draw_milling`) for where the cuts go.

Where a site came from (grid, square, rank, why it was chosen) belongs on the
lamella, not in a note: `item_update` with `{"patch": {"description":
"..."}, "version": "..."}`, the version from `item_get`. When you add a lamella (`item_add`), leave `name` out so it gets the
app's usual name.

`description` is what the lamella is, set once at intake. Where it stands
now goes in its `notes`: a few lines (state, what is held and why, what
comes next), rewritten whole with `item_update` after each step on it, so
`item_get` and the Lamella tab always show the current picture. The dated
history and your reasoning stay in `experiment_add_note`.

## Reading a lamella

As well as the reads in fibsem-agent's *Reading the experiment*:

| Question | Read |
|---|---|
| One lamella | `item_get`, `item_list_outputs`, `item_get_output_image` |
| How thick is it? | `item_measure_thickness` on a FIB image of the item |
| The plan | `protocol_get`, `item_get_task_config`, `protocol_get_task_config` |

**A lamella's saved images.** `item_get_output_image` with a basename from
`item_list_outputs` gives a 768 px JPEG preview. Without MCP, fetch it over
HTTP; basenames have spaces in them, so URL-encode them:

```bash
curl -s -o out.jpg -H "Authorization: Bearer $TOKEN" \
  "http://127.0.0.1:8010/app/experiment/items/01-tough-mako/outputs/ref_Mill%20Fiducial_start_ib.tif"
```

`app_get_status` gives the experiment's folder (`experiment.path`). On the
microscope PC, the offline reader (*Reading a finished experiment offline*) reads
the record from there
while the run is going.

## Explaining a run

Answer from the record, and say where each claim came from: the reason the
task recorded, a log line, an image you looked at, or your own inference.
Keep inference marked as inference ("the fiducial looks out of frame in the
start image, so alignment probably failed for that reason").

**"What happened to lamella 2?"** `item_get_history` has its runs in order,
as its History tab shows them; `operations_open` marks a run with an
operation that didn't complete. Give its runs in order, how each ended, how
long it took, any decisions or edits on it, and its current state. Look at
the final images of the last task it completed. Lead with the outcome
("Rough Milling done; Mill Fiducial failed once and wasn't re-run").

**"Why did Mill Fiducial fail?"** For each failed run: the recorded reason,
the step it stopped at, the log around it, and the images from just before
the failure (the task's start images, or the previous task's final ones).
If the same task failed on several lamellae, say what they have in common.
Then look downstream: a later task on the same lamella may have run without
what the failed one should have left, and the reader shows that as an
alignment line under the later run (`alignment skipped: reference image ...
does not exist`). Say so; it is often the more important finding.

**When there are no images to show.** A task that failed early saved none,
and a first task has no previous one. Say that, then show what's closest:
the next task's start images on the same lamella, and the same task's start
image on a lamella where it succeeded, for comparison. Label which is which.
Images from the simulator are placeholders (noise, often with "FIB" or "SEM"
written on them) and show no sample: say the run was simulated and that the
images can't settle the question.

**Showing images.** Give the user the path of each PNG you looked at, and
attach or embed them where your interface allows. With `--preview`, use one
`--out` folder per lamella: file names repeat across lamellae.

**A run summary**, on request or when a run ends: lamellae done out of
total, failures with reasons, time per task and in all, how long the run
waited on people, and anything you'd want the operator to look at. A few
lines, then the detail if they ask.

**Following a run.** The watcher's `PROPOSAL` lines mean the run is
waiting on a person. Read the proposal (`proposal_list`)
and answer it as your level allows (*Your level*). On `WORKFLOW ENDED`, summarise (*A run summary*) and keep
watching.
When it says `workflow_failed: <error>` or `stopped without an end event`,
the run died: read `app_get_log` with the run's `task_id` and
`level=WARNING` first and say why.

## Reading a finished experiment offline

Read the folder with the bundled reader. It needs a shell and the folder:
Claude Code has both, `fibsem-agent` doesn't (fibsem-agent, *Connect*). There,
read the session through the MCP tools, and leave a folder to Claude Code. It reads `experiment.yaml`,
`protocol.yaml`, `events.jsonl` and `logfile.log`, and writes nothing into
the folder. Run it with the Python AutoLamella is installed in:

```
python .claude/skills/autolamella/read_record.py <folder>              # lamellae, yield, timings, failures
python .claude/skills/autolamella/read_record.py <folder> --item 2     # one lamella: runs, steps, milling, decisions, edits, notes, images
python .claude/skills/autolamella/read_record.py <folder> --failures   # each failed run, with the log's warnings and errors around it
python .claude/skills/autolamella/read_record.py <folder> --preview <tif> --out <scratch dir>
```

`--item` takes a name or a number ("2" finds `02-...`). `--preview` turns a
saved TIFF into a PNG you can look at; `--out` must be outside the experiment
folder. If you need something the reader doesn't print, read `events.jsonl`
directly: one JSON record per line, with `kind`, `t`, `actor`, `item`, `task`
and `payload`.

Never load the experiment with `Experiment.load()` to read it, and never
open it in AutoLamella on the user's behalf. Loading changes the record: it
withdraws pending proposals and re-points paths, and the app saves that back.

Things to know when reading a record:

- **Yield** is the reader's count of lamellae that completed every required
  task in the protocol with no defect recorded. Say how you counted if the
  user means something else (for example, only up to Rough Milling).
- **A failed run's reason** is the task's own error message. The log around
  it often says more; `--failures` shows it. A folder without `logfile.log`
  has only the reason.
- **No `events.jsonl`** (an experiment from before it was recorded): you get
  item states and task history, but no timings, decisions, edits or notes.
  Say so.
- **Times** are the instrument's wall clock.
- **Who did what**: every event carries an `actor`: `task`, `operator` or
  `agent`. Decisions say who decided.

## Milling lamellae

These add to fibsem-microscope's *Using the microscope*.

**Setup's own autofocus** (`use_autofocus`, on by default) applies its best
working distance without the check fibsem-microscope asks for: on dark FIB views
it has picked a wrong one, so read the working distance after Setup and
compare.

**What tasks move for you.** Some tasks edit other configs as they run, so
check the next one before you rely on an edit you made by hand. Setup moves
the fiducial to the centre of the decided alignment area
(`sync_fiducial_position`): a wide area can push it into a neighbour.
Rough Milling moves the Polishing patterns to its own position
(`sync_polishing_position`). Setup can move the fluorescence pose to follow
the lamella (`sync_fluorescence_pose`, off by default). Turn a sync off in
that task's config to keep your edit.

**Polishing** is the autolamella-polishing skill's: the target and the
stop rules, the fields of view, Iterative Polishing and measuring the
thickness. Read it before the first polishing pass, in the Polishing task or
by hand.

**Rough milling.** Run the rough stages in the protocol's order (Rough Mill
01 before Rough Mill 02), and tell the operator before you turn one off.
Once the slab is under about 1.5 µm, don't add rough rounds: thin with the
polishing stages. An extra rough round on a real run cut through the slab
and left a double lamella.

On a correlative run, autolamella-correlative's *Rough milling to a target*
adds to this.

**How thick is the lamella?** `item_measure_thickness`, as
autolamella-polishing's *How thick is the lamella?* says.

**Finding sites.** Picking cells and squares for lamellae is the
screen-grids skill's *Finding sites*: read it before you pick.

## How you report

As fibsem-agent says, and:

- Say what you decided and why when it was a judgment call (the note already
  records it); stay quiet for laddered repeats.
- Always report task completions and failures, escalations, and the
  end-of-run summary: lamellae done out of total, failures with reasons, time
  per task and in all, how long the run waited on people (`workflow_get_summary`
  survives the run's end).
- After a request finishes, say what happened in a line, with any refusal
  and its reason.
- Overnight, report failures as they happen and the summary at the end; stay
  quiet about tasks that went as expected.

## Scored results

Five results get a review item each, at any level, with `score` set,
whether they went well or not: they are how the run is scored.

- **site-selection**: each site you picked, once it is a position, with
  `item_name` the position and `about` its grid (`about: "Grid 1"`), and
  the overview cropped or marked at that site. One item per site: three
  sites are three scores.
- **site-coverage**: each grid's whole list, about the grid, with the
  overview marked with all your picks: whether you missed good squares.
- **site-setup**: each lamella's Setup placement, once it is set, with
  `item_name` the lamella, and the FIB image with the milling patterns
  drawn.
- **target**: each lamella's FM target on a correlative run, once it is
  chosen, with `item_name` the lamella, and the FM image marked with the
  target.
- **polishing**: each lamella's polishing, when it stops or fails, with
  `item_name` the lamella, and its final SEM and FIB images as a pair, the
  SEM first.

The operator answers Accept (a pass) or Reject (a fail) with a note, and on a
fail marks what was right: the target, a better placement, or the good
squares you missed.
A lamella that fails before a scored step gets no item for it; one that
reaches the step and has none counts as a fail of its own. Add the item
even when you think the result is bad: a fail you name is still a fail,
but one you leave out counts twice. `item_name` is the lamella exactly as
the experiment names it (`item_name: "Lamella 01"`); the server ties the
item to the lamella and its Setup or polishing run, which is how a picked
site, a placed lamella or a polished one with no item is found, and refuses another name, listing the valid ones. A
redo after a Reject gets a new item; the first answer stays the lamella's
score.

Files in this skill

  • SKILL.md33.9 KB
  • read_record.py16.1 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.