feat: provider integration manifest with Codex pilot (closes #36)#43
Merged
Conversation
Drop the `skills` package dependency and absorb its 39-entry agent registry into a new Provider Integration Manifest that also owns MCP, instructions, rules, subagents, and plugin manifest configuration. All provider facts live as pure data in a single declarative registry; generic handlers interpret the data instead of per-provider builder functions. Cursor, Claude Code, and Codex integrations reproduce existing behavior byte-for-byte. Codex is wired end-to-end as the pilot provider (TOML MCP config, TOML subagents, AGENTS.md rules-as-markers). Adds the new top-level `rules` capabilities concept with per-provider installation (directory-based .mdc files for Cursor, marker blocks in instructions files for providers without a rules directory).
9093a57 to
759b75e
Compare
Updated the capabilities manager to eliminate the requirement for specific tools. The `SKILL.md` now states that no tools are needed, and the `createDefaultCapabilities` function reflects this change by initializing with an empty tools array. Adjusted related tests to verify the absence of default tools and confirmed the `toolExposure` option is set to 'on-demand'.
Updated the rules integration to support optional value mapping for the `alwaysApply` field. This allows for more flexible rule definitions by mapping `true` and `false` to specified values. Additionally, added new configurations for GitHub Copilot, OpenCode, and Roo providers, including MCP, instructions, and subagents. Enhanced tests to validate these integrations and the new mapping functionality.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR replaces the external skills provider registry dependency with an in-repo “provider integration manifest” that becomes the single source of truth for provider-specific integration points (skills dirs, MCP config, instructions files, rules, subagents, plugin manifests). It also adds Codex as the pilot TOML-based provider and introduces a new cross-provider rules capability that can be installed either as per-rule files or folded into instructions via marker blocks.
Changes:
- Added declarative provider integration types + a 39-entry provider registry and generic handlers for MCP/subagents/rules generation.
- Added TOML read/write support and updated MCP registration to be registry-driven for both JSON and TOML clients (Codex).
- Introduced
rules?: Rule[]in capabilities plus a rules installer/cleaner and corresponding tests.
Reviewed changes
Copilot reviewed 19 out of 20 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| src/types/rules.ts | Adds Rule type for new cross-provider rules capability. |
| src/types/providers.ts | Defines provider integration manifest interfaces (MCP/instructions/rules/subagents/plugins). |
| src/types/capabilities.ts | Adds rules?: Rule[] to capabilities and re-exports Rule. |
| src/shared/toml-io.ts | Adds TOML read/write + nested set/delete helpers for config edits. |
| src/shared/providers/registry.ts | Introduces the declarative provider registry (ported skills data + pilot integrations). |
| src/shared/providers/index.ts | Exposes provider lookup/listing APIs used across the CLI/shared code. |
| src/shared/providers/handlers.ts | Generic builders for MCP entries, subagent files, and rule frontmatter. |
| src/shared/providers/tests/registry.test.ts | Adds registry parity + pilot integration tests (Cursor/Claude/Codex/Copilot/Windsurf/etc.). |
| src/shared/plugin-manifest.ts | Makes plugin manifest discovery registry-driven (instead of hardcoded paths). |
| src/shared/capabilities.ts | Updates default capabilities structure (notably tools/security template changes). |
| src/shared/tests/capabilities.test.ts | Updates tests for the new default capabilities shape. |
| src/cli/utils/rules-installer.ts | Implements provider-aware rules installation/cleanup (files vs marker blocks). |
| src/cli/utils/mcp-client-manager.ts | Updates MCP registration/unregistration to use provider registry + TOML support. |
| src/cli/utils/agents-file.ts | Updates instructions/subagent generation to be registry-driven and adds provider-based target filenames. |
| src/cli/commands/plugin-install.ts | Removes skills dependency usage; installs skills using provider registry paths. |
| src/cli/commands/install.ts | Adds rules install step and switches skill install to provider registry. |
| src/cli/commands/clean.ts | Adds rules cleanup step during capa clean. |
| skills/capabilities-manager/SKILL.md | Updates documentation to reflect tool list removal from this skill. |
| package.json | Removes skills dependency and adds @iarna/toml. |
| bun.lock | Lockfile updates reflecting dependency changes. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Updated the `cleanCommand` to accept an array of rule IDs, allowing for targeted removal of capa-managed rules. This change improves the functionality of the clean command by preventing accidental deletion of user-authored files. Additionally, refactored the `cleanRules` function to handle the new parameter and updated related tests to ensure correct behavior.
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.
Summary
skillspackage dependency and absorb its 39-entry agent registry into a new Provider Integration Manifest (src/shared/providers/). The manifest is the single source of truth for skill paths (replacingvercel-labs/skills), MCP configuration, instructions files, rules directories, subagent formats, and plugin manifest paths.registry.tsfile — no per-provider builder functions. Generic handlers inhandlers.tsinterpret the data to build MCP entries, sub-agent files, and rule frontmatter..codex/config.toml), TOML subagent files (.codex/agents/*.toml), AGENTS.md instructions, rules-as-marker-blocks. Cursor and Claude Code integrations reproduce existing behavior byte-for-byte.rulescapabilities concept: a new top-levelrules?: Rule[]field incapabilities.yaml. For providers with a dedicated rules directory (Cursor.cursor/rules/*.mdc), writes per-rule files with YAML frontmatter. For providers without one (Claude Code, Codex), folds rules into the instructions file as capa marker blocks.New files
src/types/providers.tsProviderIntegration,McpIntegration,InstructionsIntegration,RulesIntegration,SubagentsIntegrationinterfaces (data-only)src/types/rules.tsRuleinterfacesrc/shared/providers/registry.tssrc/shared/providers/index.tsgetProvider(),getAllProviders(),getIntegratedProviders()src/shared/providers/handlers.tsbuildMcpEntry,buildSubAgentFile,buildRuleFrontmatter,getMcpConfigPathsrc/shared/toml-io.ts@iarna/toml)src/cli/utils/rules-installer.tssrc/shared/providers/__tests__/registry.test.tsModified files
package.json— removedskills, added@iarna/tomlsrc/cli/commands/install.ts— replacedskillsimports, added Step 3.5 (rules)src/cli/commands/plugin-install.ts— replacedskillsimportssrc/cli/commands/clean.ts— added rules cleanupsrc/cli/utils/mcp-client-manager.ts— registry-driven via handlers, JSON + TOML supportsrc/cli/utils/agents-file.ts— registry-driven viabuildSubAgentFilehandlersrc/cli/utils/rules-installer.ts— registry-driven viabuildRuleFrontmatterhandlersrc/shared/plugin-manifest.ts— registry-driven manifest discoverysrc/types/capabilities.ts— addedrules?: Rule[]Test plan
.mdcfiles