mirror of
https://github.com/boxpositron/absolute-dotfiles.git
synced 2026-10-24 08:23:19 +00:00
refactor(opencode): restructure config and replace legacy plugins
Rewrites opencode.json, drops the with-context, websearch and terminal-bell plugins, adds plugins that strip Claude-only commands and OMC MCP servers, and vendors the impeccable, web-design-guidelines and frontend-workflow skills.
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
import { describe, expect, test } from "bun:test"
|
||||
|
||||
import {
|
||||
CLAUDE_ONLY_COMMAND_RULES,
|
||||
isClaudeOnlyCommand,
|
||||
} from "../plugin/lib/claude-only-command-registry"
|
||||
|
||||
describe("claude-only command registry", () => {
|
||||
test("matches every prefix rule with a representative command", () => {
|
||||
expect(isClaudeOnlyCommand("oh-my-claudecode:ultrawork")).toBe(true)
|
||||
expect(isClaudeOnlyCommand("claude-notifications-go:settings")).toBe(true)
|
||||
})
|
||||
|
||||
test("matches every exact rule", () => {
|
||||
expect(isClaudeOnlyCommand("remember:doctor")).toBe(true)
|
||||
expect(isClaudeOnlyCommand("mcp-server-dev:build-mcpb")).toBe(true)
|
||||
})
|
||||
|
||||
test("preserves cross-client commands and near misses", () => {
|
||||
expect(isClaudeOnlyCommand("remember:remember")).toBe(false)
|
||||
expect(isClaudeOnlyCommand("mcp-server-dev:build-mcp-server")).toBe(false)
|
||||
expect(isClaudeOnlyCommand("mcp-server-dev:build-mcp-app")).toBe(false)
|
||||
expect(isClaudeOnlyCommand("superpowers:brainstorming")).toBe(false)
|
||||
expect(isClaudeOnlyCommand("chrome-devtools-mcp:chrome-devtools")).toBe(false)
|
||||
expect(isClaudeOnlyCommand("oh-my-claudecode")).toBe(false)
|
||||
expect(isClaudeOnlyCommand("remember:doctor-notes")).toBe(false)
|
||||
})
|
||||
|
||||
test("requires a non-empty reason for every rule", () => {
|
||||
expect(CLAUDE_ONLY_COMMAND_RULES.length).toBeGreaterThan(0)
|
||||
for (const rule of CLAUDE_ONLY_COMMAND_RULES) {
|
||||
expect(rule.reason.trim().length).toBeGreaterThan(0)
|
||||
}
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user