Advanced

Validation

Validation profiles and acceptance criteria

scafld scales validation proportionate to risk. Not every change deserves the same scrutiny.

Profiles

ProfilePer phasePre commit
lightCompile check, acceptance criteriaSelf-eval
standard+ targeted tests+ full test suite, linter, typecheck, security scan
strict+ boundary checksSame as standard

The profile is set explicitly in task.acceptance.validation_profile or derived from task.risk_level:

  • low → light
  • medium → standard
  • high → strict

Acceptance criteria types

TypeDescriptionAutomated?
compileBuild succeedsYes
testTests passYes
boundaryCross-module side effects checkedYes
integrationEnd-to-end validationYes
securitySecurity scan passesYes
documentationDocs updatedManual
customAnything elseDepends on command

Automated types require a command field. Types without a command are marked as skipped by scafld exec and must be checked manually.

Timeout

Default timeout per criterion is 600 seconds. Override per-criterion:

acceptance_criteria:
  - id: ac1_1
    command: "npm run e2e"
    timeout_seconds: 900

Must be a positive integer. A timeout is recorded as a failure.

Self-evaluation

After all phases complete, the agent scores its work:

DimensionMaxWhat it measures
completeness3Does it fully meet the ask?
architecture_fidelity3Does it respect boundaries and patterns?
spec_alignment2Does execution match the spec?
validation_depth2How thorough is the testing?

Total max is 10. Below the threshold (default 7) triggers a mandatory second pass. Scores of 8+ with zero noted deviations are flagged as rubber stamps.