Sypha Rules
Learn how to create and manage Sypha Rules for project-specific instructions.
Sypha Rules provide a mechanism for delivering system-level instructions to Sypha. Consider them a persistent method of injecting context and configuration preferences into your projects or across all conversations globally.
Creating a Rule
To create a rule, select the + button within the Rules tab. This action launches a new file in your IDE where you can compose your rule.

After saving the file:
- The rule gets stored in the
.sypharules/directory within your project (for Workspace Rules) - Alternatively, it's saved to the Global Rules directory (for Global Rules):
Global Rules Directory Location
Your Global Rules directory location varies by operating system:
| Operating System | Default Location | Notes |
|---|---|---|
| Windows | Documents\Sypha\Rules | Uses system Documents folder |
| macOS | ~/Documents/Sypha/Rules | Uses user Documents folder |
| Linux/WSL | ~/Documents/Sypha/Rules | May fall back to ~/Sypha/Rules on some systems |
Note for Linux/WSL users: If you don't find your global rules in
~/Documents/Sypha/Rules, check~/Sypha/Rulesas the location may vary depending on your system configuration and whether the Documents directory exists.
Alternatively, you can request Sypha to generate a rule for you through the /newrule slash command within the chat.
# Project Guidelines
## Documentation Requirements
- Update relevant documentation in /docs when modifying features
- Keep README.md in sync with new capabilities
- Maintain changelog entries in CHANGELOG.md
## Architecture Decision Records
Create ADRs in /docs/adr for:
- Major dependency changes
- Architectural pattern changes
- New integration patterns
- Database schema changes
Follow template in /docs/adr/template.md
## Code Style & Patterns
- Generate API clients using OpenAPI Generator
- Use TypeScript axios template
- Place generated code in /src/generated
- Prefer composition over inheritance
- Use repository pattern for data access
- Follow error handling pattern in /src/utils/errors.ts
## Testing Standards
- Unit tests required for business logic
- Integration tests for API endpoints
- E2E tests for critical user flowsKey Benefits
- Version Controlled: The
.sypharulesfile integrates into your project's source code - Team Consistency: Guarantees uniform behavior across all team members
- Project-Specific: Standards and rules customized to individual project requirements
- Institutional Knowledge: Preserves project standards and practices within code
Position the .sypharules file at your project's root directory:
your-project/
├── .sypharules
├── src/
├── docs/
└── ...In contrast, Sypha's system prompt cannot be edited by users (here's where you can find it). For comprehensive guidance on prompt engineering best practices, refer to this resource.
AGENTS.md Standard Support
Sypha recognizes the AGENTS.md standard as a fallback option
(alongside Sypha Rules) through automatic detection of AGENTS.md files in
your workspace root. This enables you to utilize the same rules file across multiple AI
coding tools.
your-project/
├── AGENTS.md
├── src/
└── ...Tips for Writing Effective Sypha Rules
- Be Clear and Concise: Employ straightforward language and eliminate ambiguity.
- Focus on Desired Outcomes: Articulate the end results you seek, rather than specific steps.
- Test and Iterate: Conduct experiments to discover what best suits your workflow.
.sypharules/ Folder System
your-project/
├── .sypharules/ # Folder containing active rules
│ ├── 01-coding.md # Core coding standards
│ ├── 02-documentation.md # Documentation requirements
│ └── current-sprint.md # Rules specific to current work
├── src/
└── ...Sypha automatically reads all Markdown files within the .sypharules/ directory, merging them into a consolidated ruleset. The numeric prefixes (optional) assist in organizing files in a meaningful order.
Using a Rules Bank
For projects involving multiple contexts or teams, establish a rules bank directory:
your-project/
├── .sypharules/ # Active rules - automatically applied
│ ├── 01-coding.md
│ └── client-a.md
│
├── sypharules-bank/ # Repository of available but inactive rules
│ ├── clients/ # Client-specific rule sets
│ │ ├── client-a.md
│ │ └── client-b.md
│ ├── frameworks/ # Framework-specific rules
│ │ ├── react.md
│ │ └── vue.md
│ └── project-types/ # Project type standards
│ ├── api-service.md
│ └── frontend-app.md
└── ...Benefits of the Folder Approach
- Contextual Activation: Transfer only pertinent rules from the bank to the active directory
- Easier Maintenance: Modify individual rule files independently
- Team Flexibility: Team members can enable rules relevant to their current task
- Reduced Noise: Maintain a focused and relevant active ruleset
Usage Examples
Switch between client projects:
# Switch to Client B project
rm .sypharules/client-a.md
cp sypharules-bank/clients/client-b.md .sypharules/Adapt to different tech stacks:
# Frontend React project
cp sypharules-bank/frameworks/react.md .sypharules/Implementation Tips
- Maintain individual rule files centered on specific concerns
- Use descriptive filenames that clearly communicate the rule's purpose
- Consider excluding the active
.sypharules/folder from git while tracking thesypharules-bank/ - Develop team scripts for rapid activation of common rule combinations
The folder system elevates your Sypha rules from a static document to a dynamic knowledge framework that responds to your team's evolving contexts and needs.
Managing Rules with the Toggleable Popover
To simplify management of both single .sypharules files and the folder system, Sypha v3.13 provides a dedicated popover UI accessible directly from the chat interface.
Positioned conveniently beneath the chat input field, this popover enables you to:
- Instantly See Active Rules: Review which global rules (from your user settings) and workspace rules (
.sypharulesfile or folder contents) are currently enabled. - Quickly Toggle Rules: Activate or deactivate specific rule files within your workspace
.sypharules/folder with a single click. This proves ideal for enabling context-specific rules (likereact-rules.mdormemory-bank.md) only when necessary. - Easily Add/Manage Rules: Rapidly create a workspace
.sypharulesfile or folder if none exists, or append new rule files to an existing folder.
This UI dramatically simplifies context switching and management of different instruction sets without requiring manual file or configuration edits during a conversation.
.png)