fix(tui)!: per-agent role models in workflow.yaml + canonical SDD preload#68
Merged
Conversation
…reload
BREAKING CHANGE: WorkflowRole.Model (single string) is removed. Subagent roles
must now declare a non-empty `models` map keyed by agent name (claude,
opencode, copilot). Catalogs that still use `model:` will fail Validate().
Why
---
The TUI model-selection step on a fresh install never received the yaml's
declared model defaults. app.go passed an empty []WorkflowManifest to
RunWorkflowModelSelection (model selection runs before the catalog scan by
design), so the synthetic fallback in workflow_models.go used `Model: roleName`
placeholders instead of real values. Even when the user later saved choices
to devrune.yaml, the catalog could only express one tier per role across all
agents — not enough for "haiku on claude, claude-haiku-4.5 on opencode,
Claude Haiku 4.5 on copilot".
Schema
------
roles:
- name: sdd-explorer
kind: subagent
skill: sdd-explore
models:
claude: haiku
opencode: haiku
copilot: Claude Haiku 4.5
Validate() now requires a non-empty `models` for kind: subagent and rejects
`models` on kind: orchestrator.
Architecture
------------
DevRune fetches SDD's workflow.yaml from the canonical catalog source
(github:davidarce/devrune-starter-catalog) at wizard start via the existing
cache layer, before the model-selection step. Cache makes subsequent runs
near-instant; first run is the same fetch the regular scan step performs
moments later. The synthetic hardcoded SDD role list is gone.
Renderer migration
------------------
buildWorkflowPlaceholderReplacements gains an `agentName` parameter; each
renderer (claude / opencode / copilot) passes its own name and reads
role.Models[agent] instead of role.Model. ModelFor(agent) is a new accessor
that returns the empty string when the map is nil.
Closes #67
GPT-5.5 is the latest standard OpenAI model available in Copilot. Slotted above GPT-5.4 in the OpenAI block (newest-first within versioned siblings, matching the existing convention for Opus 4.7 vs 4.6). Tier 2.0 / multiplier 1× / "Pro and above" — same shape as GPT-5.4. Tests that lock the canonical option order are shifted accordingly (xAI moves from idx 11 → 12; tier-2 filter total 10 → 11).
davidarce
force-pushed
the
fix/workflow-role-per-agent-models
branch
from
May 9, 2026 18:54
fea8399 to
201baed
Compare
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
WorkflowRole.Model(single string) is replaced byWorkflowRole.Models map[string]stringkeyed by agent name (claude/opencode/copilot). Required forkind: subagent; rejected onkind: orchestrator.workflow.yamlfrom the canonical catalog source (github:davidarce/devrune-starter-catalog) at wizard start via the existing cache layer, before the model-selection step. The synthetic hardcoded SDD role list is gone.role.Models[agent]instead ofrole.Model.buildWorkflowPlaceholderReplacementsgains anagentNameparameter.Why
The TUI model-selection step on a fresh install never received the yaml's declared model defaults.
app.gopassed an empty[]WorkflowManifesttoRunWorkflowModelSelection(model selection runs before the catalog scan by design), so the synthetic fallback inworkflow_models.go:909-917usedModel: roleNameplaceholders instead of real values. Even when the user later saved choices todevrune.yaml, the catalog could only express one tier per role across all agents — not enough for "haiku on claude, claude-haiku-4.5 on opencode, Claude Haiku 4.5 on copilot".Schema
Architecture
internal/tui/scanner.goexposesFetchSDDWorkflow(ctx, cachePath)and the constantCanonicalSDDSource.app.go:115-133calls it before invokingRunWorkflowModelSelection, passing the resulting manifest. The same fetch is performed again at the regular scan step but the cache layer makes it near-instant. Network failures fall through silently — the wizard continues with "inherit" defaults.Breaking change
Catalogs that still declare
model:instead ofmodels:will failValidate(). Requires the matching catalog update indavidarce/devrune-starter-catalog#53.Test plan
go test ./...(full suite)TestSubagentRoles_FiltersByModelsMap,TestWorkflowRole_ValidateModelsRequired,TestWorkflowRole_ModelForCloses #67
🤖 Generated with Claude Code