Four rules, each of them adopted after a failure rather than before one.
One core, one branch, four platforms
Every client builds from one branch of one networking core: our modified build of mihomo, an open-source engine we maintain and extend. We adopted the rule after a convenience branch drifted for months and shipped a defect the other platforms had already fixed.
Fail closed, rather than quietly open
Where a misconfiguration could put traffic outside the tunnel, the client refuses to connect rather than appear to work. That check lives in code, not in review.
Test the security assumption; do not inherit it
We checked every endpoint we call, then removed a permissive certificate-handling path that had been kept on belief alone. A test now fails the build if it returns.
Write down the reasoning, including the part that was wrong
Each client and each backend carries a technical document recording why a decision was made, not only what was built. The claims we investigated and disproved are listed there too.