Add 5 new platforms via declarative spec registry (#80)#81
Merged
Conversation
Replace per-platform Go files (claude.go, codex.go, opencode.go) with a single declarative `Spec` table in internal/platform/spec.go and one generic `Adapter` struct that implements the Platform interface from any spec row. Adding a new platform is now a one-line append to Specs plus one Type constant — no new Go file. New adapters: cursor, gemini-cli, github-copilot, windsurf, continue. Path conventions follow vercel-labs/skills. Detection is per-platform (each adapter checks its own user-level config dir like ~/.cursor, ~/.gemini, ~/.copilot) so platforms that share .agents/skills/ as a project dir are still distinguished. CLI flag help and "unknown platform" error text now enumerate the registry dynamically. Tests are table-driven over the spec set: install/uninstall/detect round-trip and shared-project-dir semantics are covered for every registered platform. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Resolves CHANGELOG.md conflict — combines both Unreleased entries (platform registry + --from-template fix) under a single section. No code conflicts.
This was referenced May 7, 2026
Closed
devrimcavusoglu
added a commit
that referenced
this pull request
May 7, 2026
Move the [Unreleased] block to v0.3.0 dated 2026-05-07, with a focused "Breaking changes" section calling out the --from-template directory requirement (#84). Cross-link the four PRs that landed since v0.2.1 (#81, #84, #86, #87) and add a Changed entry covering the docs-site refresh that ships in this branch. Bump the corresponding version refs in AGENTS.md (current release + milestone snapshot now covers M0–M7), INSTALL.md (SKERN_VERSION pin example), docs/guide/installation.md (matching pin example), and docs/guide/index.md (current-release callout). Docs build verified. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
3 tasks
devrimcavusoglu
added a commit
that referenced
this pull request
May 7, 2026
* Refresh docs site for v0.2.1 (eight platforms, init instructions, skill versioning) Bring the VitePress site up to date with the v0.2.0 / v0.2.1 surface that has landed since the last docs refresh: - Eight platform adapters wherever 3 were listed (index, guide, concepts diagram, reference flag enums, platforms index/comparison) and a dedicated page for each new adapter (cursor, gemini-cli, github-copilot, windsurf, continue). - `skern init --instructions` / `--tool-forming-loop` / `--target` / `--print-instructions` documented in the quick-start, agent-setup, and command reference. Agent-setup now leads with `init --instructions` instead of the manual `echo … >> AGENTS.md` recipe. - Reference reorganized: registry vs. platform command groups, full pages for `skill import`, `skill version`, `skill diff`, capacity reporting on install/uninstall, `--enforce-budget`, `--with-platforms`, batch install/uninstall. - Validation page split into errors / warnings / hints with the trigger-prefix and recommended-section hints. - Skill format page corrected to the nested `metadata.author` / `metadata.version` / `metadata.modified-by` schema and includes the import workflow. - Installation page covers macOS, Linux, and Windows (PowerShell) one-liners plus version pinning, custom install dir, source build, manual install, uninstall. - Contributing/development reflects the declarative platform spec, updated Make targets, and the `cli/instructions/` package. - Sidebar adds the new platform pages and a Writing Skills entry under Guide. Build verified with `npm run docs:build` (clean). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * Cut v0.3.0: stamp CHANGELOG, bump version refs Move the [Unreleased] block to v0.3.0 dated 2026-05-07, with a focused "Breaking changes" section calling out the --from-template directory requirement (#84). Cross-link the four PRs that landed since v0.2.1 (#81, #84, #86, #87) and add a Changed entry covering the docs-site refresh that ships in this branch. Bump the corresponding version refs in AGENTS.md (current release + milestone snapshot now covers M0–M7), INSTALL.md (SKERN_VERSION pin example), docs/guide/installation.md (matching pin example), and docs/guide/index.md (current-release callout). Docs build verified. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #80.
Summary
claude.go,codex.go,opencode.go) with a single declarativeSpectable ininternal/platform/spec.goand one genericAdapterstruct ininternal/platform/adapter.go. Adding a platform is now a one-line append toSpecsplus oneTypeconstant — no new Go file required.cursor,gemini-cli,github-copilot,windsurf,continue. Path conventions follow vercel-labs/skills..agents/skills/as their project dir; each one'sDetectHomekeys on a distinct user-level config dir (~/.cursor,~/.gemini,~/.copilot,~/.codex, etc.) soplatform listdoesn't false-positive for agents whose CLI isn't installed.Specs: install/list/uninstall round-trips run for every registered platform, plus a dedicatedTestAdapter_SharedProjectDirthat locks in the shared-.agents/semantics.Acceptance criteria (from #80)
cursor,gemini-cli,github-copilot,windsurf,continue.Specsininternal/platform/spec.goplus aTypeconstant. Documented indocs/concepts/platform-adapters.md..agents/skills/: detection uses each platform's own user-level config dir, covered byTestAdapter_Detect_FallbackPathsand the per-platformDetecttests.docs/concepts/platform-adapters.mdand the CHANGELOG. Threshold protects the directory, not the logical agent — when two adapters read the same dir, both see the same count.claude-code/codex-cli/opencodeusers — all three keep their originalName()and on-disk paths.codex-clikeeps~/.agents/skills/(vercel uses~/.codex/skills/) so existing installs are untouched; the detector now also checks~/.codex/as a positive signal.Implementation notes
internal/platform/spec.go—Specstruct + theSpecsregistry. Source of truth.internal/platform/adapter.go— single genericAdapterimplementing thePlatforminterface from anySpec.internal/platform/detector.go—NewDetectorbuilds adapters fromSpecs;ParsePlatformTypevalidates against the registry; error messages list every registered name.internal/cli/capacity.go— addsplatformNamesList()shared byskill install,skill uninstall, andskill diffso flag help and error text stay in sync with the registry.internal/platform/platform_test.gowalk everySpecfor install/uninstall/detect — replaces ~250 lines of per-platform duplication.Test plan
make test— full suite passesmake lint— golangci-lint reports 0 issuesmake test-smoke— 57/57 smoke tests pass./skern platform liston real host — shows all 8 platforms with correct detection state./skern skill install --help— flag help dynamically lists the 8 platforms🤖 Generated with Claude Code