# AGENTS.md — Guide for AI agents This file helps AI coding agents and LLM tooling understand and work with this repository quickly. ## What this repo is `headroom-stats-plugin` is a **packaged Cordis plugin for DeepSeek Harness (DSH)** that displays live token/cost-savings stats from the [Headroom](https://github.com/headroomlabs-ai/headroom/) compression proxy inside the DSH Web UI. It is a real profile-bundled plugin: `dsh.bundle` (`cordis.patch.yml`) mounts the host half, and the `dsh.client` declaration + `exports["./client"]` register the browser half — install once with `dsh plugin add`, loads on every DSH boot, no cordis_define. ## Repository layout | Path | Role | | --- | --- | | `src/index.ts` | Host half: one-time env probe via `subprocess` (`cmd /c echo %HEADROOM_SAVINGS_PATH%&echo %HEADROOM_WORKSPACE_DIR%&echo %USERPROFILE%`), `fs` read of `proxy_savings.json`, snake_case→camelCase reshape, `webServer` route `GET /headroom-stats/api` serving the JSON snapshot. | | `src/client/index.tsx` | Client bundle: single 5s poller `fetch('/headroom-stats/api')`, React dashboard (`settings.section` id `headroom-stats`) + dock line (`conversation.composer.dock` id `headroom-dock`), `