---
description: Agent contract — analyze, live reload r/R, terminal access
alwaysApply: true
---

# Kasy agent contract

**Master contract:** `AGENTS.md`. **File index:** `docs/agent-guidance.md`.

| Layer | File |
| --- | --- |
| Design system | `DESIGN_SYSTEM.md` + `.cursor/rules/kasy-design-system.mdc` |
| Browser QA checklist | `docs/agent-browser-qa.md` |
| Cursor skill | `.cursor/skills/kasy-project/SKILL.md` |

## Every Dart task

1. Run `flutter analyze` from the **project root** and fix every issue before done.

## Live session

When `kasy run` / `flutter run` is **already running** (including `kasy run --web`):

After you finish Dart edits, **refresh the running app** so the user sees the change:

| Change | Send |
| --- | --- |
| UI, design, layout, copy, icons, style | **`r`** hot reload |
| Bug fix, logic, provider, route, `initState`, `main()`, wiring | **`R`** hot restart |
| **`r`** failed, compile error, or “hot reload rejected” in output | **`R`** |

**How to send reload:**

1. **MCP (preferred):** `reload_app` with `action=reload` (UI) or `action=restart` (logic).
2. **Terminal** running `flutter run` / `kasy run`: type **`r`** or **`R`** and read the output.
3. **Device preview toolbar** in the browser: click **`r`** or **`R`** (when using browser tools without shell).

**Terminal access:** use the shell when the environment grants it. **Do not** pretend
you cannot use the terminal. If shell is blocked, ask the user for access or use
the preview toolbar.

**F5 / browser tab reload does not recompile Dart.**

If **no** live session is running: deliver analyze clean only. Start `kasy run --web`
when the user asks to run or test in the browser.

## Browser QA

When navigating, filling forms, or validating a flow in the browser: follow
`docs/agent-browser-qa.md` (reload before judging UI, then snapshot ritual).
