Repository navigation
Conversation
Floorplan ran in Claude Code and Codex only. OpenCode discovers the same SKILL.md natively, so loading needed no changes; what was missing was recognising it (every command it runs carries OPENCODE_SESSION_ID), naming it in the map's prompts, and answering the Ask bar through it. Questions now run `opencode run` against a private server (--standalone) whose configuration, passed as OPENCODE_CONFIG_CONTENT, denies every write: reads, globs and greps stay allowed and shell is limited to floorplan/query.mjs. That config layer loads above the project's own, so the rules are enforced by OpenCode's server, not just the prompt. Runs are archived so they stay out of the session list, and follow-ups carry the conversation, as with Codex. OpenCode's CLI holds no answer schema, so the engine is unstructured and a blueprint's Change switch stays hidden with it, per the existing rule. Installing is one line in opencode.json, served by a generated skills/index.json catalog (tools/skill-catalog.mjs, re-run on release).
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 this changes
Floorplan now runs in OpenCode, alongside Claude Code and Codex: the same skill, scripts, map and Health check, on whichever models and providers you've connected there. Install is one line in
opencode.json(a generatedskills/index.jsoncatalog), then ask for a floorplan or mention@floorplan.scripts/lib/agent.mjs): OpenCode is recognised byOPENCODE_SESSION_ID/AI_AGENT=opencode, which it sets on every command it runs. Maps recordagent: "opencode", so prompts say "Fix with OpenCode" and "Build this with OpenCode" (new branch in the viewer'sAGENTmapping).assets/serve.mjs): a newopencodeengine runsopencode run --standalone --format json --archivedwith the prompt on stdin.--standalonestarts a private server for the run, which is what makes it read-only: the server's configuration (passed through theOPENCODE_CONFIG_CONTENTenvironment variable, a layer that loads above the project's own config) denies edits, subagents, web access and shell, exceptnode floorplan/query.mjs *— enforced by OpenCode's permission rules, not the prompt. Runs are archived so they stay out of the session list; follow-ups carry the conversation, as with Codex. The engine is unstructured (OpenCode's CLI has no output schema), so a blueprint's Change switch stays hidden with it, per the existing rule.tests/fixtures/fake-cli/fake-opencode.mjs) mirrors the real--format jsonevents; new cases intests/ask.test.mjs(engine fallback, the read-only config and working directory reaching the child,--archived, progress, follow-ups, sign-out) andtests/agents.test.mjs(detection, maps recording the agent, CLI labels). The supply-chain tripwire needed no new assertions — the engine spawns through the same allowedcli.cmd— and its programs list indocs/is-it-safe.mdwas updated alongside, as that test requires.The flags and event shapes were verified against OpenCode's own V2 source (
packages/cli/src/commands/commands.ts,run/run.ts,run/noninteractive.ts,packages/core/src/config.ts):--standaloneis what delivers our env-injected config to the server that enforces permissions (a shared background service would not load it), the JSONL events aretextdeltas plustool_useanderrorwith no completion event (hencerun.onClose), and--archivedkeeps runs out of session lists.How I tested it
node --checkpasses on every edited script;skills/index.jsongenerated and verified (54 files).claude plugin validate, and one live Ask through a signed-inopencode— left for the checklist.Checklist
npm testpassesclaude plugin validate .passesCHANGELOG.mdupdated, if people will notice the change