Interactive SDD model selection and profile management for opencode.
Manage SDD (Spec-Driven Development) profiles from gentle-ai directly from the opencode TUI.
sdd-* (except sdd-orchestrator), review-*, and jd-*. On activation, the plugin ensures matching *-fallback agents exist and stay in sync with their base agent config. Primary models are applied first, so you can define new agents and their fallbacks in a single profile activation.Profiles are stored as JSON files under ~/.config/opencode/profiles/:
{
"models": {
"sdd-init": "openai/gpt-4o",
"sdd-spec": "anthropic/claude-sonnet-4-6",
"sdd-apply": "anthropic/claude-sonnet-4-6"
},
"fallback": {
"sdd-init": "google/gemini-flash-2.0",
"sdd-apply": "openai/gpt-4o-mini"
}
}
models: primary model per managed base agent (sdd-*, review-*, jd-*, plus gentle-orchestrator when present in the runtime config).fallback: optional fallback model override per managed base agent name. If omitted, the fallback agent inherits the base model.Profile versions are stored separately under ~/.config/opencode/profile-versions/, or $XDG_CONFIG_HOME/opencode/profile-versions/ when XDG_CONFIG_HOME is set. Version metadata is not written into the main profile JSON file, so profile files stay portable and focused on runtime model configuration.
Legacy flat format is also supported for backwards compatibility:
{
"sdd-init": "openai/gpt-4o",
"sdd-apply": "anthropic/claude-sonnet-4-6"
}
Full integration with the Engram memory system via its HTTP API.
Add the plugin to your tui.json:
~/.config/opencode/tui.json
{
"$schema": "https://opencode.ai/tui.json",
"plugin": ["opencode-sdd-engram-manage"]
}
To check the latest published version on npm:
npm view opencode-sdd-engram-manage version
To check the version currently cached by OpenCode:
jq -r .version ~/.cache/opencode/packages/opencode-sdd-engram-manage@latest/node_modules/opencode-sdd-engram-manage/package.json
Note: the cache path above assumes you installed the plugin as
opencode-sdd-engram-manage@latest(or without an explicit version). If you pin a version, the cache directory name will use that pinned spec instead.
OpenCode installs npm plugins automatically and caches them. To force OpenCode to fetch the latest published version, remove the cached package and restart OpenCode:
rm -rf ~/.cache/opencode/packages/opencode-sdd-engram-manage@latest
You can also pin a specific version in tui.json:
{
"$schema": "https://opencode.ai/tui.json",
"plugin": ["opencode-sdd-engram-manage@1.2.0"]
}
Open the plugin with:
Alt + K (Linux/Win) or Cmd + K (macOS)/sdd-modelTo customize the shortcut, create ~/.config/opencode/sdd-model-select.json:
{
"shortcut": "ctrl+j"
}
Notes:
shortcut accepts one binding string. If it starts with alt+, the plugin also registers the matching super+ binding for macOS compatibility.shortcuts accepts an explicit array when you want full control:{
"shortcuts": ["ctrl+j", "super+j"]
}
Alt+K / Cmd+K or /sdd-model).From a profile detail screen, Bulk actions... lets you apply one model selection to many phase entries:
The difference is intentional:
Compact flow example:
Before: profile has mixed primary models and missing fallbacks.
Bulk action: Set all fallback phases β google/gemini-flash-2.0.
After: existing primary models stay untouched; empty fallbacks are filled.
Safety: Profile versions... β preview the saved snapshot β restore if the bulk change was not what you wanted.
Before any bulk operation is applied, the plugin saves a profile version automatically.
These compact mockups show the new profile flows without relying on image assets:
Profile: team-default active
ββββββββββββββββββββββββββββββββββββββββββββββββββ
Primary phases
sdd-spec anthropic/claude-sonnet-4-6
sdd-apply openai/gpt-5.5
Fallback phases
sdd-spec google/gemini-flash-2.0
sdd-apply inherited from primary
[Activate] [Bulk actions...] [Profile versions...]
Bulk actions
ββββββββββββββββββββββββββββββββββββββββββββββββββ
Set
Set all primary phases
Set all fallback phases
Set all phases and fallbacks
Override
Override all primary phases requires confirmation
Override all fallback phases requires confirmation
Override all phases and fallbacks requires confirmation
Profile versions: team-default
ββββββββββββββββββββββββββββββββββββββββββββββββββ
When Bulk Phase
2026-04-26 14:08 Set all fallback phases all fallback phases
2026-04-26 13:52 Override all primary phases all primary phases
2026-04-26 13:10 Manual edit sdd-apply
Preview version 2026-04-26 14:08
ββββββββββββββββββββββββββββββββββββββββββββββββββ
models.sdd-apply openai/gpt-5.5
fallback.sdd-apply google/gemini-flash-2.0
[Restore this version] [Back]
Restore? This replaces the current profile file.
Use Profile versions... from the profile detail screen to review saved profile snapshots.
Version history is stored outside the profile JSON under ~/.config/opencode/profile-versions/, or $XDG_CONFIG_HOME/opencode/profile-versions/ when configured. The profile JSON itself only contains model data (models and fallback); version metadata is kept out of the main profile file.
This is what users will see after installing the plugin:
This repo includes a script to ensure the sdd-orchestrator prompt contains the fallback policy block required for managed *-fallback agents to work correctly when a primary sub-agent fails.
scripts/ensure-orchestrator-fallback-policy.tsopencode.json and external {file:...} references.# Check mode (no changes)
npm run orchestrator:fallback:check
# Apply changes
npm run orchestrator:fallback:apply
# Custom config path
node ./scripts/ensure-orchestrator-fallback-policy.ts --config /path/to/opencode.json
Under examples/:
opencode-inline.json β inline orchestrator prompt configopencode-external.json + sdd-orchestrator-example.md β external prompt file configprofiles/*.json β profile payloads in new and legacy formatsRun smoke validation:
npm run examples
Validates:
models + fallback) and legacy formats.Community PRs are welcome, but they must follow the repository review policy:
feat/short_description or fix/short_descriptionSee CONTRIBUTING.md for the full workflow and review requirements.
npm test
Test coverage:
src/profiles.test.ts β profile read/write, fallback sync, validation, activation logicsrc/memories.test.ts β memory listing, deletion, normalization, sqlite query escapingsrc/utils.test.ts β formatting helpers, agent naming predicates, model resolutionsrc/config.test.ts β path resolution, XDG support, project name detectionscripts/ensure-orchestrator-fallback-policy.test.ts β fallback policy injection logicUses semantic-release on pushes to main. See docs/publish.md for the full publish workflow and commit conventions.
opencode-sdd-engram-manageopencode >= 1.3.13, Engram server running on port 7437.@opencode-ai/plugin >= 1.14.29, @opentui/core >= 0.2.0 < 1, @opentui/solid >= 0.2.0 < 1, solid-js 1.9.12Developed by j0k3r-dev-rgl.
TypeScript
95.9%
JavaScript
4.1%
Interactive SDD model selection and profile management for opencode.
Manage SDD (Spec-Driven Development) profiles from gentle-ai directly from the opencode TUI.
sdd-* (except sdd-orchestrator), review-*, and jd-*. On activation, the plugin ensures matching *-fallback agents exist and stay in sync with their base agent config. Primary models are applied first, so you can define new agents and their fallbacks in a single profile activation.Profiles are stored as JSON files under ~/.config/opencode/profiles/:
{
"models": {
"sdd-init": "openai/gpt-4o",
"sdd-spec": "anthropic/claude-sonnet-4-6",
"sdd-apply": "anthropic/claude-sonnet-4-6"
},
"fallback": {
"sdd-init": "google/gemini-flash-2.0",
"sdd-apply": "openai/gpt-4o-mini"
}
}
models: primary model per managed base agent (sdd-*, review-*, jd-*, plus gentle-orchestrator when present in the runtime config).fallback: optional fallback model override per managed base agent name. If omitted, the fallback agent inherits the base model.Profile versions are stored separately under ~/.config/opencode/profile-versions/, or $XDG_CONFIG_HOME/opencode/profile-versions/ when XDG_CONFIG_HOME is set. Version metadata is not written into the main profile JSON file, so profile files stay portable and focused on runtime model configuration.
Legacy flat format is also supported for backwards compatibility:
{
"sdd-init": "openai/gpt-4o",
"sdd-apply": "anthropic/claude-sonnet-4-6"
}
Full integration with the Engram memory system via its HTTP API.
Add the plugin to your tui.json:
~/.config/opencode/tui.json
{
"$schema": "https://opencode.ai/tui.json",
"plugin": ["opencode-sdd-engram-manage"]
}
To check the latest published version on npm:
npm view opencode-sdd-engram-manage version
To check the version currently cached by OpenCode:
jq -r .version ~/.cache/opencode/packages/opencode-sdd-engram-manage@latest/node_modules/opencode-sdd-engram-manage/package.json
Note: the cache path above assumes you installed the plugin as
opencode-sdd-engram-manage@latest(or without an explicit version). If you pin a version, the cache directory name will use that pinned spec instead.
OpenCode installs npm plugins automatically and caches them. To force OpenCode to fetch the latest published version, remove the cached package and restart OpenCode:
rm -rf ~/.cache/opencode/packages/opencode-sdd-engram-manage@latest
You can also pin a specific version in tui.json:
{
"$schema": "https://opencode.ai/tui.json",
"plugin": ["opencode-sdd-engram-manage@1.2.0"]
}
Open the plugin with:
Alt + K (Linux/Win) or Cmd + K (macOS)/sdd-modelTo customize the shortcut, create ~/.config/opencode/sdd-model-select.json:
{
"shortcut": "ctrl+j"
}
Notes:
shortcut accepts one binding string. If it starts with alt+, the plugin also registers the matching super+ binding for macOS compatibility.shortcuts accepts an explicit array when you want full control:{
"shortcuts": ["ctrl+j", "super+j"]
}
Alt+K / Cmd+K or /sdd-model).From a profile detail screen, Bulk actions... lets you apply one model selection to many phase entries:
The difference is intentional:
Compact flow example:
Before: profile has mixed primary models and missing fallbacks.
Bulk action: Set all fallback phases β google/gemini-flash-2.0.
After: existing primary models stay untouched; empty fallbacks are filled.
Safety: Profile versions... β preview the saved snapshot β restore if the bulk change was not what you wanted.
Before any bulk operation is applied, the plugin saves a profile version automatically.
These compact mockups show the new profile flows without relying on image assets:
Profile: team-default active
ββββββββββββββββββββββββββββββββββββββββββββββββββ
Primary phases
sdd-spec anthropic/claude-sonnet-4-6
sdd-apply openai/gpt-5.5
Fallback phases
sdd-spec google/gemini-flash-2.0
sdd-apply inherited from primary
[Activate] [Bulk actions...] [Profile versions...]
Bulk actions
ββββββββββββββββββββββββββββββββββββββββββββββββββ
Set
Set all primary phases
Set all fallback phases
Set all phases and fallbacks
Override
Override all primary phases requires confirmation
Override all fallback phases requires confirmation
Override all phases and fallbacks requires confirmation
Profile versions: team-default
ββββββββββββββββββββββββββββββββββββββββββββββββββ
When Bulk Phase
2026-04-26 14:08 Set all fallback phases all fallback phases
2026-04-26 13:52 Override all primary phases all primary phases
2026-04-26 13:10 Manual edit sdd-apply
Preview version 2026-04-26 14:08
ββββββββββββββββββββββββββββββββββββββββββββββββββ
models.sdd-apply openai/gpt-5.5
fallback.sdd-apply google/gemini-flash-2.0
[Restore this version] [Back]
Restore? This replaces the current profile file.
Use Profile versions... from the profile detail screen to review saved profile snapshots.
Version history is stored outside the profile JSON under ~/.config/opencode/profile-versions/, or $XDG_CONFIG_HOME/opencode/profile-versions/ when configured. The profile JSON itself only contains model data (models and fallback); version metadata is kept out of the main profile file.
This is what users will see after installing the plugin:
This repo includes a script to ensure the sdd-orchestrator prompt contains the fallback policy block required for managed *-fallback agents to work correctly when a primary sub-agent fails.
scripts/ensure-orchestrator-fallback-policy.tsopencode.json and external {file:...} references.# Check mode (no changes)
npm run orchestrator:fallback:check
# Apply changes
npm run orchestrator:fallback:apply
# Custom config path
node ./scripts/ensure-orchestrator-fallback-policy.ts --config /path/to/opencode.json
Under examples/:
opencode-inline.json β inline orchestrator prompt configopencode-external.json + sdd-orchestrator-example.md β external prompt file configprofiles/*.json β profile payloads in new and legacy formatsRun smoke validation:
npm run examples
Validates:
models + fallback) and legacy formats.Community PRs are welcome, but they must follow the repository review policy:
feat/short_description or fix/short_descriptionSee CONTRIBUTING.md for the full workflow and review requirements.
npm test
Test coverage:
src/profiles.test.ts β profile read/write, fallback sync, validation, activation logicsrc/memories.test.ts β memory listing, deletion, normalization, sqlite query escapingsrc/utils.test.ts β formatting helpers, agent naming predicates, model resolutionsrc/config.test.ts β path resolution, XDG support, project name detectionscripts/ensure-orchestrator-fallback-policy.test.ts β fallback policy injection logicUses semantic-release on pushes to main. See docs/publish.md for the full publish workflow and commit conventions.
opencode-sdd-engram-manageopencode >= 1.3.13, Engram server running on port 7437.@opencode-ai/plugin >= 1.14.29, @opentui/core >= 0.2.0 < 1, @opentui/solid >= 0.2.0 < 1, solid-js 1.9.12Developed by j0k3r-dev-rgl.
TypeScript
95.9%
JavaScript
4.1%