New Rule Command
/newrule is a slash command that enables you to instruct Sypha on your preferred working methodology. It generates a markdown file in your .sypharules directory that functions as permanent instructions for how Sypha should operate when assisting with your projects.
Consider it as establishing guidelines that Sypha will consistently adhere to, eliminating the need to reiterate your preferences in each conversation.
Using the /newrule Slash Command
When you desire Sypha to reliably adhere to specific guidelines:
- Enter
/newrulein the chat - Sypha will assist you in constructing a structured rule file by inquiring about your preferences for:
- Communication approach (verbose vs. concise)
- Development processes
- Coding conventions
- Project background
- Any additional specific guidelines
- You'll examine the rule file prior to its creation
- Upon approval, Sypha generates a markdown file in your
.sypharulesdirectory that will automatically load for subsequent conversations
Example
I employed /newrule when I became frustrated with reiterating the same instructions for every new task. I had particular preferences for how I desired my React components organized, which testing library to employ, and even my preferred variable naming conventions.
Rather than entering these preferences repeatedly, I simply used /newrule and collaborated with Sypha to compose a comprehensive rule file. We constructed a markdown file that encompassed everything from code structure to my preference for functional components instead of class components.
Now whenever I interact with Sypha regarding my React project, it automatically adheres to these guidelines without requiring reminders. The optimal aspect is that I can generate distinct rule files for different projects, enabling Sypha to adapt to whichever codebase I'm working on.
Inspiration
Here's how I utilize /newrule to enhance my development workflow:
-
I established a rule file for each significant project with particular architectural patterns and library preferences, ensuring Sypha consistently generates code that aligns with our existing codebase.
-
For my team's collaborative projects, we maintain a shared rule file that guarantees uniform code style and documentation practices regardless of which team member is using Sypha.
-
When operating with legacy code, I developed a rule file that alerts Sypha about the idiosyncrasies and limitations of the old system, preventing it from recommending modern approaches that won't integrate properly.
-
I also maintain a personal rule file for my side projects containing all my opinionated preferences - two-space indentation, arrow functions throughout, and my precise folder structure specifications.