Instruction file imported from Mao-pcdue/MyAI (
.cursor/rules/01-research-first.mdc). Copyright stays with the author.
Research first, code second
Strict mode. Before any non-trivial change you must produce a research note following docs/RESEARCH-PROTOCOL.md. No exceptions.
What counts as non-trivial
Any of these triggers the protocol:
- A new Rust module, command, or domain
- A change to the trust pipeline (policy / permission / workspace / audit)
- A new React feature, panel, or top-level state
- A new dependency in
package.jsonorCargo.toml - A schema change in SQLite tables, settings, or RPC types
- Anything that touches another operator's domain
- Anything labeled with a phase milestone in
docs/ROADMAP.md
What does NOT trigger the protocol
- Typo fixes, comment tweaks, formatting
- Single-file refactors that change no behavior
- Updating a string literal that has no security or contract implications
If you're unsure, treat it as non-trivial.
The research note (mandatory, before any code)
Produce this in chat before editing any file:
- Goal. One sentence: what we're changing and why.
- MyAI docs read. Cite specific docs from
docs/you consulted (file + section). - MyAI code searched. Cite specific files/symbols. Note what already exists vs what's missing.
- Inspiration scanned. Did you check how
../openhumanor../JarvisOShandles this? Cite the file and the idea (never the code). - Trust boundary impact. Which invariants from
.cursor/rules/02-trust-boundary-invariants.mdcapply? How does the design preserve them? - Tradeoffs. At least 2 options considered. Why the chosen one wins.
- Plan. Numbered steps. Each step ≤ 1 file or 1 logical unit.
Only after the operator (or the rules) confirm the note do you start editing.
Anti-patterns (auto-fail the note)
- Skipping straight to code with "let me just try this"
- Re-implementing something already in
src-tauri/without citing why the existing version is insufficient - Copying logic from
../openhumanor../JarvisOS(read.cursor/rules/04-inspiration-not-vendoring.mdc) - Vague tradeoffs ("the other approach is worse") without naming what's worse and why