Sypha AI Docs
Agent Behavior

Custom Rule Sets

Implement project-specific and global behavioral guardrails to ensure technical consistency and safety.

Custom Rule Sets

Custom rules provide a robust framework for defining both project-level and environment-wide behavioral constraints for Sypha. They serve as critical guardrails that ensure consistent code formatting, protect sensitive assets, and enforce architectural standards across your entire engineering team.

Tactical Overview

Custom rules function as persistent technical directives that Sypha aligns with during every interaction. These rules can be managed either directly through your file system or via Sypha's integrated management interface.

Rule Storage Architecture

Project-Specific Rules

Recommended Path: .sypha/rules/ within your repository.

project-root/
├── .sypha/
│   ├── rules/
│   │   ├── typing-standards.md
│   │   └── security-policies.md

Global Environment Rules

Stored centrally within your home directory for cross-project consistency:

~/.sypha/
├── rules/
│   ├── organizational-style.md
│   └── infrastructure-patterns.md

Integrated Management Interface

Select the Rules (Law) icon within the Sypha dashboard to access the visual management center. This interface enables you to:

  • Audit every active project and global directive currently in context.
  • Dynamically toggle specific rules to match your current task needs.
  • Initialize and refine rule content through a built-in markdown editor.

Logic Loading Hierarchy

Sypha parses rules in a specific order to ensure the most relevant guidance is applied:

  1. Global Directives: Baseline rules loaded from ~/.sypha/rules/.
  2. Project Directives: Local repository rules from .sypha/rules/.
  3. Legacy Assets: Support for fallback configurations (.sypharules, .sypha-rules).

Strategic Implementation Tips

  • Prioritize Precision: Define roles with high specificity to eliminate ambiguity in the AI's reasoning.
  • Leverage Markdown: Use structured formatting (headers, bulleted lists, and code blocks) to help the agent logically parse complex directives.
  • Enforced Standards: Commit your .sypha/rules/ assets to version control to synchronize engineering standards across your entire team.

On this page