Skip to content

validate

Check model integrity and relationship consistency.

Usage

bash
et validate [--json]

Options

OptionDescription
--jsonOutput in JSON format

What Gets Checked

Actors

  • Goals list references existing goals (error if not)
  • Has at least one goal assigned (warning if not)

Goals

  • Actor reference exists (error if not)
  • Has an actor assigned (warning if orphan)
  • Has at least one supporting interaction (warning if not)

Interactions

  • Goal reference exists (error if not)
  • performed_by actor exists (error if not)
  • Has a goal assigned (warning if not)

Journeys

  • Actor reference exists (error if not)
  • Goal reference exists (error if not)
  • All step interactions exist (error if not)
  • Goal belongs to journey's actor (warning if mismatched)
  • Steps performed by journey's actor (warning if mismatched)

Output

Successful Validation

bash
et validate
Validation Report
=================

Loaded: 2 actor(s), 6 goal(s), 7 interaction(s), 1 journey(s)

✓ No issues found. All relationships are valid.

Exit code: 0

Validation With Issues

Validation Report
=================

Loaded: 2 actor(s), 6 goal(s), 7 interaction(s), 1 journey(s)

Errors:
  ✗ [goal/checkout] References non-existent actor 'missing'
  ✗ [journey/flow] References non-existent interaction step 'unknown'

Warnings:
  ! [actor/admin] Actor has no goals assigned
  ! [interaction/orphan] Interaction is not linked to any goal
  ! [goal/feedback] Goal is not linked to any actor (orphan goal)

Summary: 2 error(s), 3 warning(s)

Exit code: 1 (when errors present)

JSON Output

bash
et validate --json
json
{
  "valid": false,
  "issues": [
    {
      "type": "error",
      "entity": "goal",
      "id": "checkout",
      "message": "References non-existent actor 'missing'"
    },
    {
      "type": "warning",
      "entity": "interaction",
      "id": "orphan",
      "message": "Interaction is not linked to any goal"
    }
  ],
  "summary": {
    "actors": 2,
    "goals": 6,
    "interactions": 7,
    "journeys": 1,
    "errors": 1,
    "warnings": 1
  }
}

Exit Codes

CodeMeaning
0Valid (no errors, warnings allowed)
1Invalid (one or more errors)

CI/CD Integration

bash
# In your CI script
et validate || exit 1
yaml
# GitHub Actions
- name: Validate work model
  run: et validate

Fixing Issues

Errors (Must Fix)

Errors indicate broken references that will cause problems:

bash
# Fix missing actor reference
et update goal checkout --actor customer

# Fix missing interaction in journey
et update journey flow --steps "step1,step2,step3"

Warnings (Should Review)

Warnings indicate potential issues:

bash
# Fix orphan goal
et update goal feedback --actor customer

# Fix unlinked interaction
et update interaction orphan --goal relevant_goal

# Or remove if not needed
et remove interaction orphan

Best Practices

  1. Run after changes: Validate after creating or modifying entities
  2. Run before commits: Ensure model is valid before version control
  3. Fix errors immediately: Broken references cause runtime issues
  4. Review warnings: They often indicate work without clear user value

Work matters when it helps real people achieve their goals.