Skip to content

Feature Request: Export agent configurations as importable data #331

@haydenbleasel

Description

@haydenbleasel

Context

I'm the maintainer of Ultracite, a zero-config Biome preset with AI agent integration. We currently maintain our own agent configuration data that has significant overlap with Ruler's agent definitions.

Rather than maintaining duplicate data, I'd love to use Ruler as the source of truth for agent configurations and build on top of it.

Current Situation

Ultracite maintains agent data in @ultracite/data with properties like:

interface Agent {
  id: string;           // e.g., "claude"
  name: string;         // e.g., "Claude Code"
  configPath: string;   // e.g., ".claude/CLAUDE.md"
  config: {
    header?: string;    // frontmatter for certain agents
    appendMode?: boolean;
  };
  // ... plus UI metadata (subtitle, description, website, logo, etc.)
}

Ruler has the same core data spread across individual agent class files:

  • getIdentifier() → our id
  • getName() → our name
  • getDefaultOutputPath() → our configPath
  • Plus MCP support flags we don't have yet

The Challenge

Ruler's agent data is encapsulated in class methods rather than exported as data. To use Ruler as a dependency, I'd need to either:

  1. Instantiate every agent class and call methods to extract configs
  2. Parse the source files to extract the data

Neither is ideal for a build-time data dependency.

Feature Request

Would you consider exporting agent configurations as a data structure? Something like:

// src/agents/data.ts
export interface AgentConfig {
  identifier: string;
  name: string;
  defaultOutputPath: string;
  mcpServerKey?: string;
  supportsMcpStdio: boolean;
  supportsMcpRemote: boolean;
  supportsNativeSkills: boolean;
}

export const agentConfigs: Record<string, AgentConfig> = {
  claude: {
    identifier: 'claude',
    name: 'Claude Code',
    defaultOutputPath: 'CLAUDE.md',
    supportsMcpStdio: true,
    supportsMcpRemote: true,
    supportsNativeSkills: true,
  },
  cursor: {
    identifier: 'cursor',
    name: 'Cursor',
    defaultOutputPath: 'AGENTS.md',
    mcpServerKey: 'mcpServers',
    supportsMcpStdio: true,
    supportsMcpRemote: true,
    supportsNativeSkills: false,
  },
  // ... etc
};

This would allow other tools to:

import { agentConfigs } from '@intellectronica/ruler/agents';

// Use as source of truth, extend with custom metadata
const myAgents = Object.entries(agentConfigs).map(([id, config]) => ({
  ...config,
  logo: logos[id],
  description: descriptions[id],
}));

Benefits

  1. Single source of truth - No more maintaining duplicate agent path data across tools
  2. Ecosystem growth - Other tools can build on Ruler's comprehensive agent support
  3. Easier contributions - Adding a new agent = adding data, not a new class file
  4. Type-safe imports - Consumers get full TypeScript support

Happy to Contribute

I'd be happy to submit a PR for this if you're open to the approach. I could:

  1. Create a src/agents/data.ts with all agent configs
  2. Refactor agent classes to read from this data
  3. Export the data from the package entry point

Let me know your thoughts!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions