validate
Check model integrity and relationship consistency.
Usage
bash
et validate [--json]Options
| Option | Description |
|---|---|
--json | Output 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_byactor 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 validateValidation 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 --jsonjson
{
"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
| Code | Meaning |
|---|---|
| 0 | Valid (no errors, warnings allowed) |
| 1 | Invalid (one or more errors) |
CI/CD Integration
bash
# In your CI script
et validate || exit 1yaml
# GitHub Actions
- name: Validate work model
run: et validateFixing 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 orphanBest Practices
- Run after changes: Validate after creating or modifying entities
- Run before commits: Ensure model is valid before version control
- Fix errors immediately: Broken references cause runtime issues
- Review warnings: They often indicate work without clear user value