← Prompts
Skill / Understand Copilot Instructions Collection

Enforces Object Calisthenics principles for business domain code to ensure clean, maintainable, and robust code

Enforces Object Calisthenics principles for business domain code to ensure clean, maintainable, and robust code

# Object Calisthenics Rules

> ⚠️ **Warning:** This file contains the 9 original Object Calisthenics rules. No additional rules must be added, and none of these rules should be replaced or removed.
> Examples may be added later if needed.

## Objective
This rule enforces the principles of Object Calisthenics to ensure clean, maintainable, and robust code in the backend, **primarily for business domain code**.

## Scope and Application
- **Primary focus**: Business domain classes (aggregates, entities, value objects, domain services)
- **Secondary focus**: Application layer services and use case handlers
- **Exemptions**: 
  - DTOs (Data Transfer Objects)
  - API models/contracts
  - Configuration classes
  - Simple data containers without business logic
  - Infrastructure code where flexibility is needed

## Key Principles


1. **One Level of Indentation per Method**:
   - Ensure methods are simple and do not exceed one level of indentation.

   ```csharp

Sign in to view the full prompt.

Sign In

Classification

Skill Capability with explicit trigger pattern
Skill Understand
Explain or analyze
Scope Project
This codebase
Manual Manually placed / Persistent