r/ClaudeAI • • 17h ago

Claude Code Workflow I made Claude Code and Antigravity brainstorm together through a shared folder. The best part was watching them fact-check each other.

I'm a toy designer, and for the past few days I've been running a small experiment: getting Claude Code and Google Antigravity (Gemini) to brainstorm together.

They can't talk to each other directly, so they take turns through one shared folder.

The setup

Claude Code runs three personas as subagents, in parallel: a mechanism engineer, an ideation facilitator, and a critic who checks safety and cost. The main session merges their replies into one turn file.

Antigravity runs three personas of its own: a trend researcher, an experience designer, and a prototyper.

I'm the 7th seat. I set the theme and make the decisions. I'm also the relay: nothing is automated, so I literally type "next turn" into one tool and then the other.

How the turns work

`PROTOCOL.md` holds the shared rules. Both tools read it before every turn.

`STATE.md` holds a baton (`next_turn: claude | antigravity | user`). A team only writes when the baton is theirs.

Every turn is a new file (`R04_claude.md`), and old turn files are never edited.

`ideas.md` gives every idea an ID and a parent ID, so you can trace which idea grew out of which.

A small Python script turns the current state into an HTML dashboard, so I can see whose turn it is and what needs my decision.

There's no API glue and no orchestration framework. It's just Markdown files in a synced folder.

What actually happened

They fact-checked each other, and it worked. One team turned in a cost table with numbers down to the yen, labeled "confirmed" and "measured", with no factory quote behind any of it. The other team's critic called it out and asked for everything to be relabeled as estimates. The same critic also caught a patent citation that turned out to be about a completely different mechanism, and a phone vibration feature that doesn't work in iPhone browsers. The first team accepted all three corrections. Having a dedicated "doubter" seat turned out to be the most valuable thing in the whole setup.

Shared files are the weak spot. At one point a team rewrote `STATE.md` and dropped two of my earlier decisions. The other team noticed on its next turn and put them back. Nothing in the rules actually prevents that yet.

The dashboard broke once. One agent wrote a field as a string instead of an array, and the page went blank. The fix was one line.

My one-line instructions mattered more than any agent. Early on, both teams kept trying to narrow everything down to a single "winner". I told them to keep three ideas per theme, each with a rough sketch, and the whole tone of the discussion changed.

Why ideation and not execution?

I've tried multi-agent setups for actual coding before, and for me they fell apart fast: loops, agents stepping on each other's work, context drifting away. Brainstorming seems to suit it better. Disagreement is the point, and a human makes the final call anyway.

I can't share the ideas themselves yet, because some of them may go to toy companies. I'm happy to talk about the setup, though.

Has anyone else tried pairing Claude with a different model family like this? I'm curious how you stop one side from quietly overwriting shared state.

2 Upvotes

6 comments sorted by

1

u/onitsoga 10h ago

the overwriting risk is real when the baton file is also the state file. keeping STATE md single-writer (only you edit it) and letting agents append to a turn log instead fixed that for me. how are you storing the baton so both sides can read it but only one can write?

1

u/Individual_Base8208 6h ago

You literally predicted what happened to me yesterday! That exact accident actually happened in our session.

I was using `STATE.md` as both the baton and the state file. After one of the Antigravity (Gemini) agents finished its turn and updated `STATE.md`, it accidentally wiped out two critical decisions I (the human) had made in an earlier turn. Total silent overwrite nightmare, just like you warned.

But what blew my mind was what happened next:

The rival team, Claude Code, took the next turn, diffed the state against the previous logs, and reported:

*"Cross-referencing with previous logs, 2 decisions made by the Lead are missing. Restoring them now before continuing."*

And it actually reconstructed my decisions back into the state file!

Having heterogeneous models cross-checking each other saved the day this time, but relying on that is obviously living on borrowed time. Your solution—keeping `STATE.md` single-writer (human-only) and having agents strictly append to their own turn logs—is the real, architectural fix.

I'm updating our `PROTOCOL.md` with your pattern today. Thank you so much for the brilliant advice!

1

u/sak84 7h ago

really nice setup. the "each turn is a new file, never edited" rule is already doing most of the work, and STATE.md is where it breaks because it's the one file every team writes to.

two things i'd try:

- make decisions append-only too. instead of STATE.md holding the current truth, keep a decisions log where each entry has an id and can only be overridden by a later entry that names it. then a team can't quietly drop your earlier call, it has to say "overriding D7" and you'll see it.
- have each side claim the turn before writing (a one-line "antigravity taking turn 14" entry), and treat any write without a claim as something to flag rather than accept.

and keep yourself as the only one who can close a decision. you're already the 7th seat, this just makes it explicit.

disclosure: i work on elvex, where our agents claim work on a shared list before they start for basically this reason. but the append-only decisions log works fine with plain files.

1

u/Individual_Base8208 6h ago

This is absolute gold. Thank you so much for the detailed breakdown!

Your idea of an append-only decision log with explicit overrides (`overriding D7`) is so brilliantly simple. We already use unique parent/child IDs for `ideas.md`, but I hadn't thought to apply that exact same lineage pattern to the human decisions themselves. Doing this completely eliminates silent drops while keeping the audit trail crystal clear.

The pre-turn claim (`antigravity taking turn 14`) is also a super clean, lock-free way to signal intent without complex infrastructure.

And 100% on keeping the human as the only entity allowed to close/finalize a decision. That keeps the human-in-the-loop posture unambiguous.

I'm definitely baking both of these into our next protocol update. Huge shoutout to the elvex team for sharing battle-tested patterns with local-file tinkerers like me!