# Neuraglass Dev Kit — agent instructions

Drop this file in the project root as `AGENTS.md` (Codex, Cursor, and most coding agents). Use `CLAUDE.md` instead for Claude Code.

You are building an **Android app for the Neuraglass Dev Kit**, which runs **Stack OS** (AOSP). This is glasses software, not a phone app and not a web app.

Docs: https://www.neurastack.com/sdk

## Product

- **Neuraglass Dev Kit** = developer glasses (this project).
- **Neuraglass** (consumer) is a different product. Do not mix Dev Kit hardware, G520 naming, or consumer copy into this app.
- **Stack OS** = the OS on the glasses. Apps install as APKs.
- **Helix** = OS-level agent. There is no public Helix API yet — do not invent one.
- **Eliza** = on-device voice AI. Third-party API is not published yet — do not invent one.

## Hardware

- See-through Micro OLED. The real world is always visible behind the UI.
- 16MP first-person camera (CameraX).
- Dual speakers + microphone (no earbuds required).
- **No touchscreen.** Input is five physical keys + voice.
- Wi-Fi + Bluetooth. Deploy with ADB over USB or Wi-Fi.

## Keys (handle in `dispatchKeyEvent`)

| Physical        | Name       | Code |
|-----------------|------------|------|
| Scroll forward  | KEY_RIGHT  | 106  |
| Scroll backward | KEY_LEFT   | 105  |
| Confirm         | KEY_OK     | 352  |
| Return          | KEY_BACK   | 158  |
| Power           | POWER      | 164  |

Always consume `ACTION_DOWN` for these codes. Confirm selects. Return finishes / goes back. Scroll moves focus, not a mouse pointer.

## Build

- Language: Java or Kotlin.
- Gradle. `compileSdk 33`, `minSdk 21`, `targetSdk 33`.
- AndroidX AppCompat. Views or Compose — keep it light.
- Install: `adb install -r app-debug.apk`
- Debug: `adb logcat`

## UI rules

- Small, high-contrast, short. The user is looking through glass at the world.
- Dark backgrounds, light or cyan text. Avoid large opaque panels that block the scene.
- No Material phone patterns (FABs, nav drawers, multi-step forms, tiny labels).
- One primary action on screen. Prefer a few words over paragraphs.
- Do not require a paired phone for core features.

## APIs that exist today

- **Camera:** CameraX (`camera-core`, `camera-camera2`, `camera-lifecycle`, `camera-view`).
- **Mic:** `MediaRecorder` / `AudioRecord`.
- **Speaker:** `TextToSpeech` + `AudioManager.setSpeakerphoneOn(true)`.
- **Display:** normal Android layouts, sized for a small see-through panel.

## Do not

- Do not use TypeScript, `@neurastack/sdk`, REST, Swift, or Python as the glasses runtime.
- Do not add touch-only controls as the only way to use the app.
- Do not target phone DPIs or full-screen social layouts.
- Do not fabricate Eliza, Helix, or Stack OS system-service APIs.

## First app shape

`MainActivity` shows a short status line, implements `dispatchKeyEvent`, Confirm toasts or advances, Return calls `finish()`. Camera / mic / TTS only when the feature needs them, with the matching Android permission in the manifest.

When asked to "build a Neuraglass app," produce a Gradle Android app that follows this file, then say how to install it with ADB.
