Class RolesPresentValidator

java.lang.Object
com.tnsai.agents.validation.validators.RolesPresentValidator
All Implemented Interfaces:
Validator

public final class RolesPresentValidator extends Object implements Validator
AGENT-V001 — at least one Role is required.

Formalizes the historical hard-coded check in AgentBuilder.validate() as a structured validator so it appears in the ValidationReport alongside other issues rather than throwing standalone.

Since:
0.5.0 (issue #85)
  • Constructor Details

    • RolesPresentValidator

      public RolesPresentValidator()
  • Method Details

    • id

      public String id()
      Description copied from interface: Validator
      Short, stable id for logging and test assertions (e.g. "llm-presence").
      Specified by:
      id in interface Validator
    • validate

      public List<ValidationIssue> validate(ValidationContext ctx)
      Description copied from interface: Validator
      Inspect the agent configuration and return any issues detected. Returning an empty list means "no problems found by this validator".
      Specified by:
      validate in interface Validator
      Parameters:
      ctx - frozen view of the agent under construction
      Returns:
      zero-or-more issues; never null