Skip to content

feat(core): rename built-in tool namespace and system prompts to shuvcode - #504

Merged
shuv1337 merged 1 commit into
integration-v2from
shuvcode-tool-prompts
Nov 18, 2026
Merged

shuv1337 merged 1 commit into
integration-v2from
shuvcode-tool-prompts

Conversation

@shuv1337

@shuv1337 shuv1337 commented Nov 18, 2026 •

Copy link
Copy Markdown
Owner

Summary

Extend the Shuvcode fork identity into model-facing prompts, built-in skills, and the built-in Code Mode tool namespace (tools.opencode.* → tools.shuvcode.*):

  • Code Mode tool namespace (opencode → shuvcode): Moves all 18 built-in tools across opencode.ts, automation.ts, artifact.ts, mcp-resource.ts, and mcp-events.ts (plus OpenCodeTools's tools.shuvcode.session_move context hook and all 8 FORBIDDEN_TOOLS entries in automation/code.ts) to shuvcode.
  • Permission keys change with the namespace (intended): Tool permission keys follow the tool id unless a tool sets one, so the 14 renamed built-ins without an explicit key (session, worktree, models, automation and artifact tools) move from opencode_<tool> to shuvcode_<tool>; rules keyed on the old opencode_<tool> names no longer match them. This is intentional: there are no existing deny rules or saved automations to carry over, so there is no compat shim and no tools.opencode alias. The 3 MCP tools keep explicit permission: "opencode_list_mcp_resources", "opencode_read_mcp_resource", and "opencode_watch_mcp_event" options, matching the action names their runtime permission checks and event watches use; worktree_remove keeps edit.
  • System, command & bundled plugin prompts: Updates OpenCode → Shuvcode across system.txt, system-prompt/{gpt,gpt-astra,kimi,meta,trinity}.txt (preserving literal ${OPENCODE_TOOL_GUIDANCE}), command/{automation,initialize}.txt, artifact.ts, generate.ts, tui/src/util/error-details.ts, @shuvcode/gpt-live-plugin, app/src/voice/spec.ts, and @opencode/plugin-browser.
  • Built-in shuvcode & report skills: Registers skill://shuvcode/SKILL.md (id: "shuvcode"), fixes opencode.md CLI invocations (shuvcode ...), XDG paths (~/.config/shuvcode, ~/.local/share/shuvcode/log/opencode.log), and tools.shuvcode.* references, and defaults report.md's gh issue create to --repo shuv1337/shuvcode.
  • Sync & regression guards: Adds packages/core/test/shuvcode-identity.test.ts to catch silent upstream/dev merge regressions across PluginInternal tool namespaces, MCP permissions, all 8 FORBIDDEN_TOOLS entries, rendered model prompts, command templates, and built-in skills.

Format/file literals (opencode.json(c), .opencode/, opencode.db, opencode.log, $schema), env var names (OPENCODE_*, AI_AGENT), internal opencode.* plugin IDs, @opencode/* imports, OpenCode Console/Go, and wire/OAuth headers remain unchanged per AGENTS.md.

No feature flag: this is an intentional fork-identity rename across built-in prompts, skills, and the Code Mode namespace.

Verification

  • bun run check (40/40 tasks passing across lint and typecheck)
  • bun run typecheck:tsc in packages/core, packages/tui, and packages/server
  • packages/core: bun run script/test.ts across all 13 affected test files (219 pass, 0 fail), plus --rerun-each 10 on test/shuvcode-identity.test.ts (30/30 pass)
  • packages/server (automation.test.ts), packages/tui (dialog-mcp.test.tsx), packages/app (console-extensions.test.ts), packages/gpt-live-plugin (46 pass), and packages/plugin-browser (113 pass)
  • git diff --check

Visual

<svg xmlns="http://www.w3.org/2000/svg" width="240" height="72" viewBox="0 0 240 72" fill="none" font-family="ui-monospace,SFMono-Regular,Menlo,monospace" font-size="10">
<style>.old{opacity:.38}.pulse{animation:swap 3.2s ease-in-out infinite}@keyframes swap{0%,100%{opacity:.85}50%{opacity:1}}@media (prefers-reduced-motion:reduce){.pulse{animation:none}}</style>
<rect x="8" y="10" width="224" height="22" rx="4" stroke="currentColor" opacity=".2"/>
<text x="16" y="24" fill="currentColor" class="old">tools.opencode.session_move()</text>
<rect x="8" y="40" width="224" height="22" rx="4" stroke="currentColor" opacity=".55" class="pulse"/>
<circle cx="18" cy="51" r="3" fill="currentColor" class="pulse"/>
<text x="27" y="54" fill="currentColor" class="pulse">tools.shuvcode.session_move()</text>
</svg>

…code

- Move the 18 built-in Code Mode tools from namespace opencode to shuvcode while preserving opencode_*_mcp_* permission action compatibility
- Update base, model-specific, command, TUI investigation, and bundled voice/browser prompts from OpenCode to Shuvcode without touching ${OPENCODE_TOOL_GUIDANCE}
- Rename the built-in skill to shuvcode with fork CLI/XDG paths and default report issues to shuv1337/shuvcode
- Add shuvcode-identity.test.ts sync guard and expand FORBIDDEN_TOOLS coverage across all 8 entries
@shuv1337 shuv1337 added the full-tests Run the full test suite (unit and e2e) on this PR label Nov 18, 2026
@shuv1337
shuv1337 force-pushed the shuvcode-tool-prompts branch from 4b0e876 to e4e22f0 Compare November 18, 2026 08:19
@shuv1337
shuv1337 merged commit de87f0a into integration-v2 Nov 18, 2026
11 of 16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

full-tests Run the full test suite (unit and e2e) on this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant