fix(materialize/renderers): stop consuming REGISTRY for OpenCode/Copilot installs#70
Merged
Merged
Conversation
…lot installs
OpenCode and Copilot have a primary `sdd-orchestrator` agent the user
explicitly selects (a custom agent in opencode.json / a `.agent.md` in
.github/agents/). The orchestrator playbook lives in that agent's prompt
— rendered from ORCHESTRATOR.{opencode,copilot}.md alone.
Until now, the renderer was also:
- prepending REGISTRY.{opencode,copilot}.md to the orchestrator prompt
- capturing the same registry content into r.registryContents for later
injection into AGENTS.md / copilot-instructions.md
Both paths leaked workflow-specific rules into non-workflow sessions
(ambient catalog) and duplicated / contradicted the orchestrator agent's
own playbook (prompt prepend). They were a Claude/Factory pattern
applied where it does not fit.
This change removes both consumers for OpenCode and Copilot:
- opencode.go: skip captureRegistryContent + pass registryPath="" to
synthesizeAgents.
- copilot.go: skip captureRegistryContent + pass registryPath="" to
installOrchestratorAgent.
buildOrchestratorEntry / installOrchestratorAgent still accept a
registryPath argument for backward compatibility — non-empty paths are
still read and prepended — but the canonical caller now passes "".
Tests updated to assert the new contract (RegistryContents must NOT
contain the workflow name for OpenCode/Copilot installs). Renames the
two test functions accordingly.
Pairs with devrune-starter-catalog change that deletes REGISTRY.opencode.md
/ REGISTRY.copilot.md (now dead code from the catalog's perspective) and
slims ORCHESTRATOR.{opencode,copilot}.md to remove duplication with the
deleted REGISTRY blocks.
7 tasks
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.
Summary
Pairs with the catalog PR that deletes `REGISTRY.opencode.md` / `REGISTRY.copilot.md` and slims `ORCHESTRATOR.{opencode,copilot}.md` to be the single-source orchestrator playbook.
OpenCode and Copilot have a primary `sdd-orchestrator` agent the user explicitly selects (custom agent in `opencode.json` / `.agent.md` in `.github/agents/`). That selection IS the consent to use the workflow. Until now, the renderer was also:
Both paths leaked workflow-specific rules into non-workflow sessions (ambient catalog) and duplicated / contradicted the orchestrator's own playbook (prompt prepend). They were a Claude/Factory pattern applied where it does not fit.
This change removes both consumers for OpenCode and Copilot. Claude / Factory / Codex paths are unchanged.
Changes
Tests
Compatibility
The change is forward-only: a workspace that materialised before this change still has the old REGISTRY-flavoured prompt in `opencode.json` / `.agent.md` until the next `devrune sync`, at which point the new prompt is rendered (REGISTRY content drops out, slim ORCHESTRATOR replaces it).
A workspace running this renderer against an old catalog (one that still ships `REGISTRY.{opencode,copilot}.md`) simply ignores those files — no error, no leak. A workspace running the old renderer against the new catalog (which deletes them) falls back to `REGISTRY.md` (generic Claude flavour) for the registry path, but reads an empty file capture, so the impact is harmless.
Pairing PR
Catalog: https://github.com/davidarce/devrune-starter-catalog/pull/new/fix/sdd-opencode-copilot-slim-orchestrator
Recommended order: merge catalog first, then this PR.
Test plan