> For the complete documentation index, see [llms.txt](https://docs.kouch.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.kouch.dev/docs/agents.md).

# Docs for agents working on Kouch

`CLAUDE.md` at the repo root is loaded into every session; it carries the rules, commands, architecture and current state. These files carry the detail it points to:

| File           | Read it when                                                                                                                                                                                                                  |
| -------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `TESTING.md`   | you need to verify anything: the mock and its drivers, the real app under Steam, an isolated build, the virtual pad, real emulators, the Steam Deck rig, the second PC and the three Steam accounts, and the owner's own copy |
| `PERF.md`      | you touch anything that animates or re-lays out, or a Deck number moves: the bar, the tour, how to find a cause (runtime A/B, JS map, paint rects), today's numbers, lessons already paid for                                 |
| `DECISIONS.md` | before proposing anything the owner may already have decided: every ADR, every plan and its status table, the owner's standing rulings                                                                                        |
| `FINDINGS.md`  | you test anything, or pick up a bug: every finding from the crawl, the sweeps, the Deck, the second PC and the owner, with its owner and status; add yours there                                                              |
| `HISTORY.md`   | you need to know how something came to be, or which commit did it: the full milestone log that used to live in CLAUDE.md                                                                                                      |

Scripts these docs refer to:

* `scripts/deck/`: the Deck rig. `deck-tour.sh`, `deck-ab.sh`, `deck-profile.sh`, `deck-tools.sh`, the shared `deck-common.sh`, and a copy of the Deck-side `run-gamemode.sh`. They need `KOUCH_DECK=user@host`.
* `scripts/perf/`: WebKit inspector tools. `wk-timeline.mjs` records, `wk-eval.mjs` evaluates, `wk-map.mjs` maps samples to sources, `paint-rects.mjs` counts repaints.

The private details (the Deck's LAN address, account ids) stay in agents' memory, not in git. The account names in `TESTING.md` §7 are Steam persona names; remove them with the rest of the private data before the repo goes public (`docs/GO_PUBLIC_CHECKLIST.md`).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.kouch.dev/docs/agents.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
