Skip to content

Conversation

@tomasz-stefaniak
Copy link
Contributor

@tomasz-stefaniak tomasz-stefaniak commented Oct 3, 2025

Description

Add invokable rule support to cli

AI Code Review

  • Team members only: AI review runs automatically when PR is opened or marked ready for review
  • Team members can also trigger a review by commenting @continue-review

Checklist

  • [] I've read the contributing guide
  • [] The relevant docs, if any, have been updated or created
  • [] The relevant tests, if any, have been updated or created

Screen recording or screenshot

[ When applicable, please include a short screen recording or screenshot - this makes it much easier for us as contributors to review and understand your changes. See this PR as a good example. ]

Tests

[ What tests were added or updated to ensure the changes work as expected? ]


Summary by cubic

Adds invokable rule support to the CLI so users can run assistant rules with invokable: true as slash commands (e.g., /review). The slash command menu now lists these rules.

  • New Features
    • Exposes invokable rules from assistant config as slash commands.
    • Executes invokable rule commands by expanding to the rule text plus user args.
    • Updates SlashCommandUI to refresh the command list when assistant.rules change.

@tomasz-stefaniak tomasz-stefaniak requested a review from a team as a code owner October 3, 2025 01:41
@tomasz-stefaniak tomasz-stefaniak requested review from RomneyDa and removed request for a team October 3, 2025 01:41
@dosubot dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Oct 3, 2025
@github-actions
Copy link

github-actions bot commented Oct 3, 2025

⚠️ PR Title Format

Your PR title doesn't follow the conventional commit format, but this won't block your PR from being merged. We recommend using this format for better project organization.

Expected Format:

<type>[optional scope]: <description>

Examples:

  • feat: add changelog generation support
  • fix: resolve login redirect issue
  • docs: update README with new instructions
  • chore: update dependencies

Valid Types:

feat, fix, docs, style, refactor, perf, test, build, ci, chore, revert

This helps with:

  • 📝 Automatic changelog generation
  • 🚀 Automated semantic versioning
  • 📊 Better project history tracking

This is a non-blocking warning - your PR can still be merged without fixing this.

@github-actions
Copy link

github-actions bot commented Oct 3, 2025

✅ Review Complete

⚠️ AI review completed but no review output was generated.

Likely cause: Expired CONTINUE_API_KEY or missing continuedev/review-bot assistant

📋 View workflow logs for details.


Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

No issues found across 4 files

Comment on lines +191 to +195
const ruleObj = rule as any;
return {
name: ruleObj.name || "",
description: ruleObj.description || "",
category: "assistant" as const,
Copy link
Contributor

@babblebey babblebey Oct 3, 2025

Choose a reason for hiding this comment

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

Some Concerns x Clarifying Question 🤔

I can understand that this (rules) mostly firsthand would be coming from the continue-hub, which means the name x command just might seem unique but incases where we are reading invokable from local...

  • How do we handle conflicts in same slash-command???
  • Well yes, since you cannot have 2 files with same name in local, there might not be conflict... but what happens when a rule from the continue-hub meets with an invokable one in local???
  • Think what also happens when a systemCommand, assistantCommand conflicts an invokableRuleCommand?

I'm looking forward to having invokablePromptsCommand support though (see #8080), this where I figure the different init slash command...

  • One's a system prompt in the IDE extension that "Initialize Codebase"
  • Thee other's the slash command that "creates the AGENTS.md file" in the continue-cli

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@babblebey this is not a problem (yet) because we currently do not support local commands in the CLI. That said, there is an implicit order of resolution that goes roughly like this:

  1. System commands (highest priority)
  2. Assistant prompts
  3. Invokable rules (lowest priority)

I believe it is a part of our roadmap to also add local slash commands to the CLI, and when that moment comes we may need to come up with a better resolution system.

Copy link
Contributor

Choose a reason for hiding this comment

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

It's not a problem until its a problem 😉

Good to know... and I definitely look forward to the local prompt support though... It give that feel of portability of continue with projects.

if (!rule || typeof rule === "string") {
return false;
}
const ruleObj = rule as any;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can avoid any type with RuleObject type or using zod schema from config-yaml

@github-project-automation github-project-automation bot moved this from Todo to In Progress in Issues and PRs Oct 6, 2025
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Oct 6, 2025
@RomneyDa RomneyDa merged commit f84e07a into main Oct 6, 2025
72 of 85 checks passed
@RomneyDa RomneyDa deleted the tomasz/add-cli-invokable-rule-support branch October 6, 2025 06:34
@github-project-automation github-project-automation bot moved this from In Progress to Done in Issues and PRs Oct 6, 2025
@github-actions github-actions bot locked and limited conversation to collaborators Oct 6, 2025
@sestinj
Copy link
Contributor

sestinj commented Oct 6, 2025

🎉 This PR is included in version 1.26.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@sestinj
Copy link
Contributor

sestinj commented Oct 12, 2025

🎉 This PR is included in version 1.24.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@sestinj
Copy link
Contributor

sestinj commented Oct 15, 2025

🎉 This PR is included in version 1.2.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

lgtm This PR has been approved by a maintainer released size:L This PR changes 100-499 lines, ignoring generated files.

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

5 participants