Files
dotfiles/config/pi/AGENTS.md
T
Ziad Arafat d306474f95 deck-browser: read the Deck's Chrome from arceus over CDP
The user browses on the Steam Deck; agents run on arceus. Chrome's per-instance
remote debugging (chrome://inspect toggle) exposes CDP only as a WebSocket at
/devtools/browser, so playwright attach cannot use it and the HTTP /json paths
return 403. bin/deck-browser speaks CDP directly with the standard library:
tabs, text, html, shot, status, plus an opt-in unsafe-eval. Read-only by design -
no click, type or navigate - because driving authenticated sessions is what gets
accounts restricted. Opens the SSH tunnel itself and reuses an existing one.

Registers the skill for every harness and tells agents it exists.
2026-12-02 12:18:08 -07:00

2.3 KiB

Working rules

Keep this file short. Detail lives in skills, which load only when relevant.

Find before you read

Progressive context disclosure: locate, outline, then read a window — never paste a file body you have not narrowed.

  • grep -n, find, ls first; they are cheaper than reading.
  • read with offset + limit (≤ 200 lines). A whole large file is a 10k-token mistake.
  • Aggregate with codemode when a script can answer the question and return only the conclusion.
  • ~/.pi/agent/extensions/context-guard.ts blocks unbounded large reads and caps tool output. If it blocks you, follow its hint — do not retry the same call.

Skills are repo-managed: the real files are in ~/.dotfiles/config/skills/ (cli/ for the harnesses without a codemode sandbox) and every ~/.pi, ~/.free-pi, ~/.codex and ~/.agents skills path is a symlink into the store. Edit the repo, never the deployed path — the deployed copy is read-only and your change will not survive.

Full playbook: /skill:context-discipline.

Rules that cannot be delegated

  • Docs: after any infrastructure, service or config change, write it up in the Wiki.js homelab docs (/skill:wiki-update). Every time.
  • Secrets: never print, paste or read secret values; inject with secretctl get KEY -- <cmd> (/skill:secrets_man).
  • Config: agent config is tracked in ~/.dotfiles; commit changes there in the same session.
  • Hosts: check hostname before changing anything; arceus runs infrastructure, the Deck keeps / read-only.
  • Verify: run it, open it, or test it before saying it works. Say what you did not check.
  • Ask before destructive or out-of-project actions.

Where the detail lives

Load the skill that matches the task instead of asking for it up front:

Task Skill
hosts, packages, systemd, storage, DNS, Proxmox /skill:infra-change
credentials /skill:secrets_man
wiki pages /skill:wiki-update, /skill:wiki-view
Gitea, issues, PRs, releases /skill:gt
memory, secrets, host safety, forges, codemode, stack defaults /skill:homelab-policies
delegate a well-specified task to free models, then review it /skill:cli/handoff
runtimes and project tools /skill:mise-cli
reading the user's Chrome on the Steam Deck /skill:deck-browser