feat:12309 feat:16012 and others: Command and Agent Library Interface#16239
Closed
xman2000 wants to merge 15 commits intoanomalyco:devfrom
Closed
feat:12309 feat:16012 and others: Command and Agent Library Interface#16239xman2000 wants to merge 15 commits intoanomalyco:devfrom
xman2000 wants to merge 15 commits intoanomalyco:devfrom
Conversation
This branch fully migrates the fork from legacy prompt JSON packs to a command/agent Library model across desktop and TUI. It removes prompt-pack infrastructure, introduces markdown-first command/agent authoring, and aligns UI behavior around safe insert mode. What changed Replaced legacy .opencode/prompts/*.json workflow with: .opencode/command/**/*.md .opencode/agent/**/*.md Added large command and agent library content, including AI category and root “create new” actions. Updated desktop Library panel: command-focused browsing and search agent selection pulldown (defaulting to build when available) bottom single-line “Create a New Command/Agent” actions improved hover details and icon handling Updated TUI Library sidebar: removed todo panel section cleaned prompt-era naming/copy in command/agent flows Added metadata support through config and API surfaces: command: title, summary, category, icon, tags agent: title, summary, category, icon, tags Added compatibility behavior: nested command names preserve path ids and add flat aliases when unique agent aliases: docs -> documentation, planning -> plan, triage -> troubleshooting Rewrote docs: README.md fork section rewritten for the new Library model added .opencode/command/README.md added .opencode/agent/README.md removed legacy prompt docs and packs Behavior changes to call out Prompt JSON packs are no longer supported. Library content is now markdown commands and agents only. Command insertion remains non-auto-send for safety. Command naming may include nested path ids; unique leaf aliases are available. Validation bun run typecheck passed in: packages/app packages/opencode New compatibility tests added and passing: command alias behavior (config.test.ts) agent alias behavior (agent.test.ts)
Contributor
|
This PR doesn't fully meet our contributing guidelines and PR template. What needs to be fixed:
Please edit this PR description to address the above within 2 hours, or it will be automatically closed. If you believe this was flagged incorrectly, please let a maintainer know. |
Contributor
|
Hey! Your PR title Please update it to start with one of:
Where See CONTRIBUTING.md for details. |
Author
Contributor
|
This pull request has been automatically closed because it was not updated to meet our contributing guidelines within the 2-hour window. Feel free to open a new pull request that follows our guidelines. |
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.


There are a few requests for UI's for the commands and agents such as
#12309
#16012
This PR introduces a markdown-based library workflow for reusable commands and agents, and applies it consistently across the Desktop app and TUI.
The core model is now file-based:
commands from .opencode/command//*.md
agents from .opencode/agent//*.md
Metadata for both objects is supported end-to-end (title, description, summary, category, icon, tags), with command-specific fields (agent, model, subtask) and existing agent configuration behavior preserved.
On Desktop, the Library panel now supports category browsing, command search, hover details, command/agent folder actions, and an agent pulldown for insertion context. Command selection inserts content into the composer without auto-send. Two root actions are available at the bottom of the list: Create a New Command and Create a New Agent which allow the user to create new commands and agents that are properly formatted and stored correctly.
On TUI, the sidebar flow has been updated to command/agent terminology and command insertion behavior.
Library content in this branch includes:
a full command set under .opencode/command/
AI commands grouped under .opencode/command/ai/
agent definitions under .opencode/agent/
Compatibility behavior is included:
nested command names remain valid; flat aliases are added when leaf names are unique
agent alias mapping resolves:
docs -> documentation
planning -> plan
triage -> troubleshooting
Documentation updates:
revised README.md fork section to describe current behavior
added .opencode/command/README.md and .opencode/agent/README.md
updated create-command and create-agent templates with explicit input placeholder:
<>
Validation:
bun run typecheck in packages/app
bun run typecheck in packages/opencode
targeted tests added/passing for:
command alias behavior (packages/opencode/test/config/config.test.ts)
agent alias behavior (packages/opencode/test/agent/agent.test.ts)