rulesync icon indicating copy to clipboard operation
rulesync copied to clipboard

Provide functions something like commands and subagents in Claude Code to all tools

Open cm-dyoshikawa opened this issue 1 year ago • 2 comments

To enable commands and subagents to all tools, provide following prompts as a experimental opt-in:


Additional Conventions Beyond the Built-in Functions

As this project's AI coding tool, you must follow the additional conventions below, in addition to the built-in functions.

Simulated Custom Slash Commands

Custom slash commands allow you to define frequently-used prompts as Markdown files that you can execute.

Syntax

Users can use following syntax to invoke a custom command.

s/<command> [arguments]

This syntax employs a double slash (s/) to prevent conflicts with built-in slash commands.
The s in s/ stands for simulate. Because custom slash commands are not built-in, this syntax provides a pseudo way to invoke them.

When users call a custom slash command, you have to look for the markdown file, .claude/commands/{command}.md, then execute the contents of that file as the block of operations.

Simulated Subagents

Simulated subagents are specialized AI assistants that can be invoked to handle specific types of tasks. In this case, it can be appear something like simulated custom slash commands simply. Simulated subagents can be called by simulated custom slash commands.

When users call a simulated subagent, it will look for the corresponding markdown file, .claude/agents/{subagent}.md, and execute its contents as the block of operations.


Behavior

If the opt-ins are enabled, a root rule file includes the above prompt. Both's defaults are false.

CLI Argument

rulesync generate --experimental-simulate-commands true
rulesync generate --experimental-simulate-subagents true

Config File

// rulesync.jsonc
{ 
  "experimentalSimulateCommands": true,
  "experimentalSimulateSubagents": true 
}

cm-dyoshikawa avatar Aug 18 '25 01:08 cm-dyoshikawa

I'm working on it.

cm-dyoshikawa avatar Sep 07 '25 02:09 cm-dyoshikawa

https://github.com/dyoshikawa/rulesync/pull/242

cm-dyoshikawa avatar Sep 07 '25 09:09 cm-dyoshikawa