Development Guidelines

Coding Standards

1. Solidity Guidelines

// Function naming convention
function doSomething() public {
    // Implementation
}

// Variable naming convention
uint256 private _someVariable;

// Event naming convention
event SomethingHappened(address indexed user);

2. Python Guidelines

class RiddleGenerator:
    """
    Main class for riddle generation.
    
    Attributes:
        model: The underlying AI model
        validator: Security validator
    """
    
    def generate_riddle(
        self,
        difficulty: int,
        context: dict
    ) -> str:
        """
        Generate a new riddle.
        
        Args:
            difficulty: The target difficulty level
            context: Additional context for generation
            
        Returns:
            Generated riddle text
        """
        # Implementation

Documentation Standards

1. Code Documentation

  • Inline comments

  • Function documentation

  • Module documentation

  • Example usage

2. API Documentation

  • Endpoint descriptions

  • Request/response formats

  • Authentication details

  • Error handling

Last updated