Osprey Validate
Validate an Osprey SML rules project by running the osprey-cli dry-run push from
inside the skywatch-osprey repository. Report the FULL osprey-cli output —
never summarise, truncate, or omit any errors.
Resolve the rules project path
Resolution order (first non-empty match wins):
- An explicit path the caller gave you.
- The
OSPREY_RULES_PATHenvironment variable (read with theshell_exectool:echo "$OSPREY_RULES_PATH"). - Ask the operator via the
ask_user_questiontool.
After resolving, confirm the path contains main.sml (run
test -f "$RULES_PATH/main.sml" via shell_exec). If it does not, report the error
and stop.
Resolve the skywatch-osprey repo path
osprey-cli is never installed globally. It lives inside the
skywatch-osprey repository and must be invoked via uv run. Resolve the
repo path:
OSPREY_REPO_PATHif set and it containsosprey_worker/(test -d "$OSPREY_REPO_PATH/osprey_worker").- Otherwise walk up from the rules project path looking for a directory that
contains
osprey_worker/. - Otherwise ask the operator via the
ask_user_questiontool.
Persist the resolved repo path for the session.
Run validation
From the osprey repo, capture both stdout and stderr:
cd "$OSPREY_REPO" && uv run osprey-cli push-rules "$RULES_PATH" --dry-run
Report results
- Exit code 0 → "Validation successful; the Osprey rules project is valid."
- Exit code 1 → "Validation failed." Show the errors above, then offer to load
the
skywatch-fixing-osprey-rulesskill for debugging assistance. - Any other exit code → report the unexpected code and note that
uv run osprey-clishould work from$OSPREY_REPO.
Report the FULL osprey-cli output verbatim. Do not summarise, truncate, or omit any errors.