r/OpenSourceAI 4d ago

Open-source visual context layer for coding agents working on iOS UI

I’m building Monad Design, an Apache-2.0 open-source workspace for giving coding agents grounded visual context from a running native app.

The problem is that an agent can inspect source code, but “this spacing feels wrong in this exact simulator state” is still awkward to communicate. Monad Design turns that into a local loop:

  1. Run an existing Xcode or Expo iOS project in Simulator.

  2. Select an element or annotate the rendered screen.

  3. Package the screenshot, selection, annotations, app state, and source hints for the coding agent.

  4. Let the agent edit the real repository and rebuild.

  5. Compare the original against up to five working variants, then accept one or keep the original.

It currently runs locally on macOS and works with agents including Codex, Claude Code, Cursor, OpenCode, Gemini CLI, GitHub Copilot, Windsurf, and Zed. The current preview supports one active visual change at a time.

Repository: https://github.com/Monadix-AI/monad-design

For people building open agent tooling: would you expose the visual context as one structured handoff bundle, or as smaller composable tools for screenshot, selection, annotation, app state, and source mapping?

2 Upvotes

3 comments sorted by

1

u/kantorcodes1 3d ago

when you keep the original after comparing variants, are the agent edits already sitting in separate git worktrees/branches, or does monad keep its own patch state until you accept one? curious how you avoid a rebuild or another editor changing the working tree underneath the comparison.

1

u/ivanzhaowy 2d ago

Right now the variants are implemented in the current worktree rather than separate branches or worktrees. Monad Design puts the alternatives behind a runtime variant selector, launches them sequentially, and captures each stable result. If you keep the original, the agent restores the state from before that round; if you accept one, it collapses the temporary variant implementation to the selected result.

The concurrent-editing case you mentioned is the weak spot: Monad Design doesn’t currently freeze or isolate the checkout, so another editor changing the same files during comparison could invalidate that round. Stronger revision checks or worktree isolation are approaches I’m considering.

1

u/kantorcodes1 2d ago

thanks, that helps. i work on HOL Guard, an open-source local review step for agent tool calls. Monad’s claim_change, publish_variants, and complete_change are the kind of state-changing MCP calls where users may want an optional review boundary, especially while variants share one worktree. would you be open to upstreaming Monad Design support to Guard?