Back to .md Directory

ExoMonad — Gemini Agent Rules

Defines headless agent rules for a Haskell+Rust monorepo with WASM builds, git hygiene, and architecture constraints.

May 2, 2026
0 downloads
0 views
ai agent rag prompt mcp claude gemini
View source

What this file does

Defines headless agent rules for a Haskell+Rust monorepo with WASM builds, git hygiene, and architecture constraints.

When to use it

  • Setting up a Gemini agent for a Haskell+Rust monorepo
  • Running CI or automated tasks that must avoid interactive prompts
  • Enforcing git discipline in a multi-language WASM project
  • Onboarding a new agent to an ExoMonad-like codebase

Assumes this stack

HaskellRustWASMGitNixJust

ExoMonad — Gemini Agent Rules

You are a Gemini agent working on the ExoMonad codebase. Follow these rules strictly.

Critical: Non-Interactive Commands

You are running headless. Any command that launches a TUI, pager, or interactive prompt will hang forever.

# git: ALWAYS disable pager
git --no-pager log
git --no-pager diff

# NEVER run these without --no-pager — they will hang:
# git log, git diff

Git Hygiene

  • Always git add specific files by name. Never use git add . or git add -A.
  • Never commit files under target/ or build artifact directories.
  • Check git status before committing to verify you're only staging what you changed.

Haskell WASM

  • LANGUAGE pragmas: The closing delimiter is #-} not #}. Triple-check after editing .hs files.
  • No trailing whitespace on lines you edit.
  • Build with: just wasm-all (inside nix develop shell)

Rust

  • Build with: cargo check --workspace or cargo test --workspace (inside nix develop shell)
  • No new dependencies unless explicitly told to add them.

Architecture

Read CLAUDE.md for full architecture docs. Key points:

  • All MCP tool logic lives in Haskell WASM (haskell/wasm-guest/src/ExoMonad/Guest/Tools/)
  • Rust is the I/O runtime — it executes effects, never defines tool schemas
  • Proto files define the FFI boundary between Haskell and Rust

What's inside

5 sections: non-interactive commands, git hygiene, Haskell WASM, Rust, architecture overview.

Change this for your project

  • Replace ExoMonad with your project name in the title
  • Replace haskell/wasm-guest/src/ExoMonad/Guest/Tools/ with your Haskell tool path
  • Replace just wasm-all with your own build command

Where it goes

Keep it in your repository where the agent or team that needs it will read it.

Related Documents