Skip to content

feat: provider integration manifest with Codex pilot (closes #36)#43

Merged
Minitour merged 4 commits into
mainfrom
feat/provider-manifest-codex-pilot
May 8, 2026
Merged

feat: provider integration manifest with Codex pilot (closes #36)#43
Minitour merged 4 commits into
mainfrom
feat/provider-manifest-codex-pilot

Conversation

@Minitour
Copy link
Copy Markdown
Contributor

@Minitour Minitour commented May 8, 2026

Summary

  • Drop the skills package 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 (replacing vercel-labs/skills), MCP configuration, instructions files, rules directories, subagent formats, and plugin manifest paths.
  • Purely declarative provider registry: all provider facts live as plain data in a single registry.ts file — no per-provider builder functions. Generic handlers in handlers.ts interpret the data to build MCP entries, sub-agent files, and rule frontmatter.
  • Add Codex as the pilot end-to-end provider: TOML MCP config (.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.
  • Introduce the rules capabilities concept: a new top-level rules?: Rule[] field in capabilities.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

File Purpose
src/types/providers.ts ProviderIntegration, McpIntegration, InstructionsIntegration, RulesIntegration, SubagentsIntegration interfaces (data-only)
src/types/rules.ts Rule interface
src/shared/providers/registry.ts 39-entry declarative provider registry with full Cursor/Claude Code/Codex integration data inlined
src/shared/providers/index.ts Public API: getProvider(), getAllProviders(), getIntegratedProviders()
src/shared/providers/handlers.ts Generic handlers: buildMcpEntry, buildSubAgentFile, buildRuleFrontmatter, getMcpConfigPath
src/shared/toml-io.ts TOML read/write helpers (@iarna/toml)
src/cli/utils/rules-installer.ts Install/clean rules across providers
src/shared/providers/__tests__/registry.test.ts 73 new tests

Modified files

  • package.json — removed skills, added @iarna/toml
  • src/cli/commands/install.ts — replaced skills imports, added Step 3.5 (rules)
  • src/cli/commands/plugin-install.ts — replaced skills imports
  • src/cli/commands/clean.ts — added rules cleanup
  • src/cli/utils/mcp-client-manager.ts — registry-driven via handlers, JSON + TOML support
  • src/cli/utils/agents-file.ts — registry-driven via buildSubAgentFile handler
  • src/cli/utils/rules-installer.ts — registry-driven via buildRuleFrontmatter handler
  • src/shared/plugin-manifest.ts — registry-driven manifest discovery
  • src/types/capabilities.ts — added rules?: Rule[]

Test plan

  • All 377 existing tests still pass (Cursor + Claude Code backward compatibility)
  • 73 new tests cover registry parity (skillsDir/displayName for all 39 providers), pilot integrations, Codex MCP TOML round-trip, Codex subagent TOML generation, rules as marker blocks, Cursor rules as .mdc files
  • Full suite: 450 pass, 0 fail

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).
@Minitour Minitour force-pushed the feat/provider-manifest-codex-pilot branch from 9093a57 to 759b75e Compare May 8, 2026 11:53
@Minitour Minitour requested a review from YossifNassar May 8, 2026 11:55
@Minitour Minitour self-assigned this May 8, 2026
Minitour added 2 commits May 8, 2026 16:08
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.
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread src/cli/utils/rules-installer.ts Outdated
Comment thread src/cli/utils/rules-installer.ts
Comment thread src/cli/commands/clean.ts
Comment thread src/cli/commands/install.ts
Comment thread src/cli/commands/install.ts Outdated
Comment thread src/cli/utils/mcp-client-manager.ts
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.
@Minitour Minitour merged commit 762d198 into main May 8, 2026
4 checks passed
@Minitour Minitour deleted the feat/provider-manifest-codex-pilot branch May 8, 2026 15:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants