sfh-deterministic-gateslisted
Install: claude install-skill Aero123421/SimpleFlowHarness
# Put machine facts in machine gates
A stable flow does not ask an AI to reinterpret facts the operating system or a structured API already reports.
Read [references/determinism-model.md](references/determinism-model.md) before mixing AI, web, CI, or MCP data with routing.
## Preferred order
1. Direct process exit or structured status.
2. A small deterministic parser/wrapper with documented exit codes.
3. `outcomes` and `when_label_is` for those raw command codes.
4. `when_members` for exact independent fan-out votes.
5. Exact last-line AI verdict only when the decision is genuinely semantic and no deterministic gate exists.
6. Catch-all to `stuck`, never optimistic fallthrough.
## `outcomes` correctly
`outcomes` describes the **raw process exit code** of that step.
- `complete`: command finished and the work represented by the command is complete.
- `continue`: command ran correctly but reports more work is needed; it is not an error.
- `retryable`: another attempt is justified.
- `fail`: final failure.
A missing mapping keeps historical exit behavior. Protocol failure, timeout, interruption, session mismatch, or persistence failure still wins over a declared outcome.
Use labels for domain names; sfh stores and routes on them but does not interpret them.
Read [references/outcomes-routing.md](references/outcomes-routing.md).
## AI verdicts
A normal AI CLI often exits 0 whether it says PASS or REVISE. Mapping exit 0 through `outcomes` cannot distinguish those meani