```
Two artifacts exist for this capability on purpose.
`capabilities/generated/lookup_member_balance.json` is the one a real
LLM-driven discovery run produced (its transcript is in `evidence/`); it
knows one outcome code. `capabilities/lookup_member_balance.json` is the
authored artifact with the additional recognizers the fault demos exercise.
To run discovery yourself: `hands discover
capabilities/requests/lookup_member_balance.request.json` with a key
configured as described under *Running locally*.
The dashboard and API can be pointed at either target:
```bash
HANDS_APP=fairview-teller .venv/bin/python -m dashboard.app --port 8200
```
Built by this project. The trust dashboard (cropped) after eight replays against the local Fairview fixture: success, business outcomes, two recovered faults, and one stopped-safely UI-drift run. Chips are computed from the hash-chained trace. The amber "four-eyes not verifiable" chip is honest: this artifact has no recorded maker. Captured before trace sealing landed; on current main the log chip reads sealed / unsealed / broken instead of a binary check.
Built by this project. Evidence page (cropped) for the UI-drift run: the fixture renamed "Member ID" to "Member Number"; the recipe stopped before acting, saved the failure screenshot and accessibility snapshot, and the step record lists every rung tried.
Local fixture, authored in this repository. The Fairview Teller Console is not a real system; it exists to have a legacy-shaped target with injectable faults that runs offline.
**Against the supplied target.** MERIDIAN CORE
(`web-sample.interface-hiring.com`) is a hosted demo of a legacy credit-union
console supplied by a third party as the target for this work. It was not
built here and is not in this repository; it is shared with other users and
its data drifts. The seven `meridian_*` capabilities, the API, chatbot and
dashboard wrappers, and the local look-alike fixture used for chaos evaluation
are this project's. Running them is documented in
[`docs/ADAPTATION.md`](docs/ADAPTATION.md).
## Evidence
Curated run records are committed under `evidence/`; transient output goes to
the gitignored `runs/`. Each directory is indexed in
[`evidence/README.md`](evidence/README.md).
| location | what it proves |
|---|---|
| `evidence/discovery-run/`, `evidence/discovery-run-outcome/` | the genuine LLM-driven discovery: full model transcripts, per-call token usage, the two legs that produced the artifact |
| `evidence/artifact.json` | the exact signed artifact those discovery runs produced and the replays below executed |
| `evidence/replay-run*/` | deterministic replays: fresh parameter → `SUCCESS`; missing member → `BUSINESS_OUTCOME`; injected expiry → recovered; rejected input → `VALIDATION_REJECTED`. No `llm_call` event appears in any of them |
| `evidence/escalation-run/` | a live human handoff on the fixture: intervention record, failure screenshot, operator handback, resume scan, `SUCCESS` |
| `evidence/twin/local//` | one representative V1 bundle per chaos scenario: `expected/pre/executor/post/reconciliation/manifest.json` plus hash-chained traces |
| `evidence/twin/live/` | the three live MERIDIAN CORE twin runs |
An audit receipt, as `hands explain` prints it for a session-expiry run that
recovered. The run was invoked through the API, whose envelope returned
`audit_chain_tip`; that tip is handed back here with `--expect-tip`, so the
receipt is reconciled against an anchor held outside the run directory:
```
==============================================================
AUDIT RECEIPT · 20260914T072240Z-lookup_member_balance-5ff227
==============================================================
Capability: lookup_member_balance v1
Contract hash: 66d3c5a36c548588d345355ac660f50dbd0b6cba8eb8042618689b66d4715c2b
Contract status: VERIFIED — byte-identical to the artifact on disk
Risk sign-off: signed by 'ashish' (valid)
Maker / Checker: recorded by '(not recorded)' / approved by 'ashish' (maker unknown -- four-eyes not bindable)
Audit log: TAMPER-EVIDENT: INTACT; RECONCILED against supplied receipt; local seal file present
Inputs (masked): {'member_id': '12345'}
-- Decision trace --
07:22:40.622 STEP s1 Enter the member ID in the search field (safe)
07:22:40.625 [!] recognized None -- Session Expired
07:22:41.205 STEP s1 Enter the member ID in the search field (safe)
07:22:41.261 -> acted (type) via relative:nearest_input_right of (text='Member ID')
07:22:41.262 ok verified
07:22:41.262 STEP s2 Submit the member search (safe)
07:22:41.305 -> acted (click) via role=button name='Search'
07:22:41.837 ok verified
07:22:41.850 CHECKPOINT ok -- confirmed the right record
07:22:41.908 OUTPUT savings_balance = «masked»
-- Determinism --
Model/LLM events in this run: 0 -> NO model in the decision loop
-- Result --
{"result": "success", "outputs": {"savings_balance": "«masked»"}}
-- Evidence --
none (clean run)
==============================================================
```
Without `--expect-tip` the same run reports `SEALED and intact`; a run whose
`trace.tip` is missing reports `UNSEALED`; a wrong tip against this intact
log reports a receipt mismatch rather than `BROKEN`.
## Repository map
| path | what |
|---|---|
| `src/hands/artifact.py` | the capability schema and load-time integrity validators — the contract; start here |
| `src/hands/replay.py` | deterministic replay engine: budgets, recognizers, recovery, escalation glue, the consequential-action hazard that yields `UNRESOLVED` |
| `src/hands/surface.py` | perceive/act seam over Playwright: context paths, locator ladder, allowlist, dispatched-request log |
| `src/hands/conditions.py` · `values.py` · `results.py` | sensors, strict value parsing, the six-way result union |
| `src/hands/planner.py` · `recorder.py` · `discover.py` | the LLM discovery loop and live-verified distillation (the only modules that import a model client) |
| `src/hands/escalation.py` | control-token state machine and minimal operator console |
| `src/hands/trace.py` | hash-chained JSONL tracing, the `trace.tip` seal written at close, `verify_chain` / `is_sealed` / `chain_tip` |
| `src/hands/verifier.py` · `reconcile.py` · `twin.py` · `chaos.py` | V1: read-only observer, pure reconciler, twin orchestrator, fault injection |
| `src/hands/api.py` · `cli.py` | capability API (`/capabilities//invoke`, idempotency key, `audit_chain_tip` in the envelope) and the `hands` CLI (`replay`, `review`, `discover`, `explain [--expect-tip]`) |
| `dashboard/` · `chatbot/` | read-only trust dashboard; plain-English front door that routes to the API (never to replay) |
| `fixture/app.py` · `fixture/meridian.py` | the Fairview fixture; the MERIDIAN look-alike with a ground-truth endpoint for chaos evals |
| `capabilities/` | signed artifacts (`generated/`), the authored demo artifact, discovery requests |
| `scripts/build_capabilities.py` | authors the seven MERIDIAN artifacts through the schema from recorded prefix steps |
| `evals/` | `run_evals.py` → `results.md`; `run_twin_evals.py` → `twin_results.md` / `.json` |
| `evidence/` | committed run records (see above) |
| `tests/` | schema, ladder semantics, taxonomy, escalation, policy, API boundary, audit controls, reconciler, verifier twin, hermetic zero-LLM proof |
| `docs/` | [index](docs/README.md): design, adaptation write-up, V1 as built, prior art, deep-dive, hard questions, archived history |
| `CLAUDE.md` | the map an AI coding assistant reads before touching the code |
## Running locally
Python 3.12 or newer.
```bash
python3 -m venv .venv
.venv/bin/pip install -e ".[dev]"
.venv/bin/playwright install chromium
```
```bash
.venv/bin/pytest # full suite, offline
.venv/bin/ruff check . && .venv/bin/mypy # lint and strict types
.venv/bin/python evals/run_evals.py # regenerates evals/results.md (starts the fixture itself)
.venv/bin/python evals/run_twin_evals.py --runs 10 # local twin matrix (starts fixture/meridian.py itself)
```
Only `hands discover` talks to a model. Put a key for an OpenAI-compatible
endpoint in `.env` (never committed) as `HANDS_API_KEY` (or `GROQ_API_KEY`),
with `HANDS_BASE_URL` and `HANDS_MODEL` to change provider. Everything else —
replay, the test suite, both eval runners against the local fixtures — needs
no key and no network beyond localhost. Replaying the `meridian_*`
capabilities needs network access to the hosted demo and its demo
credentials via `HANDS_PARAM_PASSWORD`; see `docs/ADAPTATION.md`.
CI runs lint, strict typing and the full suite on Python 3.12 and 3.13.
## Design decisions and prior art
- **Why an artifact, not a transcript.** A transcript is not typed, not
reviewable, and not parameterizable. The artifact is JSON so that a human
can diff it and sign it.
- **Why a locator ladder with a flagged CSS last rung.** Semantic and
geometric locators survive re-skins; CSS paths do not. The ladder records
which rung fired, so drift shows up as telemetry before it shows up as
failure.
- **Why recognizers carry provenance.** An `authored` recognizer that no eval
has exercised is a hypothesis, and the artifact says so.
- **Why a pure reconciler.** A verdict must be recomputable from its inputs
(`inputs_sha256`), which rules out I/O, retries and side effects inside it.
- **Why window attribution and not more.** Because the system of record
exposes nothing that would let the verifier tie an observed transition to a
specific invocation, and claiming otherwise would be the wrong-but-confident
outcome the whole design exists to avoid.
Considered and rejected — screenshot-and-coordinate replay, CSS/XPath as
primary locators, agent frameworks, a database, services and queues — with
reasons, in [`docs/DESIGN.md`](docs/DESIGN.md#considered-and-rejected).
Prior art. Verifying an agent's completion claim against the system of
record, outcome verification with `mismatched` / `pending` states, read-only
observers, sagas and idempotency keys, and durable-execution engines are
established ideas; [`docs/PRIOR_ART.md`](docs/PRIOR_ART.md) cites them and
states the narrower question this work asks: whether *both* the consequential
execution and the independent observation can run through deterministic
computer-use paths when the legacy application exposes no API at all.
## Limitations
- **One surface.** Web via Playwright. The schema is surface-neutral and the
seam is `WebSurface`; a desktop surface is a mapping exercise, but it is
design, not code.
- **Multi-tenant reuse is designed, not built.** Overlays, variants and drift
telemetry aggregation exist on paper; per-step rung telemetry and the drift
eval exist in code.
- **Window attribution only.** V1 verifies an observed durable transition
inside an observation window. It does not attribute that transition to the
invocation, cannot on the current target, and is not described anywhere in
this repository as doing so.
- **No committed live traces for most MERIDIAN capabilities.** Five of the
seven were exercised live during development and their results are
described in `docs/ADAPTATION.md`, but only the V1 twin runs are committed
as evidence. Treat the others as demonstrated, not measured.
- **No recorded maker on the committed `meridian_*` artifacts**, so the
maker-checker control is enforced and tested but not shown end to end on
them.
- **Twin artifacts pending human review.** Live twin runs refuse until a
human signs `meridian_place_hold` and `meridian_member_record`.
- **Evidence chain is keyless.** Tamper-evident, not non-repudiable. The
`trace.tip` seal pins the tail, but it sits beside the log it protects, so
an adversary who can rewrite both files can forge a consistent pair; only a
receipt kept elsewhere (`audit_chain_tip`) detects that, and nothing in the
repository stores such receipts. A matching receipt does not imply a local
seal exists; a mismatching receipt on an intact log is a receipt mismatch,
not proof of local corruption.
- **Discovery redaction is containment, not elimination.** Parameters never
enter prompts and password fields are masked, but page-native PII on a real
system would reach the model during the one discovery run.
- **The shared live demo is not isolated.** Local twin runs reset the fixture
between runs; live runs cannot, which is one more reason live verdicts are
window-scoped.
- **The API's idempotency key is an in-memory demo guard.** The
time-of-check/time-of-use race is closed: the completed-key check, the
run and the record are one critical section, so two concurrent requests
with the same key execute once and the second receives the replayed
envelope. Still open: the key is not bound to the request payload, so a
reused key with different parameters replays the first result, and the
completed map does not survive a restart.
- **Human-window evidence suppression has a known residual.** Terminal
failure evidence (screenshot and snapshot) is now suppressed on every
failure path once an operator has driven the session. The intervention
screenshot raised by a *later* escalation in the same run, after a prior
human window, is still captured in `_maybe_escalate` and can persist
operator-entered page content. Follow-up hardening item, tracked in the
roadmap; element-level taint masking is the refinement.
- **The operator console is a skin.** The control-transfer model is the work.
## Research roadmap
In progress or planned; nothing below exists yet.
- **Capability Verifiability Contracts — verifiability before execution.**
The direction after V1: a capability declares, up front, what durable
effect it intends, which read path can observe that effect, and what
correlation handle (if any) the system of record exposes. A consequential
step whose contract cannot be satisfied is refused before anything is
posted, rather than reconciled afterwards. Research direction, not a
shipped mechanism.
- **Causal attribution.** Closing the gap between an observed transition and
a specific invocation needs a handle the verifier can read back — a
confirmation number bound to a session, a per-hold journal row, a
transaction id — plus a protocol for when it is absent. On MERIDIAN the
acknowledgement page shows a confirmation number but the member record does
not list holds by it, so the loop cannot yet be closed through the UI.
- **Durable `UNRESOLVED` lifecycle.** Persist the hazard at dispatch time and
drive `UNRESOLVED → {VERIFIED_*, EFFECT_MISMATCH, UNVERIFIABLE} → {closed,
escalated}` through an operator surface, so an unresolved run cannot be
forgotten when the process exits.
- **Second surface and second tenant.** A desktop (UIA/AX) `Surface` and an
overlay loader with a structurally divergent skin, to turn the heterogeneity
design into evidence.
- **Anchoring beyond the envelope.** A receipt store the caller does not
control, an HMAC-keyed chain, and per-operator signing keys; today the tip
travels only as far as the API envelope.
- **Hardening backlog.** Payload-bound and restart-durable idempotency at
the API; suppressing (or taint-masking) the intervention screenshot raised
after a prior human window.
## Authorship, tooling and license
Agent Hands is designed, built and maintained by
[Ashish Kosana](https://github.com/Ashishkosana). MERIDIAN CORE, the live
target used in the adaptation and V1 work, is a third-party hosted demo
supplied for that purpose and is not part of this project.
AI coding assistants (Cursor cloud agents and Claude) were used as
implementation and review tooling under the author's direction. Commits those
tools authored are left as they are in the Git history rather than rewritten;
`CLAUDE.md` is the standing instruction file they work from. Independent
review of the V1 pull request was performed separately from the tooling that
built it.
Licensed under the [MIT License](LICENSE).