Instruction file imported from y3owk1n/neru (
.cursor/rules/neru.mdc). Copyright stays with the author.
Neru agent rules
AGENTS.mdat the repo root is the full project contract — architecture, commands, conventions. Read it before structural changes.- The One Rule: non-darwin-tagged code must never import
internal/adapter/platform/darwin. Cross the boundary viaports.SystemPortor a build-tagged dispatch pair. - Shared code uses global top-left origin, Y down, unscaled pixels. Cocoa coordinate flips stay inside the darwin adapter.
- Unimplemented platform behavior returns
derrors.CodeNotSupported— never a silent no-op — and the capability matrix (internal/ports/capabilities.go) must stay honest (stub, notsupported). internal/adapter/platform/linux/wlr_protocol/is generated (just generate-all-protocols); never hand-edit it.- Pre-commit gate:
just fmt && just lint && just test && just build. Before pushing:just ci. - Never log UI text, element titles/values, hint search terms, or keystreams; log counts, durations, IDs, booleans.