From d32e42499129cb21393edd42dfa2c48e1d1e31b7 Mon Sep 17 00:00:00 2001 From: dbpolito Date: Fri, 27 Mar 2026 18:57:49 -0300 Subject: [PATCH 1/2] refactor: remove Kompass skill support - drop skill config, schema, and runtime registration from core and OpenCode - remove skill-specific tests and packaged skill artifacts - update docs and site copy to reflect the reduced Kompass surface area --- kompass.schema.json | 69 -------- packages/core/index.ts | 3 - packages/core/lib/config.ts | 104 ------------ .../skills.todo/kompass-workflows/SKILL.md | 39 ----- packages/core/skills/README.md | 2 - packages/core/test/config.test.ts | 159 +----------------- packages/opencode/.opencode/skills/README.md | 2 - packages/opencode/config.ts | 110 +----------- packages/opencode/index.ts | 5 +- packages/opencode/package.json | 1 - packages/opencode/scripts/build.ts | 2 +- packages/opencode/scripts/compile.ts | 36 +--- packages/opencode/test/skills-config.test.ts | 59 ------- .../content/docs/docs/adapters/opencode.mdx | 2 - .../docs/docs/concepts/architecture.mdx | 2 +- .../src/content/docs/docs/config/overview.mdx | 8 - .../src/content/docs/docs/getting-started.mdx | 3 +- packages/web/src/content/docs/docs/index.mdx | 2 +- .../src/content/docs/docs/installation.mdx | 1 - .../docs/docs/reference/skills/index.mdx | 12 -- packages/web/src/pages/index.astro | 8 +- 21 files changed, 16 insertions(+), 613 deletions(-) delete mode 100644 packages/core/skills.todo/kompass-workflows/SKILL.md delete mode 100644 packages/core/skills/README.md delete mode 100644 packages/opencode/.opencode/skills/README.md delete mode 100644 packages/opencode/test/skills-config.test.ts delete mode 100644 packages/web/src/content/docs/docs/reference/skills/index.mdx diff --git a/kompass.schema.json b/kompass.schema.json index e9a9338..ef1f6e0 100644 --- a/kompass.schema.json +++ b/kompass.schema.json @@ -239,66 +239,6 @@ } } }, - "skills": { - "type": "object", - "additionalProperties": false, - "properties": { - "entries": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/skillEntryConfig" - } - }, - "enabled": { - "type": "array", - "items": { - "type": "string", - "minLength": 1 - }, - "uniqueItems": true, - "deprecated": true - }, - "disabled": { - "type": "array", - "items": { - "type": "string", - "minLength": 1 - }, - "uniqueItems": true, - "deprecated": true - }, - "plugins": { - "type": "object", - "additionalProperties": false, - "properties": { - "entries": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/skillEntryConfig" - } - }, - "include": { - "type": "array", - "items": { - "type": "string", - "minLength": 1 - }, - "uniqueItems": true, - "deprecated": true - }, - "exclude": { - "type": "array", - "items": { - "type": "string", - "minLength": 1 - }, - "uniqueItems": true, - "deprecated": true - } - } - } - } - }, "defaults": { "type": "object", "additionalProperties": false, @@ -396,15 +336,6 @@ } } }, - "skillEntryConfig": { - "type": "object", - "additionalProperties": false, - "properties": { - "enabled": { - "type": "boolean" - } - } - }, "toolConfig": { "type": "object", "additionalProperties": false, diff --git a/packages/core/index.ts b/packages/core/index.ts index acd151c..56f127d 100644 --- a/packages/core/index.ts +++ b/packages/core/index.ts @@ -5,7 +5,6 @@ export type { ResolvedCommandDefinition } from "./commands/index.ts"; export { getConfiguredToolName, getEnabledToolNames, - isSkillEnabled, loadKompassConfig, mergeWithDefaults, } from "./lib/config.ts"; @@ -13,8 +12,6 @@ export type { AgentDefinition, KompassConfig, MergedKompassConfig, - SkillFilterConfig, - SkillIdentity, ToolConfig, ToolName, } from "./lib/config.ts"; diff --git a/packages/core/lib/config.ts b/packages/core/lib/config.ts index 272cbf1..ebced8b 100644 --- a/packages/core/lib/config.ts +++ b/packages/core/lib/config.ts @@ -78,25 +78,6 @@ export interface ComponentConfig extends ToggleConfig { path?: string; } -export interface SkillEntryConfig extends ToggleConfig {} - -export interface SkillFilterConfig { - enabled?: string[]; - disabled?: string[]; - entries?: Record; - plugins?: { - include?: string[]; - exclude?: string[]; - entries?: Record; - }; -} - -export interface SkillIdentity { - id: string; - name: string; - pluginId?: string; -} - export interface KompassConfig { shared?: { prApprove?: boolean; @@ -149,7 +130,6 @@ export interface KompassConfig { enabled?: string[]; paths?: Record; }; - skills?: SkillFilterConfig; defaults?: { baseBranch?: string; // Deprecated: prefer adapters.opencode.agentMode. @@ -190,14 +170,6 @@ export interface MergedKompassConfig { enabled: string[]; paths: Record; }; - skills: { - enabled: string[] | null; - disabled: string[]; - plugins: { - include: string[] | null; - exclude: string[]; - }; - }; defaults: { baseBranch: string; }; @@ -529,38 +501,6 @@ function getComponentPath( return entry?.path ?? config?.components?.paths?.[name]; } -function getMergedSkillLists(config: KompassConfig | null): { - enabled: string[] | null; - disabled: string[]; - pluginInclude: string[] | null; - pluginExclude: string[]; -} { - const skillEntries = config?.skills?.entries ?? {}; - const enabledEntries = Object.entries(skillEntries) - .filter(([, value]) => value?.enabled !== false) - .map(([name]) => name); - const disabledEntries = Object.entries(skillEntries) - .filter(([, value]) => value?.enabled === false) - .map(([name]) => name); - const pluginEntries = config?.skills?.plugins?.entries ?? {}; - const includedPlugins = Object.entries(pluginEntries) - .filter(([, value]) => value?.enabled !== false) - .map(([name]) => name); - const excludedPlugins = Object.entries(pluginEntries) - .filter(([, value]) => value?.enabled === false) - .map(([name]) => name); - - const enabled = [...new Set([...(config?.skills?.enabled ?? []), ...enabledEntries])]; - const pluginInclude = [...new Set([...(config?.skills?.plugins?.include ?? []), ...includedPlugins])]; - - return { - enabled: enabled.length > 0 ? enabled : null, - disabled: [...new Set([...(config?.skills?.disabled ?? []), ...disabledEntries])], - pluginInclude: pluginInclude.length > 0 ? pluginInclude : null, - pluginExclude: [...new Set([...(config?.skills?.plugins?.exclude ?? []), ...excludedPlugins])], - }; -} - export function getEnabledToolNames(tools: MergedKompassConfig["tools"]): ToolName[] { return DEFAULT_TOOL_NAMES.filter((toolName) => tools[toolName].enabled !== false); } @@ -572,46 +512,10 @@ export function getConfiguredToolName( return tools[toolName].name ?? toolName; } -function normalizeSkillKey(value: string): string { - return value.trim().toLowerCase(); -} - -export function isSkillEnabled( - skills: MergedKompassConfig["skills"], - skill: SkillIdentity, -): boolean { - if (skill.pluginId) { - const excludedPlugins = new Set(skills.plugins.exclude.map(normalizeSkillKey)); - if (excludedPlugins.has(normalizeSkillKey(skill.pluginId))) return false; - - if (skills.plugins.include) { - const includedPlugins = new Set(skills.plugins.include.map(normalizeSkillKey)); - if (!includedPlugins.has(normalizeSkillKey(skill.pluginId))) return false; - } - } - - const disabled = new Set(skills.disabled.map(normalizeSkillKey)); - if ( - disabled.has(normalizeSkillKey(skill.id)) || - disabled.has(normalizeSkillKey(skill.name)) - ) { - return false; - } - - if (!skills.enabled) return true; - - const enabled = new Set(skills.enabled.map(normalizeSkillKey)); - return ( - enabled.has(normalizeSkillKey(skill.id)) || - enabled.has(normalizeSkillKey(skill.name)) - ); -} - export function mergeWithDefaults( config: KompassConfig | null, ): MergedKompassConfig { const { enabled: _workerEnabled, ...workerOverrides } = config?.agents?.worker ?? {}; - const mergedSkills = getMergedSkillLists(config); const { enabled: _navigatorEnabled, ...navigatorOverrides } = config?.agents?.navigator ?? {}; const { enabled: _reviewerEnabled, ...reviewerOverrides } = config?.agents?.reviewer ?? {}; @@ -675,14 +579,6 @@ export function mergeWithDefaults( ]), ), }, - skills: { - enabled: mergedSkills.enabled, - disabled: mergedSkills.disabled, - plugins: { - include: mergedSkills.pluginInclude, - exclude: mergedSkills.pluginExclude, - }, - }, defaults: { baseBranch: config?.defaults?.baseBranch ?? "main", }, diff --git a/packages/core/skills.todo/kompass-workflows/SKILL.md b/packages/core/skills.todo/kompass-workflows/SKILL.md deleted file mode 100644 index 67cc997..0000000 --- a/packages/core/skills.todo/kompass-workflows/SKILL.md +++ /dev/null @@ -1,39 +0,0 @@ ---- -name: kompass-workflows -description: Use when the user wants structured help with branch review, pull request, commit, or ticket workflows in a repository ---- - -# Kompass Workflows - -Kompass adds focused repository workflows to OpenCode through built-in commands, agents, and tools. - -## Use This Skill When - -- the user wants a structured review of branch or PR changes -- the user wants to create or fix a pull request -- the user wants to plan or implement work from a ticket -- the user wants help loading PR, ticket, or branch context before acting - -## Prefer Kompass Workflows - -- Use `/review` for local branch review without publishing comments. -- Use `/pr/review` for GitHub PR review flows. -- Use `/pr/create` to summarize work and create a PR. -- Use `/pr/fix` to address PR feedback. -- Use `/ticket/plan` to turn a request or ticket into a scoped implementation plan without syncing it. -- Use `/ticket/plan-and-sync` to turn a request or ticket into a scoped implementation plan and store it in the ticket flow. -- Use `/ticket/dev` or `/dev` for focused implementation work. -- Use `/commit` or `/commit-and-push` when the user explicitly asks to commit. - -## Prefer Kompass Tools - -- Use `kompass_changes_load` to inspect branch changes against a base branch. -- Use `kompass_pr_load` to load PR metadata and review history. -- Use `kompass_ticket_load` to normalize ticket input from GitHub, a file, or raw text. -- Use `kompass_pr_sync` and `kompass_ticket_sync` for structured GitHub updates when the user asks for them. - -## Notes - -- Follow repository conventions and local instructions before using a workflow. -- Do not commit or push unless the user explicitly asks. -- If tool names were customized in config, use the configured names instead of the default `kompass_*` names. diff --git a/packages/core/skills/README.md b/packages/core/skills/README.md deleted file mode 100644 index 9403124..0000000 --- a/packages/core/skills/README.md +++ /dev/null @@ -1,2 +0,0 @@ -This directory contains bundled Kompass skills that ship with packaged OpenCode -builds. Keep a concrete `skills/` path available for runtime registration. diff --git a/packages/core/test/config.test.ts b/packages/core/test/config.test.ts index 7d66dbe..599c270 100644 --- a/packages/core/test/config.test.ts +++ b/packages/core/test/config.test.ts @@ -4,7 +4,7 @@ import { mkdir, mkdtemp, rm, writeFile } from "node:fs/promises"; import os from "node:os"; import path from "node:path"; -import { isSkillEnabled, loadKompassConfig, mergeWithDefaults } from "../lib/config.ts"; +import { loadKompassConfig, mergeWithDefaults } from "../lib/config.ts"; const originalHome = process.env.HOME; @@ -267,28 +267,6 @@ describe("object-based config", () => { assert.equal(config.components.enabled.includes("dev-flow"), false); assert.equal(config.components.paths.commit, "components/custom-commit.md"); }); - - test("supports skill entry maps", () => { - const config = mergeWithDefaults({ - skills: { - entries: { - "release-checklist": { enabled: true }, - "legacy-release-flow": { enabled: false }, - }, - plugins: { - entries: { - "@acme/opencode-release": { enabled: true }, - "@acme/opencode-experimental": { enabled: false }, - }, - }, - }, - }); - - assert.deepEqual(config.skills.enabled, ["release-checklist"]); - assert.deepEqual(config.skills.disabled, ["legacy-release-flow"]); - assert.deepEqual(config.skills.plugins.include, ["@acme/opencode-release"]); - assert.deepEqual(config.skills.plugins.exclude, ["@acme/opencode-experimental"]); - }); }); describe("command defaults", () => { @@ -314,138 +292,3 @@ describe("command defaults", () => { assert.equal(config.commands.enabled.includes("todo"), true); }); }); - -describe("skills config", () => { - test("defaults to all skills enabled when no allowlist is configured", () => { - const config = mergeWithDefaults(null); - - assert.equal( - isSkillEnabled(config.skills, { - id: "@acme/opencode-release/release-checklist", - name: "release-checklist", - pluginId: "@acme/opencode-release", - }), - true, - ); - }); - - test("allows a skill by short name", () => { - const config = mergeWithDefaults({ - skills: { - enabled: ["release-checklist"], - }, - }); - - assert.equal( - isSkillEnabled(config.skills, { - id: "@acme/opencode-release/release-checklist", - name: "release-checklist", - pluginId: "@acme/opencode-release", - }), - true, - ); - assert.equal( - isSkillEnabled(config.skills, { - id: "@acme/opencode-release/hotfix-triage", - name: "hotfix-triage", - pluginId: "@acme/opencode-release", - }), - false, - ); - }); - - test("allows a skill by fully-qualified id", () => { - const config = mergeWithDefaults({ - skills: { - enabled: ["@acme/opencode-release/hotfix-triage"], - }, - }); - - assert.equal( - isSkillEnabled(config.skills, { - id: "@acme/opencode-release/hotfix-triage", - name: "hotfix-triage", - pluginId: "@acme/opencode-release", - }), - true, - ); - }); - - test("disabled takes precedence over enabled", () => { - const config = mergeWithDefaults({ - skills: { - enabled: ["release-checklist"], - disabled: ["release-checklist"], - }, - }); - - assert.equal( - isSkillEnabled(config.skills, { - id: "@acme/opencode-release/release-checklist", - name: "release-checklist", - pluginId: "@acme/opencode-release", - }), - false, - ); - }); - - test("plugin exclude disables plugin skills", () => { - const config = mergeWithDefaults({ - skills: { - plugins: { - exclude: ["@acme/opencode-experimental"], - }, - }, - }); - - assert.equal( - isSkillEnabled(config.skills, { - id: "@acme/opencode-experimental/release-checklist", - name: "release-checklist", - pluginId: "@acme/opencode-experimental", - }), - false, - ); - assert.equal( - isSkillEnabled(config.skills, { - id: "project/release-checklist", - name: "release-checklist", - }), - true, - ); - }); - - test("plugin include acts as an allowlist for plugin skills only", () => { - const config = mergeWithDefaults({ - skills: { - plugins: { - include: ["@acme/opencode-release"], - }, - }, - }); - - assert.equal( - isSkillEnabled(config.skills, { - id: "@acme/opencode-release/release-checklist", - name: "release-checklist", - pluginId: "@acme/opencode-release", - }), - true, - ); - assert.equal( - isSkillEnabled(config.skills, { - id: "@acme/opencode-experimental/release-checklist", - name: "release-checklist", - pluginId: "@acme/opencode-experimental", - }), - false, - ); - assert.equal( - isSkillEnabled(config.skills, { - id: "project/release-checklist", - name: "release-checklist", - }), - true, - ); - }); -}); diff --git a/packages/opencode/.opencode/skills/README.md b/packages/opencode/.opencode/skills/README.md deleted file mode 100644 index 9403124..0000000 --- a/packages/opencode/.opencode/skills/README.md +++ /dev/null @@ -1,2 +0,0 @@ -This directory contains bundled Kompass skills that ship with packaged OpenCode -builds. Keep a concrete `skills/` path available for runtime registration. diff --git a/packages/opencode/config.ts b/packages/opencode/config.ts index 059b023..78b608b 100644 --- a/packages/opencode/config.ts +++ b/packages/opencode/config.ts @@ -1,7 +1,3 @@ -import { access, readdir } from "node:fs/promises"; -import path from "node:path"; -import { fileURLToPath } from "node:url"; - import type { AgentConfig, Config } from "@opencode-ai/sdk"; import { @@ -17,60 +13,10 @@ import { } from "./tool-names.ts"; import type { PluginLogger } from "./logging.ts"; -const __dirname = path.dirname(fileURLToPath(import.meta.url)); -const BUNDLED_SKILL_ROOT_CANDIDATES = [ - path.join(__dirname, "skills"), - path.resolve(__dirname, "..", "skills"), - path.resolve(__dirname, "..", "core", "skills"), -]; - -type ConfigWithSkillsPaths = Config & { - skills?: { - paths?: string[]; - }; -}; - -async function pathExists(filePath: string): Promise { - try { - await access(filePath); - return true; - } catch { - return false; - } -} - -async function hasBundledSkillDirectories(root: string): Promise { - try { - const entries = await readdir(root, { withFileTypes: true }); - return entries.some((entry) => entry.isDirectory()); - } catch { - return false; - } -} - -async function resolveBundledSkillsRoot(): Promise { - for (const candidate of BUNDLED_SKILL_ROOT_CANDIDATES) { - if (!await pathExists(candidate)) continue; - - if (await hasBundledSkillDirectories(candidate)) { - return candidate; - } - } - - return undefined; -} - type ApplyConfigOptions = { logger?: PluginLogger; - resolveBundledSkillsRoot?: () => Promise; }; -function normalizeSkillPaths(paths: unknown): string[] { - if (!Array.isArray(paths)) return []; - - return paths.filter((entry): entry is string => typeof entry === "string" && entry.length > 0); -} - export async function applyAgentsConfig( cfg: Config, projectRoot: string, @@ -99,10 +45,10 @@ export async function applyAgentsConfig( cfg.agent[name] = agentConfig; await options?.logger?.info("Loaded Kompass agent", { - agent: name, - mode: agentConfig.mode, - promptLength: definition.prompt?.length ?? 0, - }); + agent: name, + mode: agentConfig.mode, + promptLength: definition.prompt?.length ?? 0, + }); } } @@ -140,51 +86,3 @@ export async function applyCommandsConfig( }); } } - -export async function applySkillsConfig(cfg: Config, options?: ApplyConfigOptions) { - const bundledSkillsRoot = options?.resolveBundledSkillsRoot - ? await options.resolveBundledSkillsRoot() - : await resolveBundledSkillsRoot(); - const skillsConfig = cfg as ConfigWithSkillsPaths; - const normalizedPaths = normalizeSkillPaths(skillsConfig.skills?.paths); - - if (!bundledSkillsRoot) { - await options?.logger?.warn("Skipping Kompass skills registration", { - reason: "No bundled skills directory found", - }); - - if (normalizedPaths.length > 0) { - skillsConfig.skills ??= {}; - skillsConfig.skills.paths = normalizedPaths; - } else if (skillsConfig.skills && "paths" in skillsConfig.skills) { - delete skillsConfig.skills.paths; - } - return; - } - - skillsConfig.skills ??= {}; - skillsConfig.skills.paths = normalizedPaths; - - if (!skillsConfig.skills.paths.includes(bundledSkillsRoot)) { - skillsConfig.skills.paths.push(bundledSkillsRoot); - } - - let entries; - try { - entries = await readdir(bundledSkillsRoot, { withFileTypes: true }); - } catch (error) { - await options?.logger?.warn("Skipping Kompass skills registration", { - error: error instanceof Error ? error.message : String(error), - }); - return; - } - - for (const entry of entries) { - if (!entry.isDirectory()) continue; - - await options?.logger?.info("Loaded Kompass skill", { - skill: entry.name, - path: path.join(bundledSkillsRoot, entry.name), - }); - } -} diff --git a/packages/opencode/index.ts b/packages/opencode/index.ts index 2a2076f..2d05182 100644 --- a/packages/opencode/index.ts +++ b/packages/opencode/index.ts @@ -14,7 +14,7 @@ import { type MergedKompassConfig, type Shell, } from "../core/index.ts"; -import { applyAgentsConfig, applyCommandsConfig, applySkillsConfig } from "./config.ts"; +import { applyAgentsConfig, applyCommandsConfig } from "./config.ts"; import { createPluginLogger, getErrorDetails, type PluginLogger } from "./logging.ts"; import { getConfiguredOpenCodeToolName, @@ -391,7 +391,6 @@ export const OpenCodeCompassPlugin: Plugin = async (input: PluginInput) => { async config(cfg) { await runConfigStep("agents", () => applyAgentsConfig(cfg, worktree, { logger })); await runConfigStep("commands", () => applyCommandsConfig(cfg, worktree, { logger })); - await runConfigStep("skills", () => applySkillsConfig(cfg, { logger })); }, async "chat.message"(input, output) { try { @@ -445,5 +444,5 @@ export const OpenCodeCompassPlugin: Plugin = async (input: PluginInput) => { }; }; -export { applyAgentsConfig, applyCommandsConfig, applySkillsConfig }; +export { applyAgentsConfig, applyCommandsConfig }; export default OpenCodeCompassPlugin; diff --git a/packages/opencode/package.json b/packages/opencode/package.json index d3140d2..3fd9ae4 100644 --- a/packages/opencode/package.json +++ b/packages/opencode/package.json @@ -13,7 +13,6 @@ "components", "dist", "kompass.jsonc", - "skills", "README.md", "LICENSE" ], diff --git a/packages/opencode/scripts/build.ts b/packages/opencode/scripts/build.ts index 11d0ead..e2bbc56 100644 --- a/packages/opencode/scripts/build.ts +++ b/packages/opencode/scripts/build.ts @@ -12,7 +12,7 @@ const coreRoot = path.join(workspaceRoot, "packages", "core"); const workspaceReadme = path.join(workspaceRoot, "README.md"); const packageReadme = path.join(packageRoot, "README.md"); -const runtimeDirs = ["agents", "commands", "components", "skills"] as const; +const runtimeDirs = ["agents", "commands", "components"] as const; const bundleExternals = ["@opencode-ai/plugin", "@opencode-ai/plugin/tool"] as const; const bundleArgs = [ "build", diff --git a/packages/opencode/scripts/compile.ts b/packages/opencode/scripts/compile.ts index 5970276..f9b2f6f 100644 --- a/packages/opencode/scripts/compile.ts +++ b/packages/opencode/scripts/compile.ts @@ -7,7 +7,7 @@ * package at runtime. */ -import { mkdir, writeFile, rm, access, cp } from "node:fs/promises"; +import { mkdir, writeFile, rm, access } from "node:fs/promises"; import path from "node:path"; import { fileURLToPath } from "node:url"; import YAML from "yaml"; @@ -16,8 +16,6 @@ const __dirname = path.dirname(fileURLToPath(import.meta.url)); const PACKAGE_ROOT = path.resolve(__dirname, ".."); const WORKSPACE_ROOT = path.resolve(PACKAGE_ROOT, "..", ".."); const OUTPUT_DIR = path.resolve(PACKAGE_ROOT, ".opencode"); -const CORE_SKILLS_DIR = path.resolve(WORKSPACE_ROOT, "packages", "core", "skills"); - import { getEnabledToolNames, loadKompassConfig, @@ -70,8 +68,6 @@ async function main() { // Create output directories await mkdir(path.join(OUTPUT_DIR, "commands"), { recursive: true }); await mkdir(path.join(OUTPUT_DIR, "agents"), { recursive: true }); - await mkdir(path.join(OUTPUT_DIR, "skills"), { recursive: true }); - // Write compiled commands console.log("\nWriting compiled commands..."); for (const [name, command] of Object.entries(compiledCommands)) { @@ -126,28 +122,6 @@ async function main() { // Write configuration console.log("\nWriting configuration..."); - const compiledSkillEntries = Object.fromEntries( - [ - ...(config.skills.enabled ?? []).map((name) => [name, { enabled: true }] as const), - ...config.skills.disabled.map((name) => [name, { enabled: false }] as const), - ], - ); - const compiledSkillPluginEntries = Object.fromEntries( - [ - ...(config.skills.plugins.include ?? []).map((name) => [name, { enabled: true }] as const), - ...config.skills.plugins.exclude.map((name) => [name, { enabled: false }] as const), - ], - ); - const compiledSkills = { - ...(Object.keys(compiledSkillEntries).length > 0 ? { entries: compiledSkillEntries } : {}), - ...(Object.keys(compiledSkillPluginEntries).length > 0 - ? { - plugins: { - entries: compiledSkillPluginEntries, - }, - } - : {}), - }; const configOutput = { shared: config.shared, commands: Object.fromEntries( @@ -171,7 +145,6 @@ async function main() { }, ]), ), - ...(Object.keys(compiledSkills).length > 0 ? { skills: compiledSkills } : {}), defaults: config.defaults, adapters: config.adapters, }; @@ -181,13 +154,6 @@ async function main() { ); console.log(" kompass.jsonc"); - try { - await cp(CORE_SKILLS_DIR, path.join(OUTPUT_DIR, "skills"), { recursive: true }); - console.log(" skills/"); - } catch { - console.warn(" Warning: Could not copy bundled skills"); - } - console.log("\n✓ Compilation complete!"); console.log(`\nOutput directory: ${OUTPUT_DIR}`); console.log("\nTo use the compiled OpenCode adapter:"); diff --git a/packages/opencode/test/skills-config.test.ts b/packages/opencode/test/skills-config.test.ts deleted file mode 100644 index d2a5bfe..0000000 --- a/packages/opencode/test/skills-config.test.ts +++ /dev/null @@ -1,59 +0,0 @@ -import { describe, test } from "node:test"; -import assert from "node:assert/strict"; - -import { applySkillsConfig } from "../config.ts"; - -describe("applySkillsConfig", () => { - test("registers the bundled Kompass skills path", async () => { - const cfg: { skills?: { paths?: string[] } } = {}; - - await applySkillsConfig(cfg as never); - - assert.ok(cfg.skills?.paths); - assert.equal(cfg.skills.paths.length, 1); - assert.match(cfg.skills.paths[0], /packages\/(core|opencode)\/skills$/); - }); - - test("preserves existing skill paths without duplicates", async () => { - const cfg: { skills?: { paths?: string[] } } = { - skills: { - paths: ["/tmp/custom-skills"], - }, - }; - - await applySkillsConfig(cfg as never); - await applySkillsConfig(cfg as never); - - assert.deepEqual(cfg.skills?.paths?.slice(0, 1), ["/tmp/custom-skills"]); - assert.equal(cfg.skills?.paths?.length, 2); - assert.match(cfg.skills?.paths?.[1] ?? "", /packages\/(core|opencode)\/skills$/); - }); - - test("filters invalid configured skill paths before appending bundled path", async () => { - const cfg: { skills?: { paths?: unknown[] } } = { - skills: { - paths: [undefined, "", "/tmp/custom-skills"], - }, - }; - - await applySkillsConfig(cfg as never); - - assert.deepEqual(cfg.skills?.paths?.slice(0, 1), ["/tmp/custom-skills"]); - assert.equal(cfg.skills?.paths?.length, 2); - assert.equal(typeof cfg.skills?.paths?.[1], "string"); - }); - - test("preserves valid configured skill paths when no bundled skills root exists", async () => { - const cfg: { skills?: { paths?: unknown[] } } = { - skills: { - paths: [undefined, "", "/tmp/custom-skills"], - }, - }; - - await applySkillsConfig(cfg as never, { - resolveBundledSkillsRoot: async () => undefined, - }); - - assert.deepEqual(cfg.skills?.paths, ["/tmp/custom-skills"]); - }); -}); diff --git a/packages/web/src/content/docs/docs/adapters/opencode.mdx b/packages/web/src/content/docs/docs/adapters/opencode.mdx index 19355e1..f9ec9c0 100644 --- a/packages/web/src/content/docs/docs/adapters/opencode.mdx +++ b/packages/web/src/content/docs/docs/adapters/opencode.mdx @@ -14,7 +14,6 @@ Inside OpenCode, the adapter exposes: - Kompass commands - Kompass agents - Kompass tools -- bundled skills registration - project override loading from local config files ## Project overrides @@ -38,7 +37,6 @@ Kompass also provides the `worker`, `navigator`, `planner`, and `reviewer` agent ## Useful OpenCode notes -- bundled Kompass skills are registered automatically - the preferred override file is `.opencode/kompass.jsonc` - for session debugging, use `opencode session list` and `opencode export ` diff --git a/packages/web/src/content/docs/docs/concepts/architecture.mdx b/packages/web/src/content/docs/docs/concepts/architecture.mdx index c19e4eb..e4b5294 100644 --- a/packages/web/src/content/docs/docs/concepts/architecture.mdx +++ b/packages/web/src/content/docs/docs/concepts/architecture.mdx @@ -29,7 +29,7 @@ It is responsible for: - mapping Kompass assets into the OpenCode runtime - compiling reviewable output into `packages/opencode/.opencode/` -- registering bundled skills and config for that adapter +- loading bundled config for that adapter ## Why this split matters diff --git a/packages/web/src/content/docs/docs/config/overview.mdx b/packages/web/src/content/docs/docs/config/overview.mdx index a92cf90..1d5f5d8 100644 --- a/packages/web/src/content/docs/docs/config/overview.mdx +++ b/packages/web/src/content/docs/docs/config/overview.mdx @@ -53,14 +53,6 @@ Controls built-in tool enablement and per-adapter tool name remapping. Controls reusable template partials and path overrides used during command rendering. -### `skills` - -Controls bundled and plugin skill filtering. - -- `entries` -- `plugins.entries` -- deprecated allowlists/excludelists are still recognized in the schema - ### `defaults` Shared defaults such as `baseBranch`. diff --git a/packages/web/src/content/docs/docs/getting-started.mdx b/packages/web/src/content/docs/docs/getting-started.mdx index 8c91098..1c96ea9 100644 --- a/packages/web/src/content/docs/docs/getting-started.mdx +++ b/packages/web/src/content/docs/docs/getting-started.mdx @@ -17,7 +17,7 @@ Add it to your OpenCode config: ## Add optional project config -If you want to customize commands, agents, tools, skills, or defaults for a project, add one project override file. +If you want to customize commands, agents, tools, or defaults for a project, add one project override file. Kompass applies the first matching override in this order: @@ -56,7 +56,6 @@ opencode export ## What happens automatically -- bundled Kompass skills are registered automatically when the plugin loads - shared workflow logic stays in the Kompass package rather than your project repo - project overrides are layered on top of the bundled base config diff --git a/packages/web/src/content/docs/docs/index.mdx b/packages/web/src/content/docs/docs/index.mdx index 74373da..bc57c91 100644 --- a/packages/web/src/content/docs/docs/index.mdx +++ b/packages/web/src/content/docs/docs/index.mdx @@ -11,7 +11,7 @@ Whether you prefer full control, guided collaboration, or hands-off autonomy, Ko Kompass is a shared workflow toolkit for AI coding agents. -- It ships reusable commands, agents, components, tools, and skills. +- It ships reusable commands, agents, components, and tools. - It keeps prompts focused instead of rebuilding intent from scratch in every session. - It separates shared workflow logic from adapter-specific wiring. - It is designed so planning, implementation, and review stay structured and reviewable. diff --git a/packages/web/src/content/docs/docs/installation.mdx b/packages/web/src/content/docs/docs/installation.mdx index 0ae0b28..7674768 100644 --- a/packages/web/src/content/docs/docs/installation.mdx +++ b/packages/web/src/content/docs/docs/installation.mdx @@ -39,7 +39,6 @@ curl -fsSL https://raw.githubusercontent.com/kompassdev/kompass/main/kompass.jso - agent enablement and prompt overrides - tool enablement and tool-name remapping - component path overrides -- skill enablement and plugin skill filters - default base branch and adapter settings ## Current adapter support diff --git a/packages/web/src/content/docs/docs/reference/skills/index.mdx b/packages/web/src/content/docs/docs/reference/skills/index.mdx deleted file mode 100644 index b2e08f3..0000000 --- a/packages/web/src/content/docs/docs/reference/skills/index.mdx +++ /dev/null @@ -1,12 +0,0 @@ ---- -title: Skills -description: Overview of skill support in Kompass. ---- - -Kompass supports bundled and plugin-provided skills through config-driven filtering. - -The base config does not enable any bundled Kompass skills yet. - -## Bundled skills - -None yet. diff --git a/packages/web/src/pages/index.astro b/packages/web/src/pages/index.astro index cb0a64d..ba25c73 100644 --- a/packages/web/src/pages/index.astro +++ b/packages/web/src/pages/index.astro @@ -16,7 +16,7 @@ const pillars = [ { eyebrow: "Cross-adapter direction", title: "One workflow language across agent surfaces.", - text: "Shared commands, skills, and tools live in core packages while adapters expose them cleanly where developers already work." + text: "Shared commands, components, agents, and tools live in core packages while adapters expose them cleanly where developers already work." } ]; @@ -30,7 +30,7 @@ const architectureBlocks = [ { eyebrow: "Shared core", title: "Write the workflow once.", - text: "Commands, agents, components, tools, and skills live in `packages/core` so the operating model stays consistent." + text: "Commands, agents, components, and tools live in `packages/core` so the operating model stays consistent." }, { eyebrow: "Adapter surfaces", @@ -47,7 +47,7 @@ const architectureBlocks = [ const heroHighlights = [ { eyebrow: "Core", - title: "Commands, agents, skills, tools" + title: "Commands, agents, components, tools" }, { eyebrow: "Adapters", @@ -173,4 +173,4 @@ const heroHighlights = [ - \ No newline at end of file + From b22be17ea63643bc85bb9d032716c97add266a57 Mon Sep 17 00:00:00 2001 From: dbpolito Date: Fri, 27 Mar 2026 19:03:17 -0300 Subject: [PATCH 2/2] fix: remove stale skill exclude from opencode tsconfig --- packages/opencode/tsconfig.json | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/opencode/tsconfig.json b/packages/opencode/tsconfig.json index f623dd5..70d760e 100644 --- a/packages/opencode/tsconfig.json +++ b/packages/opencode/tsconfig.json @@ -7,7 +7,6 @@ "agents", "commands", "components", - "skills", ".opencode" ] }