diff --git a/kompass.jsonc b/kompass.jsonc index 3524381..ed33dbe 100644 --- a/kompass.jsonc +++ b/kompass.jsonc @@ -54,12 +54,6 @@ "summarize-changes": { "enabled": true }, }, - "skills": { - "entries": { - "kompass-workflows": { "enabled": true }, - }, - }, - "defaults": { "baseBranch": "main", }, diff --git a/packages/core/kompass.jsonc b/packages/core/kompass.jsonc index 3524381..ed33dbe 100644 --- a/packages/core/kompass.jsonc +++ b/packages/core/kompass.jsonc @@ -54,12 +54,6 @@ "summarize-changes": { "enabled": true }, }, - "skills": { - "entries": { - "kompass-workflows": { "enabled": true }, - }, - }, - "defaults": { "baseBranch": "main", }, diff --git a/packages/core/skills/README.md b/packages/core/skills/README.md index 3a51c89..9403124 100644 --- a/packages/core/skills/README.md +++ b/packages/core/skills/README.md @@ -1,2 +1,2 @@ -This directory intentionally exists so packaged OpenCode builds always ship a -concrete `skills/` path, even when no bundled skill files are present yet. +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/.opencode/kompass.jsonc b/packages/opencode/.opencode/kompass.jsonc index 662e365..aa444d0 100644 --- a/packages/opencode/.opencode/kompass.jsonc +++ b/packages/opencode/.opencode/kompass.jsonc @@ -96,13 +96,6 @@ "enabled": true } }, - "skills": { - "entries": { - "kompass-workflows": { - "enabled": true - } - } - }, "defaults": { "baseBranch": "main" }, diff --git a/packages/opencode/.opencode/skills/README.md b/packages/opencode/.opencode/skills/README.md index 3a51c89..9403124 100644 --- a/packages/opencode/.opencode/skills/README.md +++ b/packages/opencode/.opencode/skills/README.md @@ -1,2 +1,2 @@ -This directory intentionally exists so packaged OpenCode builds always ship a -concrete `skills/` path, even when no bundled skill files are present yet. +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 5ca9ab8..f00ff9c 100644 --- a/packages/opencode/config.ts +++ b/packages/opencode/config.ts @@ -39,12 +39,29 @@ async function pathExists(filePath: string): Promise { } } +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 { + let firstExistingCandidate: string | undefined; + for (const candidate of BUNDLED_SKILL_ROOT_CANDIDATES) { - if (await pathExists(candidate)) return candidate; + if (!await pathExists(candidate)) continue; + + firstExistingCandidate ??= candidate; + + if (await hasBundledSkillDirectories(candidate)) { + return candidate; + } } - return undefined; + return firstExistingCandidate; } type ApplyConfigOptions = { diff --git a/packages/opencode/kompass.jsonc b/packages/opencode/kompass.jsonc index 3524381..ed33dbe 100644 --- a/packages/opencode/kompass.jsonc +++ b/packages/opencode/kompass.jsonc @@ -54,12 +54,6 @@ "summarize-changes": { "enabled": true }, }, - "skills": { - "entries": { - "kompass-workflows": { "enabled": true }, - }, - }, - "defaults": { "baseBranch": "main", }, diff --git a/packages/web/src/content/docs/docs/reference/skills/index.mdx b/packages/web/src/content/docs/docs/reference/skills/index.mdx index 9d3a6d7..b2e08f3 100644 --- a/packages/web/src/content/docs/docs/reference/skills/index.mdx +++ b/packages/web/src/content/docs/docs/reference/skills/index.mdx @@ -5,14 +5,8 @@ description: Overview of skill support in Kompass. Kompass supports bundled and plugin-provided skills through config-driven filtering. -The base config currently enables the `kompass-workflows` skill entry. +The base config does not enable any bundled Kompass skills yet. ## Bundled skills -### `kompass-workflows` - -Bundled Kompass workflow skill entry enabled by the base config. - -- enabled through `skills.entries` -- registered automatically by the OpenCode adapter -- backed by a concrete bundled `skills/` path even when the directory is intentionally sparse +None yet. diff --git a/packages/web/src/content/docs/docs/reference/skills/kompass-workflows.mdx b/packages/web/src/content/docs/docs/reference/skills/kompass-workflows.mdx deleted file mode 100644 index d2239db..0000000 --- a/packages/web/src/content/docs/docs/reference/skills/kompass-workflows.mdx +++ /dev/null @@ -1,13 +0,0 @@ ---- -title: kompass-workflows -description: Bundled Kompass workflow skill entry enabled by the base config. ---- - -## Current status - -The base config enables `kompass-workflows` through `skills.entries`. - -## Notes - -- bundled Kompass skills are registered automatically by the OpenCode adapter -- the `packages/core/skills/` directory is kept present so builds always ship a concrete skills path