Goal appears missing
Symptom
goal-status.ps1 -GoalId <GOAL_ID> returns goal not found even though the contract exists under goals/<GOAL_ID>/.
Decision tree
goal-status.ps1 says "goal not found"?
├── Is the runtime root correct?
│ ├── YES → continue
│ └── NO → set $env:ASF50_RUNTIME_ROOT, retry
├── Did the orchestrator ever run?
│ ├── YES → check goal-state.sqlite3 with the doctor
│ └── NO → run goal-run.ps1 -DryRun to materialize
├── Is the contract valid?
│ ├── YES → continue
│ └── NO → fix missing required fields, retry
└ ── Are there multiple goals with the same id?
├── NO → escalate to canonical source
└── YES → rename one, retry
Common causes
- Runtime root points to a different DB.
- Contract is missing a required field.
- Contract was not committed yet.
- Goal was canceled previously; re-materialization is required.
Resolution
- Run
goal-doctor.ps1. - Confirm the runtime root.
- Confirm the contract has all
goal_registry.REQUIRED_FIELDS. - Run
goal-run.ps1 -GoalId <id> -RuntimeRoot … -DryRun. - If dry-run succeeds, run without
-DryRun.