@encoredigitalgroup/opencode
v0.2.14
Published
OpenCode planning pickers, a todo tracker, and a quota sidebar.
Maintainers
Readme
OpenCode planning commands
@encoredigitalgroup/opencode adds file pickers for OpenCode planning commands, a todo tracker, and quota reporting for Anthropic, OpenAI, and xAI (Grok).
The TUI provides /plan-review, /plan-resync, /plan-split, and /plan-execute commands. Each command opens a picker for plans in docs/_planning and
submits the selection with the matching installed skill. By default, the selection starts an OpenCode goal.
Install
OpenCode v2 loads this package from the plugins array. Add an object entry with the package name and its options:
- Use
~/.config/opencode/opencode.jsonto enable it for every project. - Use
opencode.jsonin a project to enable it only there.
{
"$schema": "https://opencode.ai/config.json",
"plugins": [
{
"package": "@encoredigitalgroup/opencode",
"options": {}
}
]
}Restart OpenCode after changing the configuration. OpenCode downloads missing npm plugins that appear in the plugins array, so you do not need to install this
package with Bun or npm yourself. This package supports OpenCode v2 only; replace the legacy plugin configuration entry when migrating from OpenCode v1.
The plugin resolves the mapped skills through OpenCode, so those skills can live in any location that OpenCode discovers.
Configuration
Set planDirectory and skillMappings in the object's options field. planDirectory is a non-empty path relative to the workspace. skillMappings can override
any supported command's installed skill name. goals defaults to true; set it to false to submit picker selections as ordinary prompts instead of goals.
enforceTodoTracker defaults to true; set it to false to disable tracker-refresh enforcement. Unspecified values use docs/_planning and the command's
existing skill name.
{
"$schema": "https://opencode.ai/config.json",
"plugins": [
{
"package": "@encoredigitalgroup/opencode",
"options": {
"planDirectory": "plans",
"goals": false,
"enforceTodoTracker": false,
"skillMappings": {
"plan-review": "custom-plan-review",
"plan-execute": "custom-plan-execute"
}
}
}
]
}Launching a picker from an existing session submits to that session. Launching one from the home screen creates and displays a new session before submitting the
selected plan. Starting a goal replaces any existing goal in that session. For /plan-execute, the goal points to the selected sub-plan directory.
Todo tracker
The plugin registers the direct todotracker tool. Each call replaces the current session's complete ordered todo list. Pass an empty todos array to clear the
list.
Each todo requires:
content: a non-empty string containing at least one non-whitespace character.status:pending,in_progress,completed, orcancelled.priority:high,medium, orlow.
Each tracker call replaces the complete ordered list. Include discovered work and current statuses in every replacement. Mark a todo completed only after verifying its result. Mark a todo cancelled only when the user explicitly cancels that work. Never clear a list or change a status to avoid tracker updates, tool restrictions, or difficult work.
The checklist renders only in the OpenCode terminal TUI sidebar. After a restart, it appears only when the completed todotracker result is in the host's loaded
message cache. That cache starts with the newest 20 messages, so older results are not shown until the host has loaded them.
Automatic refresh enforcement runs only while the latest valid list contains nonterminal work. After a session's first successful todotracker call, the plugin
requires another update at least once per minute while that work remains. When an update is due, it blocks every other tool until the tracker is updated. A valid
empty list or a list containing only completed and cancelled todos ends automatic refresh enforcement. A tracked subagent completing also requires its parent
session to update the tracker before continuing. Malformed tracker results remain enforcement-active because completion was not verified. Enforcement is disabled
for sessions that have never used todotracker, and can be disabled for all sessions with "enforceTodoTracker": false.
When a root session is idle, the sidebar renders the final in-progress todo as completed only when every earlier todo is completed. It restores the original status when work resumes.
Development
bun install
bun run check
bun run pack:checkRun bun run local:install to build the plugin and switch the local OpenCode configuration to this checkout. Run bun run local:uninstall to restore
@encoredigitalgroup/opencode@latest. Both commands preserve the plugin's configured options.
