Knowledge Base Custom Requirements

Creating Custom Requirements

Learn how to create custom requirements for your assessments, understand requirement pattern types, and define your own evaluation criteria.

Last updated: 9/6/2025

Requirement Pattern Types

Evalo supports several types of requirement patterns that allow you to evaluate different aspects of a repository. Each pattern type serves a specific purpose and has its own syntax and capabilities.

  • File Existence: Check if specific files or directories exist in the repository (e.g., README.md, package.json, .gitignore).
  • Content Pattern: Search for specific content, patterns, or code structures within files using regex or string matching.
  • Code Quality: Evaluate code quality metrics like proper naming conventions, documentation, or architectural patterns.
  • Structure Check: Verify project structure, folder organization, or adherence to architectural patterns.
  • Dependency Check: Validate dependencies, versions, or the presence of specific libraries and frameworks.

Requirement Components

Each custom requirement consists of several key components that define how it will be evaluated:

  • Title: A clear, descriptive name for the requirement (e.g., "README file exists").
  • Type: The pattern type that determines how the requirement will be checked.
  • Level: Priority level - Must (required), Should (quality), or Nice (bonus).
  • Pattern: The specific pattern, path, or criteria that will be evaluated.
  • Failure Message: A helpful message explaining what's missing when the requirement fails.
  • Fix Hint: Actionable guidance on how to meet the requirement.

Creating Your First Custom Requirement

Follow these steps to create a custom requirement for your assessment:

  1. 1
    Navigate to Assessment Requirements: Go to your assessment and click on the Requirements tab.
  2. 2
    Click "Add Custom Requirement": This opens the custom requirement creation form.
  3. 3
    Define the Requirement: Fill in the title, select the type, set the priority level, and define your pattern.
  4. 4
    Add Helpful Messages: Write clear failure messages and fix hints to help candidates understand what's expected.
  5. 5
    Test and Save: Review your requirement and save it to add it to your assessment.

Pro Tip

Start with simple file existence checks before moving to complex content patterns. This helps ensure your requirements are working correctly.

Example Custom Requirements

Here are some practical examples of custom requirements you might create:

File Existence Example

  • Title: Documentation file exists
  • Type: File Existence
  • Level: Must
  • Pattern: README.md
  • Failure Message: No README.md file found in the root directory
  • Fix Hint: Create a README.md file in your project root with setup and usage instructions

Content Pattern Example

  • Title: Proper error handling implemented
  • Type: Content Pattern
  • Level: Should
  • Pattern: try\\s*\\{[\\s\\S]*?catch\\s*\\([\\s\\S]*?\\)\\s*\\{
  • Failure Message: No try-catch error handling patterns found
  • Fix Hint: Implement proper error handling using try-catch blocks in your code

Dependency Check Example

  • Title: Uses required framework
  • Type: Dependency Check
  • Level: Must
  • Pattern: "react": "^18.0.0"
  • Failure Message: React 18+ is not listed as a dependency
  • Fix Hint: Install React 18 using 'npm install react@^18.0.0'

Best Practices

  • Be Specific: Write clear, unambiguous requirements that leave no room for interpretation.
  • Provide Context: Include helpful failure messages and fix hints to guide candidates.
  • Balance Priority: Use "Must" sparingly for essential requirements, "Should" for quality indicators, and "Nice" for bonuses.
  • Test Your Patterns: Validate your regex patterns and file paths before adding them to live assessments.
  • Focus on Intent: Design requirements that test understanding and implementation skills, not trivial formatting.

Important Note

Complex regex patterns may impact evaluation performance. Test thoroughly and consider simpler alternatives when possible.

Next Steps

Now that you understand custom requirements, here are some recommended next steps:


Need Help?

If you run into any issues or have questions about creating custom requirements, we're here to help: