-
Notifications
You must be signed in to change notification settings - Fork 3k
feat: create markdown rules in notch #5945
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Your cubic subscription is currently inactive. Please reactivate your subscription to receive AI reviews and use cubic. |
✅ Deploy Preview for continuedev ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This consolidates some of the rule creation logic we had in multiple places throughout the codebase
@@ -37,11 +37,6 @@ export const createRuleBlock: Tool = { | |||
description: | |||
"Optional file patterns to which this rule applies (e.g. ['**/*.{ts,tsx}'] or ['src/**/*.ts', 'tests/**/*.ts'])", | |||
}, | |||
alwaysApply: { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Decided to remove this since it's still relatively experimental.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's also confusing for the model and maybe we should use a different property name for the model and then map it to the underlying property
Could we offer the choice? We have a bunch of YAML rules now and this might be somewhat confusing. |
@chezsmithy thanks for the callout here! What are your general thoughts/feelings on markdown vs YAML syntax for rule creation? We're thinking next week of rolling out a tool to easily convert all of your existing YAML rules to markdown. If we shipped that, 1) would you use it, and 2) would it then be non-disruptive to merge this PR? If so I think we can leave this PR open until we ship the YAML -> markdown rule conversion. |
@Patrick-Erichsen thanks for the heads up. I'll check in with my team. Are you considering deprecating YAML for rules all together, or just creation initially? Would the tool be command line, or something in the UI? Maybe we could have a dialog on discord about the plan and save a bunch of back and forth here? |
Good call, moved the discussion here: https://discord.com/channels/1108621136150929458/1131313996750917835/1379542031243808869 |
@@ -37,11 +37,6 @@ export const createRuleBlock: Tool = { | |||
description: | |||
"Optional file patterns to which this rule applies (e.g. ['**/*.{ts,tsx}'] or ['src/**/*.ts', 'tests/**/*.ts'])", | |||
}, | |||
alwaysApply: { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's also confusing for the model and maybe we should use a different property name for the model and then map it to the underlying property
import { RULE_FILE_EXTENSION, createRuleMarkdown } from "../markdown"; | ||
|
||
export function blockTypeToSingular(blockType: BlockType): string { | ||
switch (blockType) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
feels like an object with block info would be cleaner here, like
context:
singular: Context
plural: Context
title: Context
mcpServers:
singular: MCP Server
plural: MCP Servers
title: MCP Servers
Or similar
Description
When clicking "Add Rule" from the notch, we now create a markdown rule instead of a YAML rule.