ego-jev
ego executes; Jev decides. Each step: snapshot → number the interactive
elements (a11y refs @N + DOM-discovered clickables dN: div cards,
cursor:pointer, iframe/shadow content) → one System One call picks the
operation and its target together → ego clicks/fills/selects. Jev never writes
text and never sees a screenshot.
Read ego-browser first for TaskSpace and Page rules; this skill only replaces
the per-step "which element" judgment.
Requires: ego lite installed and onboarded (provides
the ego-browser command), the ego-browser skill, and TYPESAFE_API_KEY or
AI_GATEWAY_API_KEY in ~/.config/ego-jev/secrets.env.
Run
Have a Page on the starting URL (goto with waitUntil: "domcontentloaded"
on slow marketing sites; the default load times out at 15 s).
Call the loop with the goal verbatim, every value Jev may need to type, and
a verify that tests the real done state (SKILL_DIR is the absolute path
of the directory containing this SKILL.md):
const { runJevLoop } = await import(
`file://${SKILL_DIR}/scripts/jev-loop.mjs`
);
const result = await runJevLoop(page, {
goal: "Open the Billing page and show the credit balance",
values: { query: { value: "pricing", hint: "site search query" } },
verify: async (p) => /billing/.test(await p.url()),
});
values: Jev picks which key goes in which field by hint; a fill with
no matching value escalates instead of inventing data. Site search needs
a value too.
verify: test URL, dialog text or a DOM fact — the thing the goal is
about. A verify on a heading passes early (link clicked, navigation not
yet committed) and a verify blind to modals makes Jev loop past a done
state.
Branch on result.status — the loop fails loud, never silently retries:
| status |
meaning |
you |
done |
Jev claims visible evidence; verified true when your verify passed |
read the page and report |
escalate |
login/2FA, payment, upload, delete words, free text, low confidence, target missing, two action errors |
result.reason names it; handOff for login, fix the blocker, or finish with plain ego calls |
blocked |
Jev reports stuck: dead end, nothing offered advances the goal |
reason about the page yourself (e.g. the docs have no such page) |
max_steps |
loop bound hit |
inspect result.trace |
result.trace is per-step {op, ref, name, opConfidence, targetConfidence};
result.snapshot is the last a11y tree.
Done when the page state your goal describes is confirmed by verify or your
own page.evaluate — Jev's done is a claim, the check is yours.
Gotchas
- A click on a
target=_blank link opens a new Page; the loop stays on the
old one and escalates on the unchanged page. Continue on the new label.
- Collapsed menus and teleported dropdown options are not in the DOM until
opened: click/hover the parent first, then enter the loop.
select on a
dN target escalates by design.
- Jev will click "Continue with Google" on a login page; keep login pages out
of the loop or
handOff first.
- Semantic filtering ("not in the list → switch to All") is planner work; a
blocked there is correct, not a bug.
Reference
- Options, thresholds, backend/keys, latency numbers:
reference.md.
- Offline smoke test (mock decider, no key) — run from this skill's directory:
ego-browser nodejs < scripts/selftest.mjs
1---2name: ego-jev3description: Jev (TypeSafe System One) inner loop for ego-browser — one ~0.4 s typed decision per DOM step instead of an LLM turn. Use for multi-step clicking through a semantic page: fill known values into a form, set filters, open a row/card/menu by name, reach a page via nav or site search. Escalates login, payment, free text, canvas and content reading back to you.4license: MIT5---67# ego-jev89ego executes; Jev decides. Each step: snapshot → number the interactive10elements (a11y refs `@N` + DOM-discovered clickables `dN`: `div` cards,11`cursor:pointer`, iframe/shadow content) → one System One call picks the12operation and its target together → ego clicks/fills/selects. Jev never writes13text and never sees a screenshot.1415Read `ego-browser` first for TaskSpace and Page rules; this skill only replaces16the per-step "which element" judgment.1718Requires: [ego lite](https://lite.ego.app/) installed and onboarded (provides19the `ego-browser` command), the `ego-browser` skill, and `TYPESAFE_API_KEY` or20`AI_GATEWAY_API_KEY` in `~/.config/ego-jev/secrets.env`.2122## Run23241. Have a Page on the starting URL (`goto` with `waitUntil: "domcontentloaded"`25 on slow marketing sites; the default `load` times out at 15 s).262. Call the loop with the goal verbatim, every value Jev may need to type, and27 a `verify` that tests the real done state (`SKILL_DIR` is the absolute path28 of the directory containing this SKILL.md):2930 ```js31 const { runJevLoop } = await import(32 `file://${SKILL_DIR}/scripts/jev-loop.mjs`33 );34 const result = await runJevLoop(page, {35 goal: "Open the Billing page and show the credit balance",36 values: { query: { value: "pricing", hint: "site search query" } },37 verify: async (p) => /billing/.test(await p.url()),38 });39 ```4041 - `values`: Jev picks which key goes in which field by `hint`; a fill with42 no matching value escalates instead of inventing data. Site search needs43 a value too.44 - `verify`: test URL, dialog text or a DOM fact — the thing the goal is45 about. A verify on a heading passes early (link clicked, navigation not46 yet committed) and a verify blind to modals makes Jev loop past a done47 state.483. Branch on `result.status` — the loop fails loud, never silently retries:4950 | status | meaning | you |51 | --- | --- | --- |52 | `done` | Jev claims visible evidence; `verified` true when your verify passed | read the page and report |53 | `escalate` | login/2FA, payment, upload, delete words, free text, low confidence, target missing, two action errors | `result.reason` names it; `handOff` for login, fix the blocker, or finish with plain ego calls |54 | `blocked` | Jev reports stuck: dead end, nothing offered advances the goal | reason about the page yourself (e.g. the docs have no such page) |55 | `max_steps` | loop bound hit | inspect `result.trace` |5657 `result.trace` is per-step `{op, ref, name, opConfidence, targetConfidence}`;58 `result.snapshot` is the last a11y tree.5960Done when the page state your goal describes is confirmed by `verify` or your61own `page.evaluate` — Jev's `done` is a claim, the check is yours.6263## Gotchas6465- A click on a `target=_blank` link opens a new Page; the loop stays on the66 old one and escalates on the unchanged page. Continue on the new label.67- Collapsed menus and teleported dropdown options are not in the DOM until68 opened: click/hover the parent first, then enter the loop. `select` on a69 `dN` target escalates by design.70- Jev will click "Continue with Google" on a login page; keep login pages out71 of the loop or `handOff` first.72- Semantic filtering ("not in the list → switch to All") is planner work; a73 `blocked` there is correct, not a bug.7475## Reference7677- Options, thresholds, backend/keys, latency numbers: [`reference.md`](reference.md).78- Offline smoke test (mock decider, no key) — run from this skill's directory:79 `ego-browser nodejs < scripts/selftest.mjs`