feat(coop): shared design-doc tool for coop mode#71
Open
ProKil wants to merge 1 commit into
Open
Conversation
Add a `--shared-doc` flag (coop-only) that gives both agents a shared design document to agree on interfaces, file/symbol ownership, and data contracts while building in parallel. It is framed as a design doc, not a scratchpad, and lives outside /workspace/repo so it never enters the submitted patch. - mini_swe_agent_v2: mount a per-run docker volume at /workspace/shared, pre-seed DESIGN.md (noclobber so concurrent agents don't clobber), and add a prompt block in coop.yaml (gated on shared_doc_enabled). - openhands_sdk: sandboxes are network-isolated, so back the doc with the existing shared Redis instead of a docker volume. Expose it as design-show / design-note shell commands (layered into the -oh image) and inject the design-doc prompt section via coop_info. Atomic appends avoid the lost-update problem a Modal Volume would have. Threading: cli --shared-doc -> run() -> execute_coop -> _spawn_agent (config["shared_doc"]/["shared_volume"]) -> adapters. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds a coop-only
--shared-docflag: both agents get a shared design document to agree on interfaces, file/symbol ownership, and data contracts while implementing different features in parallel. Framed as a design doc (not a scratchpad), and kept outside/workspace/reposo it never lands in the submitted patch.How
/workspace/shared, pre-seedDESIGN.md(noclobber so the two concurrent agents don't clobber the seed), and add a prompt block incoop.yamlgated onshared_doc_enabled.design-show/design-noteshell commands (layered into the-ohimage). The design-doc prompt section is injected viacoop_info. Writes are atomic appends, avoiding the lost-update problem a Modal Volume would have for concurrent writers.Threading:
cli --shared-doc → run() → execute_coop → _spawn_agent (config["shared_doc"]/["shared_volume"]) → adapters.Eval (flash, coop+git, gemini-3-flash)
Both agents engaged the doc heavily. openhands+shared-doc scored 20% (10/50) vs mini_swe+shared-doc 10% (5/50).
Test
ruff,ruff format,mypy, and the fullpytestsuite (385 passed) all green.🤖 Generated with Claude Code