ExoMonad — Gemini Agent Rules
Defines headless agent rules for a Haskell+Rust monorepo with WASM builds, git hygiene, and architecture constraints.
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
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 addspecific files by name. Never usegit add .orgit add -A. - Never commit files under
target/or build artifact directories. - Check
git statusbefore 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 --workspaceorcargo 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
ExoMonadwith your project name in the title - Replace
haskell/wasm-guest/src/ExoMonad/Guest/Tools/with your Haskell tool path - Replace
just wasm-allwith 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
Totem — Development Rules
Defines team-wide conventions for a pnpm monorepo: branch strategy, commit rules, tooling, and a mandatory knowledge-search workflow before coding.
MechCAD-MLLM
Proposes a MLLM + dual-decoder architecture for mechanical CAD generation, combining Drawing2CAD and CAD-GPT ideas.
Prompt Generator
Generates Stable Diffusion and Flux prompts via Qwen3-8B on Ollama, with a Gradio UI and CLI.
Agent Instructions
Defines a three-layer architecture (directive, orchestration, execution) for AI agents that self-anneal errors and update living SOPs.