Constraints System

Tasker's Architectural Constraints system allows you to define and enforce rules on how your project should be built. This is particularly useful for maintaining quality in multi-agent environments.

Categories

  • Architecture: Enforce patterns like Hexagonal or Layered.
  • Technology: Restrict or require specific technologies (e.g., "Must use PostgreSQL").
  • Naming: Enforce consistent naming conventions for issues and components.
  • Patterns: Require specific design patterns (e.g., "All repositories must use Protocol").
  • Dependencies: Limit dependency depth or forbid specific service couplings.

Enforcement Levels

Level Behavior
HARD Blocks the action (e.g., cannot create an issue that violates the rule).
SOFT Issues a warning but allows the action to proceed.

CLI Usage

# List all active constraints
tasker constraints list

# Validate an issue against the current project policy
tasker constraints validate issue_id

Defining Constraints

Constraints are defined via the API or CLI as JSON rules. For example, a "No Circular Dependencies" rule is a system-wide HARD constraint.