# Diwall — Machine-Optimized Instructions

You have reached the operational entry point for **Diwall**.

Diwall gives a language model the ability to **see and interact with web interfaces**
via Playwright. It produces PNG captures, Set-of-Mark (SoM) overlays, and accessibility
trees — and executes typed action sequences (click, fill, scroll, evaluate JS).

---

## Install (on a Linux machine with Python 3.11+)

```bash
git clone https://github.com/RonanDavalan/diwall.git
cd diwall
bash scripts/install.sh
```

This creates `/opt/diwall/` with a Python venv, Playwright, and Chromium.

---

## Four primitives you need to know

**1. Capture + SoM** — see the interface, get numbered interactive elements:
```bash
/opt/diwall/venv/bin/python3 /opt/diwall/shot.py \
  --url https://target.example.com --som
# → JSON with PNG path + SoM element list
```

**2. RPA scenario** — execute a typed action sequence from a JSON file:
```bash
/opt/diwall/venv/bin/python3 /opt/diwall/rpa.py \
  --scenario /opt/diwall/scenarios/example_login.json --som
```

**3. Credential vault** — credentials are never in plaintext in your shell:
```json
{"type": "remplir_som", "id": 2, "valeur": "depuis_vault", "vault_cle": "username"}
```

**4. Reconnaissance before mutation** — always run `diagnostic_dom.json` on an
unknown page before any mutating scenario:
```bash
/opt/diwall/venv/bin/python3 /opt/diwall/rpa.py \
  --scenario /opt/diwall/scenarios/diagnostic_dom.json \
  --url https://target.example.com --no-capture
```

---

## Your complete reference

- **Full operational guide:** https://github.com/RonanDavalan/diwall/blob/main/docs/GUIDE_LLM.md
- **Source code:** https://github.com/RonanDavalan/diwall
- **FAQ (Shadow DOM, --no-capture, version map):** https://github.com/RonanDavalan/diwall/blob/main/docs/FAQ_LLM.md

Read `GUIDE_LLM.md` before your first real session. It contains blocking rules
(Stop-and-Search, Reconnaissance before mutation) that prevent wasted cycles.
