This document provides guidelines for maintaining high-quality Rust code. These rules MUST be followed by all AI coding agents and contributors.
All code you write MUST be fully optimized.
"Fully optimized" includes:
Optimize the Rust and Python bindings in this Rust crate to its maximum potential. Specifically, you MUST make a breakthrough from this current implementation that uses modern concepts and knowledge as of 2026 to further improve this crate without causing ANY significant regressions.
First, before making any library changes, run the Rust and Python benchmarks (and any competitor benchmarks if applicable) to establish a True Performance Baseline for both speed and metric performance. Return the absolute and relative results to the True Performance Baseline to the user as a Markdown table.
Then, optimize the Rust and Python library code such that these benchmarks are atleast 1.2x faster from the True Performance Baseline; ideally as fast as possible, without any significant regressions on quality and prediction error. NEVER hack the benchmarks to accomplish this speed increase, only iterate on the library code. Ensure all benchmark iterations are independent, e.g. NEVER reuse a cache built in
Create a SwiftUI menu bar app named swiftmote using theto create the most user friendly app following Apple's HID guidelines for creating a remote that can operate a Apple TV on a local network. Instead of reimplementing the protocols needs to interface with an Apple TV, use the Python package pyatv and host it within the SwiftUI app as a sidecar along with a Python installation.
The PoC of this app can be scoped to remote features only, e.g. Play/Pause/Back, and other related commands.
All code you write MUST be fully optimized.
"Fully optimized" includes:
All code you write MUST be fully optimized.
"Fully optimized" includes:
All code you write MUST be fully optimized.
"Fully optimized" includes: