Add CLAUDE.md / AGENTS.md to mobilerun-portal (encode invariants)
Author: linear-code[bot]Created Jul 31, 2026Updated Sep 10, 2026
Why
The repo has Claude wired into the PR flow but only a 4-line code-style.md. The agent can't see the invariants a human reviewer knows. This is the root-cause fix.
Task
Add a root CLAUDE.md (and/or AGENTS.md) that encodes at least:
- Enum-mapping invariant: every
EventTypethat should fire a trigger needs a matching arm inTriggerRuntime.handlePortalEvent; prefer exhaustivewhen(noelse) so the compiler enforces it. Point to the existing exhaustiveness test inTriggerCoreTestas the pattern to copy. isNotificationSourceintent: document the deliberate difference between the editor/permissions version (POSTED||REMOVED) and the runtime debounce version (POSTED only), or reconcile (see sibling ticket).visibilityFor/capabilitiesFor/defaultCooldownSecondsFor: a newTriggerSourcemust be added here too, or it silently gets no cooldown/run-limit and is invisible.- Test + CI expectations, module layout, code-style rules.
Definition of Done
-
CLAUDE.md/AGENTS.mdat repo root, referenced from README - Invariants above written down with file/function pointers
Source: droidrun/mobilerun